Nocodb MCP Server
granthooks
README
Nocodb MCP Server
This MCP server provides tools to interact with a Nocodb database through the Model Context Protocol, offering CRUD operations (Create, Read, Update, Delete) for Nocodb tables.
Installation
- Install the required dependencies:
pip install -r requirements.txt
- Make sure you have the MCP Python SDK installed (it should be installed with the dependencies above):
pip install "mcp[cli]"
Configuration
This MCP server requires three environment variables:
NOCODB_URL
: The base URL of your Nocodb instance (e.g.,https://example.com/ncdb
)NOCODB_API_TOKEN
: The API token for authentication with NocodbNOCODB_BASE_ID
: The base ID of your Nocodb database
You can obtain an API token from your Nocodb instance by:
- Login to your Nocodb instance
- Go to Account settings > API Tokens
- Create a new token with appropriate permissions
The base ID can be found in the URL of your Nocodb dashboard: https://your-nocodb.com/dashboard/#/nc/base/YOUR_BASE_ID/table/...
Usage
With Claude Desktop
To integrate with Claude Desktop, add this configuration to claude_desktop_config.json
:
{
"mcpServers": {
"nocodb": {
"command": "python",
"args": [
"path/to/nocodb_mcp_server.py"
],
"env": {
"NOCODB_URL": "https://your-nocodb-instance.com",
"NOCODB_API_TOKEN": "your_api_token_here",
"NOCODB_BASE_ID": "your_base_id_here"
}
}
}
}
Or use the MCP CLI to install (recommended):
# Basic installation
mcp install nocodb_mcp_server.py
# With environment variables
mcp install nocodb_mcp_server.py -v NOCODB_URL=https://your-nocodb-instance.com -v NOCODB_API_TOKEN=your_token -v NOCODB_BASE_ID=your_base_id
# OR using an .env file
mcp install nocodb_mcp_server.py -f .env
Running as a Standalone Server
# Install dependencies
pip install -r requirements.txt
# Run the server directly
python nocodb_mcp_server.py
# Or using the MCP CLI
mcp run nocodb_mcp_server.py
Development Mode
For testing and debugging with the MCP Inspector:
# Run in development mode
mcp dev nocodb_mcp_server.py
With Cursor on Windows
For Cursor on Windows, use the following syntax in your mcp.json
configuration file:
{
"mcpServers": {
"nocodb": {
"command": "C:\\Path\\To\\Your\\Python\\Executable",
"args": [
"C:\\Path\\To\\Your\\nocodb_mcp_server.py"
],
"env": {
"NOCODB_URL": "http://localhost:8080",
"NOCODB_API_TOKEN": "your_api_token_here",
"NOCODB_BASE_ID": "your_base_id_here"
}
}
}
}
Available Tools
The server provides the following tools:
1. retrieve_records
Retrieve one or multiple records from a Nocodb table.
Parameters:
table_name
: Name of the table to queryrow_id
(Optional): Specific row ID to retrieve a single recordfilters
(Optional): Filter conditions in Nocodb formatlimit
(Optional): Maximum number of records to return (default: 10)offset
(Optional): Number of records to skip for pagination (default: 0)sort
(Optional): Column to sort byfields
(Optional): Comma-separated list of fields to include
Examples:
# Get all records from a table (limited to 10)
retrieve_records(table_name="customers")
# Get a specific record by ID
retrieve_records(table_name="customers", row_id="123")
# Filter records with conditions
retrieve_records(
table_name="customers",
filters="(age,gt,30)~and(status,eq,active)"
)
2. create_records
Create one or multiple records in a Nocodb table.
Parameters:
table_name
: Name of the table to insert intodata
: Dict with column:value pairs or a list of such dicts for bulk creationbulk
(Optional): Set to True for bulk creation
Examples:
# Create a single record
create_records(
table_name="customers",
data={"name": "John Doe", "email": "john@example.com", "age": 35}
)
# Create multiple records in bulk
create_records(
table_name="customers",
data=[
{"name": "John Doe", "email": "john@example.com", "age": 35},
{"name": "Jane Smith", "email": "jane@example.com", "age": 28}
],
bulk=True
)
3. update_records
Update one or multiple records in a Nocodb table.
Parameters:
table_name
: Name of the table to updaterow_id
: ID of the record to update (required for single record update)data
: Dictionary with column:value pairs to updatebulk
(Optional): Set to True for bulk updatesbulk_ids
(Optional): List of record IDs to update when bulk=True
Examples:
# Update a single record by ID
update_records(
table_name="customers",
row_id="123",
data={"name": "John Smith", "status": "inactive"}
)
# Update multiple records in bulk by IDs
update_records(
table_name="customers",
data={"status": "inactive"}, # Same update applied to all records
bulk=True,
bulk_ids=["123", "456", "789"]
)
4. delete_records
Delete one or multiple records from a Nocodb table.
Parameters:
table_name
: Name of the table to delete fromrow_id
: ID of the record to delete (required for single record deletion)bulk
(Optional): Set to True for bulk deletionbulk_ids
(Optional): List of record IDs to delete when bulk=True
Examples:
# Delete a single record by ID
delete_records(
table_name="customers",
row_id="123"
)
# Delete multiple records in bulk by IDs
delete_records(
table_name="customers",
bulk=True,
bulk_ids=["123", "456", "789"]
)
Notes on Nocodb API
This MCP server interacts with the Nocodb v2 REST API as described in the Nocodb API documentation.
Key Implementation Details:
- Uses v2 API endpoints for all operations
- Gets the base ID from the NOCODB_BASE_ID environment variable
- Automatically resolves table IDs from table names
- Authentication is handled via the
xc-token
header (Nocodb v2 API requirement) - Provides comprehensive error handling and responses
REST API References:
- https://docs.nocodb.com/developer-resources/rest-APIs/overview
- Specific endpoints:
/api/v2/tables/{tableId}/records/...
Authentication
Authentication is handled via the xc-token
header, which is automatically populated using the NOCODB_API_TOKEN
environment variable. This is the authentication mechanism required by the Nocodb v2 API.
Error Handling
All tools return structured responses that include error information if the operation fails. This makes it easy to determine if an operation was successful and to troubleshoot any issues.
Security Considerations
- Use dedicated API tokens with minimal privileges required for your operations.
- Never share API tokens in public repositories or insecure locations.
- Restrict database access to only necessary operations through Nocodb's permission system.
- Enable logging and auditing in your Nocodb instance for security monitoring.
- Regularly review and rotate API tokens to minimize security risks.
- Store environment variables securely, especially in production environments.
Security Best Practices
For a secure setup:
- Create a dedicated API token with restricted permissions in Nocodb.
- Avoid hardcoding credentials—always use environment variables.
- Set appropriate table-level permissions in Nocodb to restrict access.
- Enable audit logs if available in your Nocodb instance.
- Review database access regularly to prevent unauthorized access.
⚠️ IMPORTANT: Always follow the Principle of Least Privilege when configuring API tokens and database access.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.