MCP ServerOfficialHTTP

Sanity MCP Server

Sanity stores content as structured documents rather than blobs of HTML, which makes it unusually well suited to an agent. The MCP server exposes GROQ — Sanity’s query language — so a model can ask precise questions about a content set.

Hosted URL

https://mcp.sanity.io

Suggested model

Claude Sonnet 4.5

Chat with 60+ AI models on the same workflow — switch to a different model mid-conversation and re-run the same prompt, or use Compare mode to put several side-by-side and balance quality vs. cost.

Auth

A Sanity API token scoped to a project and dataset. Use a read token for exploration and a write token only when you intend edits.

What the Sanity MCP server does

How models use it and what it is built for.

The server is organised around GROQ, Sanity’s query language for filtering and projecting document trees. An agent can run a query to find documents matching arbitrary criteria and shape exactly which fields come back, which keeps responses small enough to reason over — a real advantage when a content set runs to thousands of documents. Schema information is readable, so the model can discover document types and their fields rather than guessing at names. Mutations are available for creating and updating documents, which is what turns this from a reporting tool into an editorial one: bulk metadata fixes, systematic retagging, or drafting a new document that conforms to an existing type. Sanity’s draft and published separation is preserved, so an agent can work on drafts without touching what readers see.

Tools the Sanity MCP server exposes

Typical tools an AI model can call. Exact names vary by version.

  • GROQ query — filter and project across documents with full query control
  • schema — list document types and the fields each one defines
  • document read — fetch a single document by id, draft or published
  • mutations — create, patch and delete documents
  • datasets — list the datasets available in the project

Example prompts to try

Copy any of these into MCP Agent Studio after connecting.

  • Which blog posts are missing a meta description or an author reference?

  • List every product document whose category field no longer resolves to a real category.

  • Draft a new landing page document following the same shape as the pricing page.

  • Find posts published last quarter that were never assigned a tag, and tag them.

Models on MCP Playground

This is not a single-model product: you get the same MCP connection with 60+ models (Claude, GPT, Gemini, DeepSeek, open-weight, and more), you can switch mid-conversation, and you can open Compare mode to run the same prompt against multiple models at once. The card above is a suggested starting point for this server — not the only choice.

Default pick for Sanity

Claude Sonnet 4.5

GROQ projections and reference following are unlike SQL. Sonnet 4.5 writes correct traversals; weaker models fall back to SQL habits and return empty result sets.

Check an AI agent can actually use the Sanity MCP server

Listing tools proves the server is reachable, not that a model can work with it. Evals go further: they read every tool on the server, write a test suite from its real schemas, and run it — code decides pass/fail on the responses (schema conformance, error codes, pagination, result caps) while a scoring model grades plain-English tasks driven through the tools.

Get a pass/fail report per tool with the evidence behind each verdict — and replay the same suite after every schema change. Destructive tools are excluded from the run.

Run evals

Try the Sanity MCP server in your browser

Open MCP Agent Studio with the connection pre-filled. Add your token, pick any of 60+ models, and start chatting — no install required.

Open Agent Studio

Sanity MCP server — FAQ

Common questions about connecting, scoping and using it safely.

What is the Sanity MCP server?

Sanity’s hosted MCP server. It exposes GROQ queries, schema introspection, document reads and content mutations as MCP tools, letting an AI assistant query and edit structured content directly.

What is GROQ?

Sanity’s query language for JSON documents. It filters and projects in one expression and follows references inline, which is why responses stay small — you ask for exactly the fields you want rather than whole documents.

Will an agent overwrite published content?

Only if you give it a write token and it targets published documents. Sanity separates drafts from published versions, so the safe pattern is drafts-only edits with a human publishing step — and a read-only token whenever you are just exploring.

Is this useful for content audits?

It is one of the strongest fits. Questions like "which documents violate this editorial rule" are a single GROQ query that nobody wants to write by hand, and the model can then fix what it finds in the same session.

How does it compare with the Notion MCP server?

Notion is a workspace with loose, page-shaped content. Sanity is a typed content backend with a real schema. For questions that depend on structure — every document of this type missing this field — Sanity gives a model far more to work with.

Other MCP servers

More on MCP Playground

Sanity MCP Server — AI Agent for GROQ and Structured Content