Sanity MCP Server GA: remote server, schema deployment, and new tools
Published: December 11, 2025
The Sanity MCP Server is now generally available. Connect your AI coding agent to Sanity with OAuth login or a scoped API token. No local npm installs.
MCP servers are supported by app-building platforms like v0, Lovable, and Replit, and AI-powered IDEs like Cursor, Claude Code, and Codex. With the Sanity MCP, they get access to 40+ tools for document operations, schema management, content releases, and AI-powered image generation.
What you get out of the box:
Schema-first guidance. 200+ lines of built-in instructions teach agents how Sanity works. Your agent checks schemas before querying and handles references, arrays, and multi-step operations correctly.
Always-fresh rules. Static .cursorrules files go stale. The MCP Server fetches official agent rules on demand from our Agent Toolkit repo. Best practices update, your agent gets them immediately. No maintenance on your end.
Token-aware responses. Large queries paginate intelligently within your AI's context budget. You get "12 of 847 documents (48,392 tokens)" instead of failures or truncated data.
Managed infrastructure. Rate limiting, metrics, error tracking. No self-hosting.
OAuth authentication. Log in with your Sanity account. No API tokens to generate, rotate, or accidentally commit. Edits show up as you in revision history. You can still add API tokens if you want to limit the server's permissions differently from your user.
Get started with the remote MCP
The quickest way to get started is using the Sanity CLI. It detects the most common AI-powered editors (Cursor, VS Code, Claude Code) and automatically configures the MCP server for you.
npx sanity@latest mcp configure
pnpm dlx sanity@latest mcp configure
yarn dlx sanity@latest mcp configure
bunx sanity@latest mcp configure
Or visit the MCP documentation for manual setup with Claude, Cursor, VS Code, Windsurf, and other MCP-compatible clients.
New features
Schema deployment
The new deploy_schema tool lets agents deploy schemas programmatically. Describe the content model you want, and your agent can create and deploy it in one conversation. For example: "Create a product catalog for vintage cars with fields for make, model, year, price, condition, and a rich text description."
Previously, you needed the CLI to deploy schemas before the MCP tools could work with your content model. Now your agent generates the schema, deploys it, and starts adding content in one flow. You can set up a complete Sanity project and manage its content without running the CLI or defining a Studio at all.
Project creation
New create_project tool for bootstrapping Sanity projects programmatically. Combined with schema deployment, your agent can go from prompt to working content backend without you touching the dashboard.
Image generation and transformation
Image tools are now split into generate_image and transform_image for clearer intent. No more guessing which operation you're performing.
generate_image also works with array fields. Specify the field name (e.g., photos) and the tool handles array insertion automatically.
Local studio detection
When running inside a Sanity Studio project, the MCP server now:
- Detects your
projectIdfrom Studio config files (sanity.config.ts) automatically. - Prefers updating local schema files over deployed schemas.
This gives you faster iteration when you're developing locally.
Clearer document operations
create_document_from_jsonandcreate_document_from_markdownfor explicit input formats. Both create drafts by default.- Tool responses show exactly which document was created or modified, including full draft IDs.
- Direct document retrieval by ID with
get_document.
Streamlined mutations
Removed AI-powered mutation tools in favor of direct field-level patch_document operations. More predictable, easier to debug.
Other improvements
- Migration tooling consolidated for easier content migration workflows.
- Input validation for project IDs, datasets, organization IDs.
- Tool descriptions and documentation.
- Error messages throughout.
🐛 Notable bugfixes
- Expired tokens now show the fix:
npx sanity@latest mcp configure. - Graceful handling when embeddings indices or search results are missing.
- Better validation errors for project IDs, datasets, and organization IDs.
- Workspace name defaults to
"default"when not specified.
The local MCP server (@sanity/mcp-server) is deprecated
We recommend migrating to the remote MCP server at mcp.sanity.io.
The remote server offers OAuth authentication, managed infrastructure, and automatic updates. No npm install, no token management, no version maintenance.
To migrate, run: sanity mcp configure
The local server will continue to work but won't receive new features.