About grist-mcp-server
grist-mcp-server connects MCP clients to Grist, offering tools to manage documents, records, schemas, SQL queries, and pages. It also supports deployment as an HTTP server on Cloudflare Workers.
Key features
- 01List workspaces and find documents
- 02Inspect tables and schemas
- 03Query data with SQL
- 04Create, update, and delete records
- 05Manage schemas, pages, and webhooks
- 06Create or copy documents
Use cases
- 01Create a Grist document and set up tables
- 02Import or update records in bulk
- 03Query tables with joins and aggregations
MCP support
Exposes 11 tools for Grist document, record, schema, SQL, page, and webhook operations to MCP clients. It can also run as a remote MCP server on Cloudflare Workers over HTTP.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y grist-mcp-serverGRIST_API_KEYSecretYour Grist API keyGRIST_BASE_URLBase URL for Grist instance (default: https://docs.getgrist.com)Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
11Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | |
| offset | integer | No | |
| detail_level | string | No | |
| name_contains | string | No | |
| response_format | string | No |
Details
From the project READMEGrist MCP Server
MCP server for Grist. 11 tools for documents, records, SQL, and pages.
Quick Start
Claude Code (recommended)
claude mcp add grist --env GRIST_API_KEY=your_api_key --env GRIST_BASE_URL=https://docs.getgrist.com -- npx -y grist-mcp-server
Claude Desktop (MCPB bundle)
- Download
grist-mcp-server.mcpbfrom Releases - In Claude Desktop: Settings → Developer → MCP Servers → Install from MCPB
- Configure your Grist API key and base URL
- Restart Claude Desktop
Manual configuration (.mcp.json)
Add to your .mcp.json file:
{
"mcpServers": {
"grist": {
"command": "npx",
"args": ["-y", "grist-mcp-server"],
"env": {
"GRIST_API_KEY": "your_api_key",
"GRIST_BASE_URL": "https://docs.getgrist.com"
}
}
}
}
Install from source
git clone https://github.com/gwhthompson/grist-mcp-server.git
cd grist-mcp-server
npm install && npm run build
Add to your MCP config:
{
"mcpServers": {
"grist": {
"command": "node",
"args": ["/path/to/grist-mcp-server/dist/index.js"],
"env": {
"GRIST_API_KEY": "your_api_key",
"GRIST_BASE_URL": "https://docs.getgrist.com"
}
}
}
}
Cloudflare Workers (HTTP transport)
Deploy as a remote MCP server using Cloudflare Workers for HTTP-based access.
Local development:
npm run worker:dev
Deploy to Cloudflare:
npm run worker:deploy
Configuration:
The Workers deployment uses header-based authentication:
X-Grist-API-Key: Your Grist API key (required)X-Grist-Base-URL: Grist instance URL (optional, defaults tohttps://docs.getgrist.com)
Endpoint: https://your-worker.workers.dev/mcp
Example request:
curl -X POST https://your-worker.workers.dev/mcp \
-H "Content-Type: application/json" \
-H "X-Grist-API-Key: your_api_key" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
Notes:
- Stateless design: Each request creates a fresh server instance
- CORS enabled for all origins (safe because auth uses headers, not cookies)
- Configure environment variables via
wrangler secret put GRIST_API_KEY
Tools
| Tool | Purpose |
|---|---|
grist_get_workspaces | List and filter workspaces |
grist_get_documents | Find documents by ID, name, or workspace |
grist_get_tables | Get table structure and schema |
grist_query_sql | Run SQL queries with JOINs and aggregations |
grist_get_records | Fetch records with filters |
grist_manage_records | All record CRUD operations (add/update/delete/upsert) |
grist_manage_schema | Schema operations: tables, columns, summaries |
grist_manage_pages | Page layout and management |
grist_create_document | Create new Grist documents or copy existing ones |
grist_manage_webhooks | Create and manage webhooks for real-time event notifications |
grist_help | Discover tools and get detailed documentation with JSON schemas |
Examples
Create a database
1. grist_get_workspaces → find workspace
2. grist_create_document → create document
3. grist_manage_schema → create tables with columns
Import data
1. grist_get_documents → find document
2. grist_get_tables → check structure
3. grist_manage_records → upsert data (adds new, updates existing)
Query data
1. grist_get_tables → understand schema
2. grist_query_sql → run SQL with JOINs and aggregations
Troubleshooting
Server won't start: Check GRIST_API_KEY is set in config.
Authentication fails: Verify API key at https://docs.getgrist.com/settings/keys.
Empty document list: Check GRIST_BASE_URL matches your Grist instance.
Connection errors (self-hosted): Verify URL includes https:// and server is reachable.
Testing
npm test # Docker required - container lifecycle is automatic
Documentation
Tool descriptions are concise. Use grist_help for details:
grist_help({tools: ["grist_manage_records"], only: ["examples"]})grist_help({tools: ["grist_query_sql"], only: ["errors"]})
See CHANGELOG.md for version history.
Links
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.