Sanity MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SANITY_TOKEN | No | API token (required for writes) | |
| SANITY_DATASET | No | Dataset name | production |
| SANITY_PROJECT_ID | Yes | Your Sanity project ID | |
| SANITY_API_VERSION | No | API version | 2024-01-20 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| sanity_queryB | Execute a GROQ query against Sanity CMS. GROQ is a query language similar to GraphQL but designed for JSON documents. Examples: |
| sanity_get_documentB | Get a single Sanity document by its ID |
| sanity_list_documentsA | List documents of a specific type with pagination |
| sanity_searchB | Search for documents using full-text search across titles, names, descriptions, and body content |
| sanity_get_typesA | Get all document types in the Sanity dataset |
| sanity_get_type_infoA | Get information about a document type including field names and document count |
| sanity_countB | Count documents matching a GROQ filter |
| sanity_createB | Create a new document in Sanity CMS. Requires write token. |
| sanity_updateA | Replace an entire document. Requires write token. |
| sanity_patchC | Partially update a document. Requires write token. |
| sanity_deleteB | Delete a document. Requires write token. |
| sanity_publishA | Publish a draft document (moves from drafts.* to published). Requires write token. |
| sanity_unpublishA | Unpublish a document (moves to drafts.*). Requires write token. |
| sanity_referencesA | Find all documents that reference a given document. Essential before deleting to avoid broken references. |
| sanity_historyB | Get the revision history of a document. See who changed what and when. |
| sanity_diffA | Compare two documents and see what fields differ. Useful for comparing draft vs published or two versions. |
| sanity_bulkA | Execute multiple operations in a single atomic transaction. All succeed or all fail together. |
| sanity_draft_statusA | Check if a document has unpublished changes. Shows both draft and published versions if they exist. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
Every tool has a clearly distinct purpose: create, update, patch, delete, publish, unpublish, query, search, list, get, diff, history, references, etc. No two tools overlap in functionality.
All tools follow a consistent 'sanity_verb_noun' pattern using snake_case, e.g., sanity_create, sanity_publish, sanity_list_documents. No mixed conventions.
18 tools is slightly above the ideal 3-15 range, but the scope of a CMS (CRUD, publishing, search, history, diffs) justifies the count. Still reasonable.
The toolset covers the full document lifecycle: CRUD, patch, publish/unpublish, query, search, history, diffs, references, bulk operations, and type introspection. No obvious gaps.