Skip to content

linkedbyair/coda-mcp

 
 

Repository files navigation

Coda MCP Server

Model Context Protocol (MCP) server for interacting with the Coda API. Allows AI assistants to perform actions on Coda documents and pages.

Features

  • coda_list_documents: List all documents available to the user
  • coda_list_pages: List all pages within a document with pagination
  • coda_create_page: Create a new page with optional parent page and markdown content
  • coda_get_page_content: Get page content as markdown
  • coda_replace_page_content: Replace page content with new markdown
  • coda_append_page_content: Append markdown content to a page
  • coda_duplicate_page: Duplicate an existing page
  • coda_rename_page: Rename a page
  • coda_peek_page: Preview the first N lines of a page
  • coda_resolve_link: Resolve metadata from a Coda browser link

Usage

Claude Desktop / Cursor

Add to your MCP configuration:

{
  "mcpServers": {
    "coda": {
      "command": "npx",
      "args": ["-y", "coda-mcp@latest"],
      "env": {
        "CODA_API_TOKEN": "your_coda_api_key"
      }
    }
  }
}

Get your API key from Coda account settings.

Claude.ai Web

Deploy to Vercel to use with Claude.ai web application.

1. Import to Vercel

  1. Go to vercel.com/new
  2. Import this repository from GitHub
  3. Vercel will detect the project automatically

2. Add Environment Variables

In Vercel project settings, go to SettingsEnvironment Variables and add:

  1. API_KEY: Your Coda API key from https://coda.io/account
  2. Select Production environment
  3. Save

Note: The server runs in authless mode. Your Vercel URL acts as the security token - keep it private.

3. Deploy

Vercel will automatically deploy. Your deployment will be at: https://your-project.vercel.app

4. Configure Claude.ai

  1. Go to Claude.ai Settings
  2. Navigate to Connectors (under Custom Connectors)
  3. Click Add Connector
  4. Enter your MCP server URL:
    https://your-project.vercel.app
    
  5. Click Connect

Verify Deployment

Visit https://your-project.vercel.app/health - you should see:

{
  "status": "ok",
  "server": "coda-mcp",
  "version": "1.5.1"
}

Local Development

Requirements: Node.js 24+ (use nvm use to switch)

# Install dependencies
yarn install

# Create .env file with your API key
cp .env.example .env
# Edit .env and add your Coda API key

# Build stdio version (for Claude Desktop)
yarn build

# Test HTTP server locally (for Claude.ai web)
yarn build:http
yarn start:http

Local server runs at http://localhost:3000

Architecture

Directory Structure

coda-mcp/
├── src/
│   ├── index.ts       # Stdio server (Claude Desktop)
│   ├── http.ts        # HTTP/SSE server (standalone)
│   ├── server.ts      # Core MCP server logic
│   └── client/        # Auto-generated Coda API client
│
├── api/
│   └── mcp.ts         # Vercel serverless function
│
└── dist/              # Compiled output (gitignored)

Two Entry Points

File Transport Use Case
src/index.ts stdio Claude Desktop spawns as child process
src/http.ts HTTP/SSE Web server (deployed to Vercel/Railway/etc)

Both use the same core logic in src/server.ts.

src/http.ts implements:

  • Full OAuth 2.1 discovery endpoints (/.well-known/*)
  • Dynamic Client Registration (/register)
  • Authorization & token endpoints (/authorize, /token)
  • MCP SSE transport at root (/)

Security

Important: This server runs in authless mode for simplicity. Your Vercel URL is effectively your access token - anyone with the URL can access your Coda account.

Security recommendations:

  • Keep your Vercel URL private
  • Use Vercel's domain obfuscation features
  • For production, implement OAuth following the MCP auth spec

Troubleshooting

Connection Issues

  • Verify the URL in Claude.ai is exactly https://your-project.vercel.app/api/mcp
  • Don't add /health or query parameters
  • Check that API_KEY environment variable is set in Vercel

API Key Issues

Connection Issues

  • Check health endpoint: https://your-project.vercel.app/api/mcp/health
  • Verify URL in Claude.ai settings is correct
  • Check Vercel logs in dashboard for errors

Node Version

This project requires Node.js 24 (not v25). Run nvm use to switch automatically.

License

MIT

About

MCP Server for Coda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.7%
  • JavaScript 0.3%