A comprehensive Model Context Protocol (MCP) server that provides a natural language interface for NoCoDB operations. This server runs locally and connects to your NoCoDB instance via authenticated API calls, supporting Cloudflare Access protection.
π Transform your NoCoDB database into an AI-powered assistant! Use natural language to query, create, update, and manage your NoCoDB data through any MCP-compatible AI client like Windsurf, Claude Desktop, or other MCP-enabled tools.
This MCP server acts as a bridge between AI assistants and your NoCoDB database, enabling you to:
- Query data using natural language ("Show me all customers from last month")
- Create records through conversation ("Add a new project with these details...")
- Manage database structure ("Create a new table for tracking expenses")
- Automate workflows ("Update all pending tasks to completed status")
All while maintaining security through local execution and proper authentication.
- π Local MCP Server: Runs on your local machine, no remote deployment needed
- π£οΈ Natural Language Interface: Use AI assistants to perform NoCoDB operations with natural language
- π Cloudflare Access Support: Handles authentication through Cloudflare Access headers
- β‘ Fast & Lightweight: Minimal dependencies, quick setup
- π Secure: All credentials stored locally, no data sent to third parties
- π Complete CRUD Operations: Create, read, update, and delete records
- ποΈ Base Management: List, create, and manage NoCoDB bases (projects)
- π§ Table Operations: Create, list, duplicate, and delete tables
- π Schema Management: Add, update, and remove columns
- ποΈ View Management: Create and manage custom views with filters and sorting
- π Webhook Integration: Set up and test webhooks for real-time notifications
- π Advanced Querying: Filter, sort, and paginate through large datasets
- Python 3.8 or higher
- A NoCoDB instance (cloud or self-hosted)
- An MCP-compatible AI client:
- Windsurf (recommended)
- Claude Desktop
- Any other MCP-compatible client
- NoCoDB API token (see Configuration)
-
Clone this repository:
git clone https://github.com/danielrosehill/NocoDB-Data-MCP.git cd NocoDB-Data-MCP -
Run the installation script:
./install.sh
This will:
- Create a Python virtual environment
- Install all required dependencies
- Install the MCP server in development mode
-
Configure your NoCoDB connection (see Configuration section below)
-
Verify installation:
source venv/bin/activate python testing/test_connection.py
Before running the server, you need to configure your NoCoDB connection:
-
Copy the example configuration files:
cp cloudflare-examples/cf.json.example cf.json cp json-examples/nocodb.json.example nocodb.json
-
Edit the configuration files:
nocodb.json: ReplaceYOUR_NOCODB_API_TOKEN_HEREwith your actual NoCoDB API token and update the base URLcf.json: Configure Cloudflare Access credentials (only if using Cloudflare Access)
-
See CONFIGURATION.md for detailed setup instructions
nocodb.json, cf.json) are ignored by git to prevent accidental exposure of sensitive credentials.
If your NoCoDB instance is protected by Cloudflare Access, you'll need to configure service token authentication:
-
Create a Service Token:
- Go to your Cloudflare dashboard β Zero Trust β Access β Service Tokens
- Click "Create Service Token"
- Give it a descriptive name (e.g., "NoCoDB MCP Server")
- Copy the Client ID and Client Secret
-
Create an Access Policy:
- Go to Zero Trust β Access β Applications
- Find your NoCoDB application
- Edit the application and go to "Policies"
- Create a new policy with:
- Action: Bypass
- Rule: Service Token
- Value: Select your created service token
-
Configure the MCP Server:
- Add the Client ID and Secret to your
cf.jsonfile - The server will automatically include the required headers in all requests
- Add the Client ID and Secret to your
Why Cloudflare Access? This setup allows you to keep your NoCoDB instance secure behind Cloudflare's authentication while still enabling programmatic access through the MCP server. The service token acts as a "machine user" that can bypass the normal login flow.
# Activate virtual environment
source venv/bin/activate
# Run the server
python -m nocodb_mcp.serverAdd this server to your Windsurf MCP configuration (~/.codeium/windsurf/mcp_config.json):
{
"mcpServers": {
"nocodb-data": {
"command": "/path/to/NocoDB-Data-MCP/venv/bin/python",
"args": ["-m", "nocodb_mcp.server"],
"cwd": "/path/to/NocoDB-Data-MCP"
}
}
}For other MCP clients, use this format:
{
"mcpServers": {
"nocodb": {
"command": "/path/to/NocoDB-Data-MCP/venv/bin/python",
"args": ["-m", "nocodb_mcp.server"],
"cwd": "/path/to/NocoDB-Data-MCP"
}
}
}The MCP server provides 30 comprehensive tools for NoCoDB operations:
list_bases: List all bases (projects) in your NoCoDB instanceget_base_info: Get detailed information about a specific basecreate_base: Create a new base/project
list_tables: List all tables in a baseget_table_info: Get detailed table schema and metadatacreate_table: Create a new table with custom columnsduplicate_table: Duplicate an existing table with optionsdelete_table: Remove a table from the base
create_column: Add new columns to existing tablesupdate_column: Modify column properties and constraintsdelete_column: Remove columns from tables
get_table_data: Retrieve records with pagination and filteringget_record: Get a specific record by IDcreate_record: Insert new records into tablesupdate_record: Modify existing recordsdelete_record: Remove records from tablesbulk_insert_records: Insert multiple records at oncebulk_update_records: Update multiple records simultaneouslybulk_delete_records: Delete multiple records in one operationget_table_count: Get record count with optional filteringexport_table_data: Export data in CSV, Excel, or JSON formatsget_table_schema: Get complete table schema and metadata
create_view: Create custom views (Grid, Gallery, Form, etc.)list_views: List all views for a tabledelete_view: Remove viewscreate_filter: Add filters to viewslist_filters: List all filters for a viewdelete_filter: Remove filters
create_sort: Add sorting rules to viewslist_sorts: List all sorting rules for a viewdelete_sort: Remove sorting rules
create_webhook: Set up webhooks for real-time notificationslist_webhooks: List all webhooks for a tabledelete_webhook: Remove webhookstest_webhook: Test webhook configurations
Once connected to an AI assistant with MCP support, you can use commands like:
- "List all my NoCoDB bases"
- "Show me the tables in the 'CRM' base"
- "Copy the 'Customers' table to a new base called 'Archive'"
- "Create a new record in the 'Tasks' table with title 'Review docs' and status 'Todo'"
- "Show me the first 10 records from the 'Orders' table"
Local Machine Remote NoCoDB
βββββββββββββββββββ ββββββββββββββββββββ
β AI Assistant β β β
β β β β your-nocodb β
β βΌ β HTTPS β instance.com β
β MCP Client ββββββββββββββΊβ β
β β β API Calls β (Behind β
β βΌ β β Cloudflare β
β NoCoDB MCP β β Access) β
β Server (Local) β β β
βββββββββββββββββββ ββββββββββββββββββββ
The MCP server acts as a local client that:
- Receives tool calls from AI assistants
- Translates them into NoCoDB API calls
- Handles Cloudflare Access authentication
- Returns structured responses
To contribute or modify the server:
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is shared in the best of faith for the benefit of the community. Development was primarily accomplished by Claude 3.5 Sonnet (Anthropic's AI assistant) working collaboratively with Daniel Rosehill. See the LICENSE file for details.
- NoCoDB for providing an excellent no-code database platform
- Model Context Protocol for the MCP specification
- The open-source community for inspiration and support
If you encounter any issues or have questions:
- Check the CONFIGURATION.md for detailed setup instructions
- Look through existing Issues
- Create a new issue if your problem isn't already covered
- Support for environment variable configuration
- Docker containerization
- Additional authentication methods
- Webhook support for real-time updates
- Enhanced error handling and logging
- Performance optimizations for large datasets
Made with β€οΈ for the NoCoDB and MCP communities