Sanity — Claude Code MCP server: project access and setup
Connects your agent to a Sanity project: content, datasets, releases and schemas. Useful when CMS edits happen in chat instead of Studio.
claude mcp add --transport http mcp https://mcp.sanity.ioWhat Sanity does
The server lives at https://mcp.sanity.io and runs as a remote MCP, so there are no local files to keep in sync. Your agent can read schemas, pull documents from a dataset and inspect releases, which means it works against the live project rather than a stale copy. OAuth handles sign-in; no token to paste.
The short route is npx sanity@latest mcp configure, which detects Cursor, Claude and VS Code and writes the config for you. Claude users can also add it directly with claude mcp add --transport http sanity https://mcp.sanity.io. Codex takes codex mcp add sanity --url https://mcp.sanity.io, while Cursor and GitHub Copilot get a block in mcp.json.
Clients without remote MCP support need a proxy such as mcp-remote — without one, the connection to https://mcp.sanity.io will not come up. If auth breaks after a CLI setup, rerun npx sanity@latest mcp configure and restart the client.
What it helps with
- read document schemas without leaving the chat
- pull dataset records to rewrite copy
- check what landed in a content release
- verify field types before writing a query
- find a document by project without opening Studio
Example prompts for the agent
- Show me the document schemas in my Sanity project
- Pull the latest records from the production dataset
- What changed in the last content release?
How to install Sanity
Platform CLI: remote server
claude mcp add --transport http mcp https://mcp.sanity.ioPlatform CLI: remote server
codex mcp add sanity --url https://mcp.sanity.ioConfig file
{
"mcpServers": {
"sanity": {
"url": "https://mcp.sanity.io"
}
}
}Config file
{
"servers": {
"sanity": {
"type": "http",
"url": "https://mcp.sanity.io"
}
}
}Platform CLI: remote server
gemini mcp add -t http sanity https://mcp.sanity.ioStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Sanity
How do I install the Sanity MCP server in Claude Code?
Run claude mcp add --transport http sanity https://mcp.sanity.io. Authenticate with OAuth the next time you launch Claude.
What does the Sanity MCP server do?
It gives your agent access to Sanity projects — content, datasets, releases and schemas — and serves current agent rules for Sanity work.
Which authentication does it use?
OAuth by default. You can switch to token auth by setting an Authorization: Bearer <token> header in the MCP config.