ai-agent-coda-mcp-server
v1.0.0
Published
MCP server for Coda.io API integration
Downloads
14
Readme
Coda MCP Server
A comprehensive MCP (Model Context Protocol) server for Coda.io API integration, enabling AI agents to interact with Coda documents, tables, rows, pages, and more.
Features
- Document Management: Create, read, update, and delete Coda documents
- Table Operations: List tables, get table details, and manage columns
- Row Operations: Full CRUD operations on table rows with filtering and pagination
- Page Management: Create and manage pages within documents
- Formula & Controls: Access formulas and interact with controls (buttons, sliders)
- Webhooks: Create and manage webhook subscriptions and trigger automations
- Comprehensive Error Handling: Clear error messages and authentication guidance
- Confirmation Pattern: Destructive operations require explicit confirmation
Installation
Prerequisites
- Node.js 18.x or higher
- A Coda account with API access
- Coda API key
Getting Your Coda API Key
- Go to https://coda.io/account and sign in
- Navigate to the API settings section
- Click "Generate API token"
- Give your token a name and select appropriate permissions
- Copy the generated token - you won't be able to see it again!
Setup
Install dependencies:
cd mcp-servers/coda npm installBuild the server:
npm run buildSet up your API key:
export CODA_API_KEY="your-api-key-here"
Usage
With AI Agent Platform
Add the Coda server to your agent configuration:
# agent.yaml
mcpServers:
- name: coda
env:
CODA_API_KEY: ${CODA_API_KEY}The server is already registered in the MCP registry and can be used with:
ai-agent chat --agent your-agentAvailable Tools
Document Tools
coda_list_docs- List all accessible documentscoda_get_doc- Get document metadatacoda_create_doc- Create a new documentcoda_update_doc- Update document propertiescoda_delete_doc- Delete a document (requires confirmation)
Table Tools
coda_list_tables- List tables and views in a documentcoda_get_table- Get table details and schemacoda_get_table_columns- List columns in a tablecoda_get_column- Get specific column details
Row Tools
coda_list_rows- List rows with filtering and paginationcoda_get_row- Get a specific rowcoda_insert_rows- Insert or upsert rows (requires confirmation)coda_update_row- Update a specific row (requires confirmation)coda_delete_rows- Delete rows (requires confirmation)
Page Tools
coda_list_pages- List pages in a documentcoda_get_page- Get page detailscoda_create_page- Create a new page (requires confirmation)coda_update_page- Update page properties (requires confirmation)coda_delete_page- Delete a page (requires confirmation)
Formula & Control Tools
coda_list_formulas- List formulas in a documentcoda_get_formula- Get formula detailscoda_list_controls- List controls (buttons, sliders, etc.)coda_get_control- Get control detailscoda_push_button- Push a button control (requires confirmation)
Webhook Tools
coda_list_webhooks- List webhook subscriptionscoda_create_webhook- Create a webhook subscription (requires confirmation)coda_delete_webhook- Delete a webhook (requires confirmation)coda_trigger_automation- Trigger a webhook-based automation (requires confirmation)
Examples
List Documents
Use coda_list_docs to show all my Coda documentsCreate a Table Row
Use coda_insert_rows to add a new row to table "Tasks" in document "abc123" with:
- Title: "Review PR"
- Status: "In Progress"
- Assignee: "John Doe"Search and Filter Rows
Use coda_list_rows to find all rows in the "Projects" table where status is "Active"Create a New Page
Use coda_create_page to create a new page called "Meeting Notes" in document "xyz789"Push a Button
Use coda_push_button to click the "Send Email" button in row "row123" of table "Notifications"API Rate Limits
Coda API has the following rate limits:
- Reading data: 100 requests per 6 seconds
- Writing data (POST/PUT/PATCH): 10 requests per 6 seconds
- Writing doc content: 5 requests per 10 seconds
- Listing docs: 4 requests per 6 seconds
The server handles rate limit errors gracefully and returns appropriate error messages.
Error Handling
The server provides detailed error messages for common scenarios:
- 401 Unauthorized: Invalid or expired API key
- 403 Forbidden: Insufficient permissions
- 404 Not Found: Resource not found
- 429 Too Many Requests: Rate limit exceeded
Security Considerations
- API keys are sensitive - never commit them to version control
- Use environment variables or secure secret management
- The server requires confirmation for all destructive operations
- Consider using read-only API keys when write access isn't needed
Development
Running in Development Mode
npm run devType Checking
npm run typecheckTesting Manually
# Test tool listing
echo '{"method": "tools/list"}' | node dist/server.js
# Test with mock API key
CODA_API_KEY=test-key node dist/server.jsTroubleshooting
"CODA_API_KEY environment variable is required"
Make sure you've set the CODA_API_KEY environment variable with your valid API key.
"The API key is invalid or has expired"
Your API key may be incorrect or revoked. Generate a new one from your Coda account settings.
"The API key does not have permission to access this resource"
Ensure your API key has the necessary permissions for the operation you're trying to perform.
"Too many requests"
You've hit the rate limit. Wait a moment before trying again.
Contributing
When adding new features:
- Follow the existing handler pattern
- Add proper TypeScript types
- Include confirmation for destructive operations
- Update this README with new tools
- Test thoroughly with a real Coda account
License
MIT
