|
| 1 | +--- |
| 2 | +title: MCP Server |
| 3 | +description: Connect NocoDB to Large Language Models (LLMs) via the Model Context Protocol (MCP). |
| 4 | +tags: ["MCP", "LLM", "AI", "Claude", "Cursor", "Windsurf"] |
| 5 | +keywords: ["MCP", "Model Context Protocol", "NocoDB MCP", "LLM Integration", "Claude", "Cursor", "Windsurf"] |
| 6 | +--- |
| 7 | + |
| 8 | +The **Model Context Protocol (MCP) Server** lets you connect NocoDB with LLMs that support MCP, such as Claude, Cursor, or Windsurf. With this integration, LLMs can interact directly with your NocoDB workspace to create, query, update, and manage records. |
| 9 | + |
| 10 | +Each MCP endpoint in NocoDB provides a secure URL that can be linked to an MCP-compatible client. |
| 11 | +Once configured, the LLM can execute database operations in your workspace through natural language prompts. |
| 12 | + |
| 13 | +<Callout type="info"> The MCP integration currently works only with desktop clients that support MCP. Support for web based clients is coming soon. </Callout> |
| 14 | + |
| 15 | +MCP server exposes standard CRUD operations. These can be triggered conversationally, without writing SQL or scripts. |
| 16 | + |
| 17 | +| Action | Purpose | Sample Prompt | |
| 18 | +|--------|----------------------|---------------------------------------------------------------| |
| 19 | +| Create | Add new records | Create a task named ‘Review Documentation’ | |
| 20 | +| Read | Look up information | Show me all projects with deadlines this week | |
| 21 | +| Update | Change existing data | Mark the status of Project X as completed & re-assign to John | |
| 22 | +| Delete | Remove records | Remove all tasks assigned to John | |
| 23 | + |
| 24 | + |
| 25 | +## Server Configuration (NocoDB) |
| 26 | + |
| 27 | +1. Click on the **Overview** button in the left sidebar. |
| 28 | +2. Select the **Settings** tab. |
| 29 | +3. Select the **Model Context Protocol** |
| 30 | +4. Click on the **New MCP Endpoint** to create a new MCP config JSON for your base. |
| 31 | +5. Provide a name for the MCP endpoint |
| 32 | +6. Click **Create** to generate the MCP Config JSON. |
| 33 | +7. Copy the generated JSON configuration. This will be used in your LLM client configuration. |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +## Client Configuration |
| 41 | + |
| 42 | +### Claude |
| 43 | + |
| 44 | +1. Open **Claude Desktop Preferences** (`⌘+,`). |
| 45 | +2. Under **Develop**, click **Edit Config**. |
| 46 | +3. Insert the JSON block copied [here](#server-configuration-nocodb) as `claude_desktop_config.json`. |
| 47 | +4. Save the file and restart Claude Desktop. |
| 48 | + |
| 49 | + |
| 50 | +### Cursor |
| 51 | + |
| 52 | +1. Go to **Cursor Settings** (`⇧+⌘+J`). |
| 53 | +2. Open the **MCP** tab and select **Add Custom MCP**. |
| 54 | +3. Paste the JSON block copied [here](#server-configuration-nocodb). Save. |
| 55 | + |
| 56 | +<Callout type="info"> On success, you will see `11 tools enabled` below the MCP Server just installed. If you see an error, double-check the JSON configuration. </Callout> |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +### Windsurf |
| 62 | + |
| 63 | +1. Open **Windsurf Settings** (`⌘+,`). |
| 64 | +2. In the **Cascade** section > `Plugins (MCP Server)` > Click **Manage Plugins** |
| 65 | +3. Paste the JSON block copied [here](#server-configuration-nocodb). Save. |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | +## JSON Example |
| 73 | + |
| 74 | +```json |
| 75 | +{ |
| 76 | + "mcpServers": { |
| 77 | + "NocoDB MCP": { |
| 78 | + "command": "npx", |
| 79 | + "args": [ |
| 80 | + "mcp-remote", |
| 81 | + "https://your-domain.com/mcp/<ncId>", |
| 82 | + "--header", |
| 83 | + "xc-mcp-token: <ncToken>" |
| 84 | + ] |
| 85 | + } |
| 86 | + } |
| 87 | +} |
| 88 | + |
| 89 | +```` |
| 90 | + |
| 91 | +<Callout type="warning"> Your MCP configurations generated above functions as a set of access credentials, granting full control over your NocoDB base. Ensure it remains confidential, never include it in source control, and store it only in secure, protected locations.</Callout> |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | + |
0 commit comments