Grist Mcp Server

io.github.gwhthompson由 GitHub 账号 gwhthompson 发布v2.0.33更新于 Oct 24, 2026

11 tools for managing Grist documents with AI

概览

AI 生成的概览

本地 MCP 服务器,通过 11 个工具让助手浏览、查询和修改 Grist 的文档、记录、表结构与页面。

可以做什么
列出并查找工作区与文档,创建新文档或复制现有文档。查看表结构,并运行带 JOIN 和聚合的 SQL 查询。按条件获取记录,并执行记录的增删改查(含 upsert)。管理表结构(表、列、汇总)与页面布局。创建和管理用于实时事件通知的 webhook。通过内置帮助工具查询工具说明与 JSON schema。
适用场景
适合在 Grist 中保存结构化数据、并希望助手直接探索数据、用 SQL 回答问题、导入或更新记录,或在不切换 Grist 界面的情况下建表和调整页面的场景。
运行要求
以本地进程运行,可通过 npx 或从源码用 Node.js 启动;需要 GRIST_API_KEY 提供 Grist API 密钥,GRIST_BASE_URL 指定实例(默认使用 Grist 托管服务)。需要能访问该 Grist 实例的网络。可选的 Cloudflare Workers 部署改用请求头认证。
安装前请注意
API 密钥可访问你 Grist 账号下的文档,请勿放入共享配置。记录、表结构、页面和 webhook 相关工具可以新增、更新、删除和覆盖数据,执行前应确认改动。webhook 会向你配置的地址发送事件通知。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Grist Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Grist MCP Server

[CI] [codecov] [npm] [License] [MCP]

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

Quick Start

Claude Code (recommended)

bash
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:

json
{  "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

bash
git clone https://github.com/gwhthompson/grist-mcp-server.gitcd grist-mcp-servernpm install && npm run build

Add to your MCP config:

json
{  "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:

bash
npm run worker:dev

Deploy to Cloudflare:

bash
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:

bash
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

ToolPurpose
grist_get_workspacesList and filter workspaces
grist_get_documentsFind documents by ID, name, or workspace
grist_get_tablesGet table structure and schema
grist_query_sqlRun SQL queries with JOINs and aggregations
grist_get_recordsFetch records with filters
grist_manage_recordsAll record CRUD operations (add/update/delete/upsert)
grist_manage_schemaSchema operations: tables, columns, summaries
grist_manage_pagesPage layout and management
grist_create_documentCreate new Grist documents or copy existing ones
grist_manage_webhooksCreate and manage webhooks for real-time event notifications
grist_helpDiscover tools and get detailed documentation with JSON schemas

Examples

Create a database

1. grist_get_workspaces → find workspace2. grist_create_document → create document3. grist_manage_schema → create tables with columns

Import data

1. grist_get_documents → find document2. grist_get_tables → check structure3. grist_manage_records → upsert data (adds new, updates existing)

Query data

1. grist_get_tables → understand schema2. 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

bash
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

来源:README.md,提交 d75706c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v2.0.33最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。