MCP Server NocoBase Remote
Remote MCP server for NocoBase instances with multi-instance support. Designed to be deployed on Easypanel or any container platform.
Features
- Streamable HTTP transport - Remote MCP access via HTTP
- Multi-instance support - Connect to multiple NocoBase instances from a single server
- Easypanel ready - Docker image with health checks
- API Key authentication - Secure connection to NocoBase instances
- Auto-generated tools - Converts NocoBase OpenAPI spec into MCP tools automatically
Quick Start
Local Development
npm install
cp .env.example .env
# Edit .env with your NocoBase URL and token
npm run dev
Build and Run
npm run build
npm start
Configuration
Environment Variables
| Variable | Required | Description |
|---|---|---|
PORT | No | Server port (default: 3000) |
NOCOBASE_URL | Yes* | URL of the NocoBase instance |
NOCOBASE_TOKEN | Yes* | API Key for the NocoBase instance |
INSTANCE_NAME | No | Name for the default instance (default: default) |
INSTANCE_PACKAGES | No | Override MCP packages for default instance |
MCP_PACKAGES | No | Comma-separated list of packages to expose |
INSTANCES | No | JSON array of additional instances |
*Required if INSTANCES is not set
Single Instance
NOCOBASE_URL=http://nocobase:13000
NOCOBASE_TOKEN=your-api-key
Multiple Instances
NOCOBASE_URL=http://nocobase-main:13000
NOCOBASE_TOKEN=main-key
INSTANCES=[{"name":"crm","url":"http://nocobase-crm:13000","token":"crm-key"},{"name":"erp","url":"http://nocobase-erp:13000","token":"erp-key"}]
Docker / Easypanel
Build Image
docker build -t mcp-server-nocobase-remote .
Run Container
docker run -d \
-p 3000:3000 \
-e NOCOBASE_URL=http://nocobase:13000 \
-e NOCOBASE_TOKEN=your-api-key \
--name mcp-nocobase \
mcp-server-nocobase-remote
Easypanel Deployment
- Create a new service from Dockerfile
- Point to this repository
- Add environment variables:
NOCOBASE_URL- URL of your NocoBase instanceNOCOBASE_TOKEN- API Key from NocoBase
- Deploy
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/mcp | POST/GET/DELETE | MCP streamable HTTP endpoint |
/health | GET | Health check |
/instances | GET | List configured instances |
Client Configuration
OpenCode
{
"mcp": {
"nocobase": {
"type": "remote",
"url": "http://your-server:3000/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer <your-api-key>"
}
}
}
}
Claude Code
claude mcp add --transport http nocobase http://your-server:3000/mcp
Codex CLI
codex mcp add nocobase --url http://your-server:3000/mcp
How It Works
- Server loads NocoBase instances from environment variables
- Each instance connects to NocoBase and fetches the OpenAPI/Swagger spec
openapi2mcptoolsconverts the API spec into MCP tools- Tools are prefixed with instance name (e.g.,
crm_collections_list) - Clients connect via streamable HTTP to
/mcpendpoint - MCP tools allow full CRUD operations on NocoBase collections
NocoBase Setup
- Enable the NocoBase MCP Server plugin
- Enable the API Keys plugin
- Create an API key in Settings -> API keys
- Use the URL and token in this server's configuration
License
MIT