nocobase-mcp-server
An MCP server that enables AI assistants to interact with NocoBase instances for managing collections, UI schemas, flow models, and running API operations. It provides both hand-crafted tools and dynamically generated tools from NocoBase's OpenAPI specification.
README
nocobase-mcp-server
An MCP (Model Context Protocol) server for NocoBase, enabling AI assistants like Claude to interact with your NocoBase instance — read collections, manage UI schemas, build flowPage blocks, and run dynamic API operations via OpenAPI.
Features
- 24 hand-crafted tools covering collections, UI schemas, desktop routes, flow models, and JS blocks
- Dynamic tools auto-generated from your NocoBase's OpenAPI/Swagger spec (requires API documentation plugin)
- Works with NocoBase v2.x (tested on
2.0.17-full)
Requirements
- Node.js 18+
- A running NocoBase instance
- A NocoBase API token (root or sufficient permissions)
Installation
Option A — via npm (recommended)
npm install -g @reroet/nocobase-mcp-server
Then add to ~/.claude/mcp.json:
{
"mcpServers": {
"nocobase": {
"type": "stdio",
"command": "nocobase-mcp-server",
"env": {
"NOCOBASE_URL": "http://localhost:13000",
"NOCOBASE_API_TOKEN": "your-api-token-here"
}
}
}
}
Or use npx without installing globally:
{
"mcpServers": {
"nocobase": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@reroet/nocobase-mcp-server"],
"env": {
"NOCOBASE_URL": "http://localhost:13000",
"NOCOBASE_API_TOKEN": "your-api-token-here"
}
}
}
}
Option B — from source
git clone https://github.com/puguhsudarma/nocobase-mcp-server.git
cd nocobase-mcp-server
pnpm install
Then add to ~/.claude/mcp.json:
{
"mcpServers": {
"nocobase": {
"type": "stdio",
"command": "/absolute/path/to/nocobase-mcp-server/node_modules/.bin/tsx",
"args": ["/absolute/path/to/nocobase-mcp-server/src/index.ts"],
"env": {
"NOCOBASE_URL": "http://localhost:13000",
"NOCOBASE_API_TOKEN": "your-api-token-here"
}
}
}
}
Replace /absolute/path/to/nocobase-mcp-server with the actual path (e.g. /Users/yourname/Projects/nocobase-mcp-server).
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
NOCOBASE_API_TOKEN |
Yes | — | NocoBase API token |
NOCOBASE_URL |
No | http://localhost:13000 |
NocoBase instance base URL |
Getting an API Token
- In NocoBase UI: Settings → Plugins → enable the API keys plugin
- Go to Settings → API keys → Add API key
- Copy the generated token
Enabling Dynamic Tools (optional)
Enable the API documentation plugin in NocoBase (Settings → Plugins). Once active, the server will automatically load all additional API endpoints as tools on startup.
Tools Reference
Collections
| Tool | Description |
|---|---|
list_collections |
List all collections |
get_collection |
Get a collection by name |
UI Schemas (Classic Pages)
| Tool | Description |
|---|---|
list_pages |
List all UI schema nodes |
get_page |
Get full nested UI schema tree by UID |
get_parent_schema |
Get the parent schema of a node |
create_page |
Create a new root-level UI schema node |
insert_new_schema |
Create and insert a new UI schema node |
insert_adjacent_schema |
Insert a schema node relative to a target node |
update_ui_schema |
Patch an existing UI schema node |
batch_patch_ui_schema |
Patch multiple UI schema nodes in one request |
remove_ui_schema |
Remove a UI schema node and its descendants ⚠️ |
save_as_template |
Save a UI schema node as a reusable block template |
Desktop Routes / Navigation
| Tool | Description |
|---|---|
list_desktop_routes |
List all desktop routes (pages, menus, groups, tabs) |
Flow Models (flowPage blocks)
| Tool | Description |
|---|---|
get_flow_model |
Get a flowPage block by UID |
get_flow_model_by_parent |
Get a flowPage block by parent ID and subKey |
save_flow_model |
Create or update a flowPage block |
attach_flow_model |
Attach a block to a flowPage container |
move_flow_model |
Move a block to a different position |
duplicate_flow_model |
Deep-copy a block and auto-attach it |
destroy_flow_model |
Delete a block and its children ⚠️ |
JS Blocks
| Tool | Description |
|---|---|
get_js_block |
Get a JS block schema (classic page) |
update_js_block |
Update JS block code (classic page) |
update_flow_js_block |
Update JS block code inside a flowPage — use ctx.render() or JSX via ctx.libs.React |
⚠️ Destructive operations cannot be undone.
JS Block Sandbox
flowPage JS blocks run in NocoBase's sandbox. Available APIs:
// Render HTML
ctx.render(`<h1>Hello</h1>`);
// Render JSX with React + Ant Design
const { React, antd } = ctx.libs;
const { useState } = React;
const { Table, Tag } = antd;
function MyComponent() {
const [tab, setTab] = useState("a");
return <div>...</div>;
}
ctx.render(<MyComponent />);
Example Prompts
How to get UIDs:
- Block UID — right-click any block in NocoBase UI → Copy UID (e.g.
add17a3cf3f)- Page UID — visible in the browser URL when you open a page (e.g.
http://localhost:13000/page/96acpujiwc6→ UID is96acpujiwc6)
Without Figma MCP
List all collections in my NocoBase, then create a JS block on flowPage "<your-page-uid>"
that shows a summary dashboard with total records from the "users" collection.
Get the flowPage with UID "<your-page-uid>", add a new JS block below the existing ones
(the grid block UID is "<your-grid-uid>"), and implement a tabbed table showing data
from the "orders" and "products" collections.
Show me all desktop routes, then fetch the UI schema tree of the first page
and explain its block structure.
With Figma MCP
Here's my Figma design: https://www.figma.com/board/XXXXXXXXXXXXXXXX/MyApp?node-id=8273-xxxx
Implement it as a JS block on flowPage "<your-page-uid>" (grid UID: "<your-grid-uid>").
Use React + Ant Design from ctx.libs. Use dummy data for now.
Fetch the Figma design at the link above, then create a new JS block on my NocoBase
flowPage and implement the tabs component with the exact columns from the Figma table.
The block UID I want to update is "<your-block-uid>".
Contributing
Contributions are welcome! To add a new tool:
- Fork the repo and create a feature branch
- Add your tool in
src/index.tsusingserver.registerTool() - Follow the existing pattern — use
nocoFetch()for API calls andok()to format responses - Update the tool list in
README.md - Open a pull request
For bug reports or feature requests, open an issue on GitHub.
License
MIT — see LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。