Skip to main content
MCP server CX Codex

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.

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http mcp https://mcp.sanity.io
Open on GitHub

What 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.io

Step 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.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

From the same set9

sanity-best-practices Sanity's own rules for an AI agent working on a Sanity codebase: schemas, GROQ, TypeGen, visual editing, migrations and framework wiring. Useful the moment the agent touches your content layer. CX Codex +1 31,800installs sanity-migration Plans and executes content migrations from legacy CMS platforms into Sanity. Guides schema mapping, Portable Text conversion, asset uploads, and cutover checks. CX Codex +1 22,200installs seo-aeo-best-practices A skill with SEO and AEO guidance: metadata, Open Graph, sitemaps, robots.txt, hreflang, JSON-LD and EEAT. Useful while you build pages and want search engines and AI answers to pick them up. CX Codex +1 7,300installs content-modeling-best-practices Guides your agent through content type design in headless CMS: what to reference, what to embed, how to stop duplicating data. CX Codex +1 4,800installs content-experimentation-best-practices This skill guides content A/B test planning, metric selection, and result analysis. Use it when working with CMS-managed variants or frontend experiments. CX Codex +1 3,800installs portable-text-serialization A skill that shows the agent how to render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown and plain text. CX Codex +1 2,900installs portable-text-conversion Turns HTML and Markdown into Portable Text blocks for Sanity. Useful when migrating content off a legacy CMS or building an import pipeline. CX Codex +1 2,700installs sanity-studio-upgrade The skill inspects your repo and reports only the breaking changes that actually apply to it. Handy when your Studio sits several majors behind. CX Codex +1 524installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor