home / mcp / sanity mcp server
Provides up-to-date Sanity MCP access to data sources and actions for agent-driven workflows.
Configuration
View docs{
"mcpServers": {
"sanity-io-agent-toolkit": {
"url": "https://mcp.sanity.io",
"headers": {
"YOUR_ENV": "VALUE"
}
}
}
}The Sanity MCP Server provides a centralized, up-to-date gateway for your Sanity projects that enables agents to access content, datasets, releases, schemas, and a rich set of agent rules through MCP-compatible clients. It streamlines automation, enables direct queries and edits, and lets you scale agent interactions across editors and tools without manual file maintenance.
Connect your MCP client to the Sanity MCP Server to enable agents to work with your Sanity projects. You can use the remote HTTP MCP endpoint to load agent rules, run queries, create documents, patch content, and run image transformations through agent skills. If your client supports MCP native configuration, point it to the provided server URL and let the agent toolkits supply the rules and capabilities you need.
Prerequisites: install Node.js (recommended LTS) and npm or npx. Ensure you are signed in to your Sanity CLI if you plan to use the quick install flow.
Option 1 ā Install the MCP server (recommended) using the quick setup.
Run in your terminal to configure MCP for Cursor, Claude Code, and VS Code automatically:
npx sanity@latest mcp configureOption 2 ā Install Agent Skills to enable best practices for Sanity development and experimentation.
npx skills add sanity-io/agent-toolkitOption 3 ā Install the Claude Code plugin to access MCP-enabled skills and slash commands.
/plugin marketplace add sanity-io/agent-toolkit
```
```
/plugin install sanity-plugin@sanity-agent-toolkitOption 4 ā Copy rules locally for offline use. Create a rules directory and populate it with the context rules so editors can learn Sanity best practices.
GROQ performance, schema design, Visual Editing, images, Portable Text, Studio, TypeGen, localization, and migrations
Structured content principles: separation of concerns, references vs embedding, content reuse
SEO/AEO with EEAT principles, structured data (JSON-LD), technical SEO patterns
A/B testing methodology, statistical foundations, experiment design