Sanity MCP Server

Official, hosted Sanity MCP server: query and edit content, deploy schemas, and manage releases.

Description

The Sanity MCP Server connects AI assistants and coding agents to your Sanity workspace. Instead of copying content by hand or deploying schema files from the terminal first, you describe what should happen: "Find all blog posts without a cover image", "Add a description to product X", or "Create a new document type for events". The agent runs GROQ queries, changes documents, and does so with knowledge of your stored schema. Sanity itself operates the server, as a remote service at mcp.sanity.io.

What is the Sanity MCP Server?

It implements the Model Context Protocol (MCP) as a hosted endpoint with Streamable HTTP transport. A local installation is no longer necessary: the former npm package @sanity/mcp-server is deprecated according to the provider, and the corresponding repository is archived. With general availability in December 2025, the service gained schema deployment, project creation, and image tools. According to the documentation, it works with Claude Code, Cursor, VS Code, OpenCode, Lovable, Replit, and v0, as well as any client that supports remote MCP servers.

Features and tools

The scope is broad. Document work includes querying with GROQ, reading single documents, creating, patching (up to 25 documents per call), publishing, reverting to draft, and discarding drafts. On top of that come releases, dataset and project management, CORS settings, uploading assets from URLs, and managing the Media Library. Particularly useful for developers are get_schema and deploy_schema: the agent reads the existing content model, adjusts it, and deploys it straight to the cloud. There is also semantic search over embeddings indices, a search of the Sanity documentation, and a set of best-practice rules the agent can retrieve while writing code.

Setup

The easiest route is npx sanity@latest mcp configure: the command detects installed editors such as Cursor, VS Code, or Claude Code and registers the server automatically. In Claude Code, claude mcp add Sanity -t http https://mcp.sanity.io --scope user is enough. By default, sign-in runs through OAuth in the browser, and according to the documentation the session expires after about seven days. Alternatively, you store an API token as a bearer header, which you create at sanity.io/manage or via the CLI.

Costs and availability

The MCP server itself is provided by Sanity; no restriction by plan is visible on the official pricing page. Sanity offers a free entry level as well as paid plans and enterprise tiers, and current terms are on the provider's pricing page. Only the two image tools generate_image and transform_image consume AI credits according to the documentation, and they can be switched off in the client.

Who is the Sanity MCP Server for?

It suits teams that use Sanity as a headless CMS and want to speed up editorial or development tasks: developers have schemas and sample content generated, and editors with a suitable role prepare bulk changes. Compared with a self-written script it saves the time of learning the API, and compared with manual upkeep it saves a lot of clicking. If you do not use Sanity, you gain nothing, because the server is built exclusively for this platform.

Security and limits

The server respects the permissions of your account or token; available tools depend on the role. According to the documentation, edits land in the draft or in a release version, never directly in published content. Scheduling, publishing, and deleting releases remain reserved for the Studio or the HTTP API. Query responses are limited to 64 KiB, and rate limits apply. Review write actions before confirming them, especially schema deployments and dataset changes, and use a dedicated dataset for experiments.

Frequently asked questions

Do I have to install anything locally? No, the server runs hosted at mcp.sanity.io. You only need a Node.js setup for the optional CLI configuration.

Can the agent overwrite published content directly? According to the provider, edits land in the draft or in a release version. Publishing is a separate, explicit step.

Does it also work in ChatGPT or other clients? Any client with remote MCP support qualifies; the documentation additionally lists tools for uploads from ChatGPT.

Requirements

Sanity account with access to a project and dataset, and an MCP client with remote support (Claude Code, Cursor, VS Code, OpenCode, Lovable, Replit, v0, etc.). Node.js only for the optional CLI setup.

Installation instructions

Sanity MCP connects an AI client to your Sanity projects and datasets. The current server is hosted at mcp.sanity.io. Start with a dedicated test dataset and narrow account permissions: the server exposes write tools as well as queries.

Step 1: Prepare account and client

You need a Sanity account with access to a test project and an HTTP-capable MCP client. Check Claude Code in the terminal:

bash
claude --version

Record the project ID and dataset name so the agent selects the correct environment. This connection path does not require installing the MCP server locally.

Step 2: Register Sanity in Claude Code

Run in the terminal:

bash
claude mcp add Sanity -t http https://mcp.sanity.io --scope user

Expected result: a Sanity connection in your user profile. --scope user makes the registration available across projects; it does not automatically restrict Sanity account permissions.

Step 3: Complete OAuth authentication

Start Claude Code and enter:

text
/mcp

Select Sanity and finish browser authentication. Review the account and accessible projects. Authenticate again when the session expires. Environments without a browser may use an API token in the Authorization header; that path uses token permissions instead of OAuth. Never commit credentials to a repository.

Step 4: Read the test dataset

Replace the placeholders with your test project and dataset and send this to the client:

text
Use Sanity for project PROJECT_ID and dataset DATASET_NAME. Describe only the existing schema. Do not change documents, schemas, datasets, or releases.

Compare the answer with Sanity Studio. Grant write permissions only for specific tasks and approve changes individually. Take particular care with schema deployment, dataset administration, and publication tools. Edits may involve drafts or releases, but that does not establish a universal barrier against write operations.

Step 5: Use automatic setup as an alternative

With Node.js and npm available, you can instead run in the project folder:

bash
npx sanity@latest mcp configure

The CLI can detect installed editors and configure the server. This is an alternative to manual registration, not a required extra step. Review client-file changes and avoid duplicate connections.

Alternative: configure Cursor

Merge this into the existing MCP configuration and authenticate with Sanity afterwards:

json
{
  "mcpServers": {
    "Sanity": {
      "type": "http",
      "url": "https://mcp.sanity.io"
    }
  }
}

For failures, inspect authentication, project/dataset permissions, and the current endpoint. Results may contain private content and reach a model provider. Official source: https://www.sanity.io/docs/ai/mcp-server. No authenticated account test was performed.

claude mcp add Sanity -t http https://mcp.sanity.io --scope user

Authentication

OAuth via the Sanity account (default, the session expires after about seven days) or an API token as a bearer header.

Required access permissions

Permissions follow the role of the signed-in account or the token. The tools can read and modify documents, releases, datasets, projects, schemas, and CORS settings.

Transmitted or stored data

The server runs on Sanity infrastructure. Query results, document contents, and schemas enter the AI client context and therefore reach the respective model provider.

Security risks

Write actions (patching documents, deploying schemas, changing datasets and CORS origins, creating projects), an API token stored in plain text, follow-on costs from AI image tools, and confidential content in the model context.

License and costs

License
Not recorded yet.
Cost
free

The hosted server is provided by Sanity; no restriction by plan is visible on the pricing page. Sanity offers a free plan as well as Growth and Enterprise plans. Only the AI image tools consume AI credits.

Alternatives

Not recorded yet.

At a glance

Provider
Sanity
Status
Official server
Deployment
Remote
Current version
Not recorded yet.
Last reviewed
10.10.2026

Repository and documentation

Categories

Supported clients