Sanity MCP
Lets your AI agent work with your Sanity projects: query and edit content, manage releases, schemas and images.
197 stars on GitHubby SanityLicense MITUpdated 27 days ago
How to install
This MCP is remote: it runs in the cloud.
Nothing to install. Copy the address and paste it into your AI app:
Server address
https://mcp.sanity.io
- βΊClaude (site or app): Settings β Connectors β Add custom connector.
- βΊChatGPT: Settings β Apps β Create app (developer mode), and paste the address.
- βΊClaude Code, Cursor, VS Code and Windsurf: pick your app below.
Paste in the terminal:
claude mcp add --transport http www https://mcp.sanity.io
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Create a blog post schema in Sanity.
Run a GROQ query to list the last ten published articles.
What it is
Sanity is a content management platform. Its hosted MCP server lets your agent query documents with GROQ, create and edit content, publish it, manage schemas and releases, and read Sanity documentation. It also serves agent rules on demand.
What it can do
query_documents: run GROQ queriescreate_documentsandpatch_documents: create and edit contentpublish_documentsandunpublish_documents: manage publishingdeploy_schemaandget_schema: manage schemascreate_releaseandlist_releases: content releasesgenerate_imageandtransform_image: AI image toolssearch_docsandread_docs: search Sanity docs
When to use
- βΊWhen you want your agent to draft or update content in a Sanity dataset.
- βΊWhen you want it to inspect your schema and write correct GROQ queries.
- βΊWhen you want to prepare a content release.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
building-blogGuides your agent through adding an SEO-friendly blog to a Next.js site that uses Sanity as its content system.docker-managementTeaches your AI agent to ship projects and manage infrastructure and generate images, icons and diagrams.building-emdash-siteHelps your agent build the site side of an EmDash CMS project on Astro, covering content, schema, menus, taxonomies and deployment.Frequently asked questions
Is it official?
Yes. It is made by Sanity at mcp.sanity.io.
How do I sign in?
With OAuth by default, or with a bearer token in the Authorization header. The CLI setup uses your logged-in CLI user.
Does it cost credits?
Image generation, image transforms and create_version with an instruction use Sanity AI credits.
Which clients work?
Cursor, Claude Code, Codex, VS Code, Lovable, v0, Replit, OpenCode and others.
Are there skills too?
Yes. The toolkit also has agent skills and plugins for Claude Code, Cursor and Codex.
Can it edit published documents?
Published documents are edited by creating or updating drafts.
If it does not work
- βΊIf sign-in fails after CLI setup, rerun npx sanity@latest mcp configure and restart your client.
- βΊIn Cursor, use Clear All MCP Tokens; in VS Code, remove the dynamic authentication provider, then sign in again.
- βΊIf your client lacks remote MCP support, use mcp-remote with the server address.
5 new skills a week. 1 minute to read.