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 | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Purple-Horizons/sanity-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server