How the Sanity MCP server works
The Sanity MCP server follows the MCP specification and works with any MCP-compatible client. The sanity mcp configure command sets it up in supported AI editors such as Claude Code, Cursor, Codex CLI and VS Code. Set up through the CLI, the server authenticates as the logged-in CLI user, so no manual token handling is needed.
OAuth is the default sign-in method, and token-based authentication is also supported. When an API token is supplied in the Authorization header, tool calls run with that token's role and permissions. Clients without remote MCP support can connect through a proxy such as mcp-remote.
Once connected, agents can run GROQ queries, manage releases and patch documents while aware of the project's schema. The server pulls Sanity's official agent rules on demand, so agents get current best practices without static rule files. If the CMS itself is new to you, start with what Sanity is and how it works.
Guardrails and limits
Document patches made through the server land in drafts or release versions, never directly in published content.
The server can create releases but cannot schedule, publish, archive or delete them; that stays in Studio or the HTTP Actions API.
The
deploy_schematool lets an agent deploy schema types to Sanity's cloud.Most tools are standard API calls with no AI credit cost; only
generate_imageandtransform_imageconsume AI credits.
The hosted server became generally available with v2.6.0 on December 11, 2025. At GA it offered more than 40 tools covering documents, schema management, content releases and AI image generation. The earlier local npm package @sanity/mcp-server is deprecated and its repository archived in favor of the hosted server.
For a CMS comparison, read Payload vs Sanity. For a Sanity build, see Pagepro's Sanity development services.
Sources
- Sanity MCP serverSanity · sanity.io
- What is the Model Context Protocol (MCP)?Model Context Protocol · modelcontextprotocol.io
- MCP CLI command referenceSanity · sanity.io
- MCP server v2.6.0: Sanity MCP Server GA: remote server, schema deployment, and new toolsSanity · sanity.io
- sanity-io/sanity-mcp-server (archived README)Sanity · github.com