A Managed Context Provider (MCP) server that integrates Cursor with Coda.io documentation. This server provides context-aware responses by querying your Coda.io documentation tables.
- Integration with Coda.io API
- Caching system for improved performance
- RESTful API endpoints
- Support for multiple Coda tables
- Health check and cache management endpoints
- Node.js (v14 or higher)
- A Coda.io account with API access
- A Coda.io document with relevant tables
- Clone the repository
- Install dependencies:
npm install
- Create a
.env
file based on.env.example
:cp .env.example .env
- Update the
.env
file with your Coda.io credentials:CODA_API_TOKEN
: Your Coda.io API tokenCODA_DOC_ID
: Your Coda.io document ID
Development mode:
npm run dev
Production mode:
npm start
To expose your local server to the internet using ngrok:
-
Install ngrok:
npm install -g ngrok
-
Start your MCP server (in a separate terminal):
npm start
-
Create a tunnel to your local server:
ngrok http 3000
-
Ngrok will provide you with a public URL (e.g.,
https://xxxx-xxxx-xxxx.ngrok-free.app
) -
Update your
mcp.json
file with the ngrok URL:{ "mcpServers": { "Coda MCP": { "url": "https://xxxx-xxxx-xxxx.ngrok-free.app/context", "method": "POST", "headers": { "Content-Type": "application/json" } } } }
Note: The ngrok URL will change each time you restart ngrok unless you have a paid account. Make sure to update your mcp.json
file with the new URL when it changes.
POST /context
Body: { "query": "your search query" }
GET /health
POST /cache/clear
GET /cache/stats
The server expects the following tables in your Coda.io document:
- Jira Tickets
- API Documentation
- Architecture Decisions
You can modify the table names in src/services/mcp.service.js
to match your Coda.io document structure.
The server includes comprehensive error handling for:
- API request failures
- Invalid queries
- Cache management
- Server errors
Feel free to submit issues and enhancement requests!