Skip to main content
Glama

Grist MCP Server

CI codecov npm License MCP

MCP server for Grist. 11 tools for documents, records, SQL, and pages.

Quick Start

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)

  1. Download grist-mcp-server.mcpb from Releases

  2. In Claude Desktop: Settings → Developer → MCP Servers → Install from MCPB

  3. Configure your Grist API key and base URL

  4. 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 to https://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

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.

Available Tools

11 tools
grist_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 DocumentsC
Read-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 RecordsA
Read-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 StructureC
Read-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 WorkspacesA
Read-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 HelpA
Read-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 PagesC
Destructive

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 RecordsB
Destructive

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 SchemaC
Destructive

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 WebhooksB
Destructive

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 SQLA
Read-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

    A3.5/5.0

    Scored across 11 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers