grist-mcp
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 create a new document with a Projects table and a dashboard page for it"
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
MCP server for Grist — enables LLMs to create and manage Grist applications through natural language.
19 tools covering document creation, schema management, data operations, and full UI control (pages, widgets, layouts, linking).
Quick Start
npm install
npm run buildClaude Code / Claude Desktop
Add to your MCP settings (~/.claude/settings.json for Claude Code, or Claude Desktop config):
{
"mcpServers": {
"grist": {
"command": "node",
"args": ["/path/to/grist-mcp/dist/index.js"],
"env": {
"GRIST_API_URL": "http://localhost:8484",
"GRIST_API_KEY": "your-api-key"
}
}
}
}Streamable HTTP
GRIST_API_URL=http://localhost:8484 GRIST_API_KEY=your-key node dist/index.js --http 3000Server listens at http://localhost:3000/mcp with a health check at /health.
Related MCP server: mcp-google-sheets
Configuration
Variable | Required | Description |
| Yes | Base URL of the Grist instance (e.g. |
| Yes | API key for authentication |
| No | Default document ID — avoids passing |
Tools
Document Tools
Tool | Description |
| List workspaces and documents |
| Create a new empty document |
| Full schema as Python class definitions |
Schema Tools
Tool | Description |
| Create tables with typed columns |
| Add columns to an existing table |
| Change column types, add formulas, rename |
| Remove a column |
Data Tools
Tool | Description |
| Read records with filter, sort, limit |
| Insert records |
| Update records by ID |
| Delete records by ID |
UI Tools
Tool | Description |
| Create a page with multiple widgets, layout, and linking |
| Add a widget to an existing page |
| Master-detail linking between widgets |
| Rearrange widgets (stacked, side_by_side, left_panel, grid_2x2) |
| Rename a page |
| Grouped/pivot view of a table |
Power Tools
Tool | Description |
| Read-only SQL queries against the document |
| Raw UserAction escape hatch |
Resources
URI | Description |
| Document schema as Python classes |
| Column type reference documentation |
Prompts
Prompt | Description |
| Guided workflow for building a Grist app from a use-case description |
| Guided workflow for writing a Grist Python formula |
Column Types
Text, Numeric, Int, Bool, Date, DateTime, Choice, ChoiceList, Ref:<Table>, RefList:<Table>, Attachments, Any
Testing
Integration tests (requires a running Grist instance)
# Start Grist in Docker
docker run -d --name grist-test -p 8484:8484 \
-e GRIST_DEFAULT_EMAIL=test@example.com \
-e GRIST_FORWARD_AUTH_HEADER=X-Forwarded-User \
-e GRIST_FORWARD_AUTH_LOGOUT_PATH=_unused \
gristlabs/grist
# Create an API key via the Grist UI, then:
npm run build
GRIST_API_URL=http://localhost:8484 GRIST_API_KEY=your-key node dist/test-integration.jsThe integration test creates a document, exercises all 19 tools and both resources, and verifies results (50 assertions).
License
Apache-2.0
Authored by Evan Wies evan@neomantra.net
Available Tools
19 toolsadd_columnsC
Add new columns to an existing table.
Inputs: columns (required), table_id (required), doc_id.
add_recordsB
Add new records (rows) to a table. Each record is an object mapping column names to values.
Inputs: records (required), table_id (required), doc_id.
add_widget_to_pageC
Add a widget to an existing page.
Inputs: type (required), table_id (required), page_name (required), title, +6 more.
apply_user_actionsB
Apply raw Grist UserActions for operations not covered by other tools. Actions are arrays like ["AddTable", "Name", [{id: "Col", type: "Text"}]]. Use sparingly — prefer the higher-level tools when possible.
Inputs: actions (required), doc_id.
configure_page_layoutC
Rearrange widgets on a page using a layout preset or custom layout spec.
Inputs: page_name (required), doc_id, layout, custom_layout.
create_documentC
Create a new empty Grist document in a workspace.
Inputs: name (required), workspace_id (required).
create_pageB
Create a new page with one or more widgets (grid, card, chart, form, etc.). Supports configuring layout and master-detail linking between widgets in a single call.
Inputs: name (required), widgets (required), doc_id, layout.
create_summary_tableA
Create a summary (pivot/grouped) view of a table. Groups rows by the specified columns and automatically adds a count column. Additional aggregate formulas can be added after creation.
Inputs: group_by (required), table_id (required), title, doc_id, +3 more.
create_tablesA
Create one or more new tables with typed columns. Grist will automatically create associated views and pages. Column types: Text, Numeric, Int, Bool, Date, DateTime, Choice, ChoiceList, Ref:, RefList:.
Inputs: tables (required), doc_id.
delete_columnsC
Delete a column from a table.
Inputs: col_id (required), table_id (required), doc_id.
delete_recordsC
Delete records from a table by their row IDs.
Inputs: table_id (required), record_ids (required), doc_id.
describe_documentB
Get the full schema of a Grist document — all tables, columns, and their types — formatted as Python class definitions. This is the best way to understand a document's structure.
Inputs: doc_id.
get_recordsB
Read records from a table, with optional filtering, sorting, and limit.
Inputs: table_id (required), sort, limit, doc_id, +1 more.
link_widgetsA
Set up master-detail linking between two widgets on the same page. When a record is selected in the source widget, the target widget filters to show related records.
Inputs: page_name (required), source_widget (required), target_widget (required), doc_id, +2 more.
list_documentsB
List all workspaces and documents accessible to the current user. Use org_id=0 for the user's personal org.
Inputs: org_id.
modify_columnsC
Modify existing columns — change type, add/update formulas, rename, etc.
Inputs: columns (required), table_id (required), doc_id.
rename_pageC
Rename a page in the document.
Inputs: new_name (required), old_name (required), doc_id.
run_sqlA
Execute a read-only SQL query against the document's SQLite database. Useful for analysis, aggregation, and joins across tables.
Inputs: sql (required), args, doc_id.
update_recordsB
Update existing records by ID. Each record must include 'id' and 'fields' to update.
Inputs: records (required), table_id (required), doc_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Tools are organized by distinct resources (documents, tables, columns, records, pages/widgets), and descriptions make the boundaries clear. Minor overlap exists between apply_user_actions and the higher-level tools (it is explicitly the escape hatch), and create_summary_table borrows the 'table' name for what is really a grouped view.
Every tool follows a consistent snake_case verb_noun pattern (create_document, add_columns, get_records, delete_records, rename_page, etc.). No mixed cases or inconsistent verb conventions across the set.
19 tools is slightly above the ideal band but justified: it spans five resource types (documents, tables, columns, records, pages) each requiring separate operations. No tool looks redundant or filler.
Records and columns have full CRUD, and pages/widgets have create, link, layout, and rename operations. Gaps remain for deletes on documents, tables, and pages/widgets, but apply_user_actions provides a documented workaround for these.
Maintenance
Related MCP Connectors
Create AgentUI data apps: define tables, read and write records, and run programs on your data.
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
Create and improve live, shared interactive documents with your agent.
Create, read, update and delete your data lake with simple prompts. Share tables by row and column.
Related MCP Servers
- AlicenseCqualityBmaintenanceAn MCP server for interacting with the Grist API, enabling language models to manage organizations, documents, tables, and records. It supports advanced features like SQL querying, data filtering, and attachment management for comprehensive Grist database interaction.5497 PyPI56MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Google Sheets via natural language, supporting CRUD operations, listing, sharing, and batch updates.MIT
- FlicenseNot gradedqualityDmaintenanceEnables reading and writing to Grist documents via natural language through MCP tools, allowing users to manage data, schemas, documents, and more using AI assistants like Perplexity.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Google Sheets, allowing CRUD operations, sheet management, and data manipulation through natural language.MIT