Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Content and CMS - official Sanity server

Sanity MCP server

Hosted MCP server that lets agents run GROQ queries, create, patch and publish documents, manage releases, schemas, datasets, CORS origins and Media Library assets in Sanity projects, plus search Sanity docs and load best-practice rules. Sanity hosts it at https://mcp.sanity.io with OAuth or API key auth.

Last verified 15 tools2 sources

Install

Terminal
claude mcp add Sanity -t http https://mcp.sanity.io --scope user
Terminal
codex mcp add Sanity --url https://mcp.sanity.io
JSON
{
  "mcpServers": {
    "Sanity": {
      "type": "http",
      "url": "https://mcp.sanity.io"
    }
  }
}

VS Code

JSON
{
  "servers": {
    "Sanity": {
      "type": "http",
      "url": "https://mcp.sanity.io"
    }
  }
}

Generic

JSON
{
  "mcpServers": {
    "Sanity": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.sanity.io",
        "--transport",
        "http-only"
      ]
    }
  }
}

Tools

query_documents
Query documents from Sanity using GROQ.
get_document
Fetch a single document by its exact ID.
create_documents
Create one or more draft documents by directly providing structured content.
patch_documents
Update existing documents with @sanity/client patch() operations, saved to the draft or release version.
publish_documents
Publish one or more drafts.
unpublish_documents
Unpublish one or more published documents (moves them back to drafts).
get_schema
Fetch a deployed schema.
deploy_schema
Directly deploy schema types to the cloud.
deploy_studio
Deploy a managed Sanity Studio bound to an MCP-managed schema.
create_release
Create a new release for grouping content changes.
create_version
Create a version document for a specific release.
list_projects
Lists all Sanity projects associated with your account.
create_dataset
Creates a new dataset with specified name and access settings.
generate_image
Trigger async AI image generation for a document field (consumes AI credits).
search_docs
Search Sanity docs.

As documented on October 17, 2026. A running server reports its current list through tools/list.

Notes and caveats

  • OAuth is the default; an API token can be supplied instead via an Authorization: Bearer header, in which case OAuth is not used.
  • OAuth sessions typically expire after 7 days.
  • Quick setup for Cursor, VS Code and Claude Code: npx sanity@latest mcp configure (uses the logged-in CLI user's token). generate_image and transform_image consume Sanity AI credits.
  • The tool set may vary as Sanity releases updates, and tool availability depends on project and dataset permissions.
  • The hosted server is not open source; sanity-io/agent-toolkit (MIT) holds client configs, agent skills and plugins and has no tagged releases.
  • Codex snippet comes from the agent-toolkit README.
  • Also available as a Claude Code plugin (/plugin install sanity@claude-plugins-official) and on the Cursor Marketplace.

FAQ

What does the Sanity MCP server do?

Hosted MCP server that lets agents run GROQ queries, create, patch and publish documents, manage releases, schemas, datasets, CORS origins and Media Library assets in Sanity projects, plus search Sanity docs and load best-practice rules. The vendor documents 15 tools, including query_documents, get_document, create_documents and patch_documents.

How do I add the Sanity MCP server to Claude Code?

Run claude mcp add Sanity -t http https://mcp.sanity.io --scope user, copied from Sanity's docs. This page also has snippets for Codex, Cursor, VS Code and Generic.

Does the Sanity MCP server need authentication?

Yes, OAuth or API key. Transport: Streamable HTTP. Status: Unlabelled, last checked October 17, 2026.

Sources

Last verified against 2 Sanity pages, then re-checked independently.

Newsletter

New MCP servers, the week they ship

One email per week. New official MCP servers, the coding tools that support them and how developers wire them up.