Skip to content
Sanity MCP

Sanity MCP

sanitycmscontentgroqheadless-cmsremote-mcp

Summary

Sanity's official hosted MCP server: run GROQ queries, patch and publish documents, manage releases and deploy schemas — with the agent aware of your content model.

Features

  • Schema-aware GROQ queries against any dataset
  • Patch, draft and publish documents with field validation
  • Fetch and deploy content schemas
  • Manage content releases and datasets
  • AI image generation and transformation
  • Embeddings-based semantic search over content
  • Sanity documentation lookup in context
  • Hosted HTTP endpoint with OAuth or token auth

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "Sanity MCP" tools will be available.
{
  "mcpServers": {
    "sanity-mcp": {
      "command": "claude",
      "args": [
        "mcp",
        "add",
        "Sanity",
        "-t",
        "http",
        "https://mcp.sanity.io",
        "--scope",
        "user"
      ]
    }
  }
}

Description

A headless CMS is a hard target for an agent because the useful operations all depend on a schema the agent cannot see. Sanity's official MCP server solves that first: it exposes the project's schema, so a model writing a GROQ query or a document patch is working against the real content model rather than pattern-matching from examples.

What it can do:

  • Query and read — execute GROQ against any dataset in the project.
  • Write — patch documents, create drafts and publish, with schema-aware field validation.
  • Schema — fetch the deployed schema and deploy an updated one.
  • Releases and datasets — manage content releases and switch between datasets, which is how staged publishing works in Sanity.
  • Projects — list and inspect the projects the authenticated account can reach.
  • AI features — generate and transform images, and run embeddings-based semantic search over content.
  • Documentation lookup — pull Sanity documentation into context so the agent stops guessing at GROQ syntax.

That combination makes some genuinely tedious work tractable: bulk content migrations expressed as a described transformation, an editorial audit across a whole dataset, or scaffolding a content model from a brief and deploying it.

Connection: hosted at https://mcp.sanity.io over HTTP — no local process. In Claude Code: claude mcp add Sanity -t http https://mcp.sanity.io --scope user. Cursor and VS Code take the same {"type": "http", "url": "https://mcp.sanity.io"} entry in mcp.json. The quickest route of all is npx sanity@latest mcp configure, which writes the config for whichever client it detects.

Authentication: OAuth by default. For headless use, create a token at sanity.io/manage or through the CLI's token commands and pass it in an Authorization header.

A caution worth stating: this server can write to and publish content. Point it at a development dataset before you point it at production, and use a token scoped to what you actually want the agent to be able to change.

Related MCP Servers

New

Microsoft's official MCP server for Azure DevOps - work items, repos, pipelines, wikis, test plans and iterations, reachable from any MCP client in plain language.

Developer Tools

MCP: Serena

by Oraios AI

New

Semantic code toolkit for coding agents — symbol-level search, editing and refactoring backed by language servers or the JetBrains platform.

Developer Tools

MCP: Hugging Face

by Hugging Face

New

Official Hugging Face MCP server: search models, datasets, Spaces and papers on the Hub, read repository files, and call Gradio apps as agent tools.

Developer ToolsWeb & Search
New

GitLab's own MCP server — issues, merge requests, CI/CD pipelines, job logs, wikis and semantic code search over an OAuth-authorised HTTP endpoint.

Developer Tools
Browse all MCP servers →