Configuration Guide
August 9, 2025 · View on GitHub
This guide will help you configure the NoCoDB Data MCP server for your own NoCoDB instance.
Required Configuration Files
The MCP server requires three configuration files in the repository root:
1. nocodb.json - NoCoDB API Token
This file contains your NoCoDB API token. Replace YOUR_NOCODB_API_TOKEN_HERE with your actual API token.
How to get your NoCoDB API token:
- Log into your NoCoDB instance
- Go to Account Settings
- Navigate to "Tokens" section
- Create a new API token
- Copy the token and replace the placeholder in
nocodb.json
2. cf.json - Cloudflare Access Credentials (Optional)
This file is only needed if your NoCoDB instance is behind Cloudflare Access. If you're not using Cloudflare Access, you can ignore this file.
Required fields to replace:
your-email@example.com- Your Cloudflare Access emailYOUR_CF_ACCESS_PASSWORD- Your Cloudflare Access passwordYOUR_CLIENT_ID_HERE- Your Cloudflare Access Client IDYOUR_CLIENT_SECRET_HERE- Your Cloudflare Access Client Secret
How to get Cloudflare Access credentials:
- Log into your Cloudflare dashboard
- Go to Zero Trust > Access > Service Tokens
- Create a new service token
- Copy the Client ID and Client Secret
- Replace the placeholders in
cf.json
3. thetask.m d - NoCoDB Instance URL
Replace your-nocodb-instance.com with your actual NoCoDB instance URL (without https://).
Examples:
app.nocodb.com(for NoCoDB Cloud)nocodb.yourdomain.com(for self-hosted)localhost:8080(for local development)
Security Notes
⚠️ Important Security Considerations:
- Never commit sensitive credentials to version control
- Keep your API tokens secure and rotate them regularly
- Use environment variables in production deployments
- Ensure your NoCoDB instance uses HTTPS in production
Alternative Configuration Methods
Environment Variables
Instead of using JSON files, you can set environment variables:
export NOCODB_API_TOKEN="your_api_token_here"
export NOCODB_HOST="your-nocodb-instance.com"
export CF_ACCESS_CLIENT_ID="your_client_id"
export CF_ACCESS_CLIENT_SECRET="your_client_secret"
Docker Configuration
If deploying with Docker, use secrets or environment files:
version: '3.8'
services:
nocodb-mcp:
build: .
environment:
- NOCODB_API_TOKEN_FILE=/run/secrets/nocodb_token
- NOCODB_HOST=your-nocodb-instance.com
secrets:
- nocodb_token
secrets:
nocodb_token:
file: ./secrets/nocodb_token.txt
Troubleshooting
Connection Issues
-
Verify your NoCoDB instance is accessible
curl https://your-nocodb-instance.com/api/v1/db/meta/projects -
Test your API token
curl -H "xc-token: YOUR_API_TOKEN" https://your-nocodb-instance.com/api/v1/db/meta/projects -
Check Cloudflare Access (if applicable)
- Ensure your service token has the correct permissions
- Verify the Client ID and Secret are correct
Common Error Messages
- "Invalid API token" - Check your
nocodb.jsonconfiguration - "Host not found" - Verify the URL in
thetask.m d - "Access denied" - Check your Cloudflare Access configuration
- "SSL certificate error" - Ensure your NoCoDB instance has a valid SSL certificate
Testing Your Configuration
After setting up the configuration files, test the connection:
# Activate virtual environment
source venv/bin/activate
# Run the connection test
python test_connection.py
If successful, you should see output confirming the connection to your NoCoDB instance.