Grist MCP Server
The Grist MCP Server provides programmatic access to Grist (a spreadsheet-database hybrid) through 11 specialized tools:
• Workspace & Document Management - Browse and filter workspaces, find documents by ID/name/workspace, create new documents, or fork existing ones
• Data Querying - Fetch records with simple filters or execute complex SQL queries with JOINs and aggregations
• Record Operations - Full CRUD capabilities (create, read, update, delete, upsert) with batched operations supporting cross-table dependencies
• Schema Management - Create, rename, and delete tables and columns; add reference columns; create summary tables with automatic grouping
• Page Layout - Manage page layouts with declarative column/row splits and link widgets together
• Real-time Webhooks - Create and manage webhooks for event notifications on table changes
• Built-in Documentation - Use grist_help tool to discover available tools and get detailed documentation with JSON schemas
Deployment Options: Run locally via npx or from source, integrate with Claude Desktop/Code, or deploy as a Cloudflare Worker for HTTP-based access with header authentication.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Grist MCP Server Show me the latest records from the Expenses table in my budget document"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Grist 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-serverClaude Desktop (MCPB bundle)
Download
grist-mcp-server.mcpbfrom ReleasesIn 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 buildAdd 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:devDeploy to Cloudflare:
npm run worker:deployConfiguration:
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
Related MCP server: Smartsheet MCP Server
Tools
Tool | Purpose |
| List and filter workspaces |
| Find documents by ID, name, or workspace |
| Get table structure and schema |
| Run SQL queries with JOINs and aggregations |
| Fetch records with filters |
| All record CRUD operations (add/update/delete/upsert) |
| Schema operations: tables, columns, summaries |
| Page layout and management |
| Create new Grist documents or copy existing ones |
| Create and manage webhooks for real-time event notifications |
| 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 columnsImport 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 aggregationsTroubleshooting
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 automaticDocumentation
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
Available Tools
11 toolsgrist_create_documentCreate DocumentA
Creates a new Grist document in a workspace. Optionally fork an existing document to copy its structure and data. Returns the new document ID and URL.
Example: {"name":"Customer CRM","workspaceId":123}
Use grist_help({tools:["grist_create_document"]}) for full schema.
Inputs: name (required), workspaceId (required), forkFromDocId, response_format.
grist_get_documentsGet DocumentsCRead-onlyIdempotent
Find documents by ID (fastest), name search, workspace filter, or browse all. Detail levels: summary (name, id, workspace, access ~50 tokens/doc) or d
Example: {"docId":"qBbArddFDSrKd2jpv3uZTj"}
Use grist_help({tools:["grist_get_documents"]}) for full schema.
Inputs: docId, limit, offset, workspaceId, +3 more.
grist_get_recordsGet Grist RecordsARead-onlyIdempotent
Fetch records with filters. No SQL needed. Use grist_query_sql for JOINs and aggregations. Filter syntax: {"Status": "Active"}, {"Priority": 1}, {"IsA
Example: {"docId":"abc123","tableId":"Contacts","filters":{"Status":"Active"}}
Use grist_help({tools:["grist_get_records"]}) for full schema.
Inputs: docId (required), tableId (required), limit, offset, +3 more.
grist_get_tablesGet Grist Table StructureCRead-onlyIdempotent
Get table structure and schema. Detail levels: names (table IDs only ~20 tokens/table), columns (+ column names ~50 tokens/table), or full_schema (+ t
Example: {"docId":"abc123","detail_level":"names"}
Use grist_help({tools:["grist_get_tables"]}) for full schema.
Inputs: docId (required), limit, offset, tableId, +2 more.
grist_get_workspacesGet WorkspacesARead-onlyIdempotent
List workspaces with filtering. Use browse mode ({limit: 20}) to see all, or search mode ({name_contains: "Sales"}) to filter. Detail levels: summary
Example: {"limit":20,"detail_level":"summary"}
Use grist_help({tools:["grist_get_workspaces"]}) for full schema.
Inputs: limit, offset, detail_level, name_contains, +1 more.
grist_helpGet Tool HelpARead-onlyIdempotent
Discover available tools and get detailed documentation with JSON schemas. Call without params to list all tools. Use tools param for full docs + sche
Example: {}
Use grist_help({tools:["grist_help"]}) for full schema.
Inputs: only, tools, topic, tool_name, +1 more.
grist_manage_pagesManage PagesCDestructive
Declarative page layouts with cols/rows splits. create_page returns sectionIds; use link_widgets to connect. Actions: create_page, set_layout, link_wi
Use grist_help({tools:["grist_manage_pages"]}) for full schema.
Inputs: docId (required), operations (required), response_format.
grist_manage_recordsManage RecordsBDestructive
CRUD for records: add, update, delete, upsert. Batched operations execute sequentially for cross-table dependencies. Use natural formats (no "L" prefi
Example: {"docId":"abc123","operations":[{"action":"add","tableId":"Contacts","records":[{"Name":"Alice","Email":"alice@example.com"}]}]}
Use grist_help({tools:["grist_manage_records"]}) for full schema.
Inputs: docId (required), operations (required), response_format.
grist_manage_schemaManage SchemaCDestructive
Batch schema operations: tables (create/rename/delete), columns (add/modify/remove), and summary tables. Ref columns need refTable. Summary tables aut
Use grist_help({tools:["grist_manage_schema"]}) for full schema.
Inputs: docId (required), operations (required), response_format.
grist_manage_webhooksManage WebhooksBDestructive
Batch webhook CRUD for real-time notifications. list and clear_queue must be solo operations.
Example: {"docId":"abc123","operations":[{"action":"create","fields":{"url":"https://api.example.com/hook","tableId":"Tasks","eventTypes":["add"]}}]}
Use grist_help({tools:["grist_manage_webhooks"]}) for full schema.
Inputs: docId (required), operations (required), response_format.
grist_query_sqlQuery Grist with SQLARead-onlyIdempotent
Execute SQL queries for JOINs, aggregations, and complex filters. Use grist_get_records for single-table queries without SQL. Supports parameterized q
Example: {"docId":"abc123","sql":"SELECT c.Name, o.Total FROM Customers c JOIN Orders o ON c.id = o.Customer"}
Use grist_help({tools:["grist_query_sql"]}) for full schema.
Inputs: sql (required), docId (required), limit, offset, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct operation: document CRUD, record retrieval via filters or SQL, workspace listing, schema and page management, webhooks, and help. The only potential overlap is between grist_get_records and grist_query_sql, but their descriptions clearly differentiate simple filtering from complex SQL joins.
All tools consistently follow the 'grist_verb_noun' pattern (e.g., grist_create_document, grist_manage_records, grist_query_sql). The naming is uniform and predictable across the set, with no mixed conventions like camelCase or random verbs.
With 11 tools, the server is well-scoped for a Grist integration. It covers essential operations for documents, records, schema, pages, webhooks, and queries without excessive granularity or unnecessary overlap.
The tool surface covers most lifecycle operations: creating and reading documents, full CRUD for records, schema modifications, page layout, and webhook management. Notably missing are update and delete for documents, and workspace modification, but these are minor gaps for typical workflows.
Maintenance
Related MCP Connectors
Shared tables and Markdown docs for teams and AI-built apps, with scoped access and audited changes.
The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.
Individual-analyst context layer: recall, remember, and reconcile your data and engineering context.
AI access to Quadratic spreadsheets: open files, run Python/SQL, query connected databases.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables reading, writing, and managing Google Sheets documents with support for batch operations, formatting, charts, and conditional formatting through the Model Context Protocol.5,983 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Smartsheet API to search, retrieve, create, update, and manage sheets, rows, webhooks, sharing permissions, cross-sheet references, and perform bulk operations through the Model Context Protocol.161 npmApache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables database interaction through the Model Context Protocol, including running SQL queries, creating tables, and inspecting schemas, with optional read-only enforcement.-
- AlicenseNot gradedqualityAmaintenanceEnables advanced database operations, schema management, record CRUD, user authentication, and backups through the Model Context Protocol.18 npmISC