PlugWiki

Sanity MCP Server: Setup for Claude, Cursor and Other Apps

OfficialRemoteArchived

Lets Claude, Cursor and other assistants query and edit your Sanity content, schemas, releases, datasets and Media Libraries.

This is Sanity's own hosted server. Your assistant can run GROQ queries, create and edit documents, deploy schemas, manage releases and datasets, and work with Media Libraries, using your Sanity account. There is nothing to run on your computer.

You sign in with your Sanity account in the browser, or you can send an API token instead. Edits go to drafts or release versions, and nothing is published until the assistant calls the publish tool. Sanity's older local server is archived in favor of this one.

Good for

  • Developers who build on Sanity and want help with GROQ queries and schemas
  • Content teams who want an assistant to draft, edit and publish documents
  • Teams moving content into Sanity and reshaping it with a migration
  • Designers and marketers who manage assets in a Media Library

Works in

14 should work

Tap an app to see how to set it up and any known problems.

Install Sanity MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the Sanity MCP server to Claude Code. Run this command:
    
    claude mcp add Sanity -t http https://mcp.sanity.io --scope user
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Sign-in with the vendor account (OAuth).

From the vendor's docs. Source.

Tools

  • Runs a GROQ query on your content

    Runs a GROQ query against a dataset and returns the matching documents. Results over 64 KiB are rejected, so ask for only the fields you need.

    Try: “Show all articles written by Mark, titles only.”

    Read · query_documents

  • Fetches one document by its ID

    Looks up a single document by its exact ID and returns all of it. It does not search.

    Try: “Open the document with ID article-1.”

    Read · get_document

  • Shows the deployed content schema

    Fetches the schema deployed for a project and dataset, so the assistant knows your document types before it queries or edits.

    Try: “What document types does my production dataset have?”

    Read · get_schema

  • Lists every deployed schema, by source

    Shows each deployed schema for a dataset, grouped by where it came from, with an ID to read an exact one.

    Try: “Which schemas are deployed to this dataset?”

    Read · list_workspace_schemas

  • Reads one type from the schema

    Returns one document or object type from the current schema in editable form, with the version number later edits must pass.

    Try: “Show me the definition of the article type.”

    Read · schema_type_get

  • Checks documents against the schema

    Validates documents against the deployed schema without changing them. It is in beta, so review the results.

    Try: “Validate my draft articles against the schema.”

    Read · documents_validate

  • Shows which Sanity account is connected

    Returns the signed-in account name, email and how the server is authenticated, to confirm the right identity.

    Try: “Which Sanity account am I connected as?”

    Read · whoami

  • Lists your Sanity organizations

    Returns the organizations your account can access.

    Try: “Which Sanity organizations do I belong to?”

    Read · list_organizations

  • Lists your Sanity projects

    Returns the projects linked to your account.

    Try: “List my Sanity projects.”

    Read · list_projects

  • Lists Studios linked to a project

    Returns the Studio applications attached to one project.

    Try: “Which Studios does this project have?”

    Read · get_project_studios

  • Lists a project's datasets

    Returns the datasets in one project.

    Try: “What datasets are in this project?”

    Read · list_datasets

  • Lists content releases in a dataset

    Shows active and scheduled releases by default, and published or archived ones when you filter by state.

    Try: “Show all releases in production.”

    Read · list_releases

Read from the source code

Permissions

high risk · 4 things to watch

High risk

The assistant can edit and publish live content and delete drafts, release versions, schema types and web origins in your Sanity projects. Use a token or role that fits the job, and approve each publish, delete and schema change yourself.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can delete drafts, release items and schema types

    Discard, version-discard, schema type delete, undeploy and CORS delete tools remove real data or settings. Approve each call. sanity.io

  • It can publish and change live content

    The publish tool makes content live, and the project tools create projects and datasets and switch datasets to public. Review each call before you accept it. sanity.io

  • No read-only mode is documented

    Sanity lists no setting to turn off writes. If you use an API token, a token with a viewer role limits what the tools can do. sanity.io

  • Two tools use AI credits

    The image generation and image transform tools use Sanity AI credits. You can turn them off in your client. sanity.io

Technical details
Talks tomcp.sanity.io (hosted by Sanity)
Sign-in and keysOAuth by default, managed by your client. Sessions typically expire after 7 days. An API token can be set in an Authorization header instead.
Scopes
  • Your Sanity account's roles, or the role of the API token you set

Questions

Is the Sanity MCP server official?

Yes. Sanity runs it on its own servers, and Sanity's docs describe it as the Sanity MCP server.

What is the Sanity MCP server URL?

https://mcp.sanity.io. It uses streamable HTTP, and clients that cannot connect to a web address can use the mcp-remote bridge.

Do I need an API token?

No. It signs you in with OAuth by default. You can set an API token in an Authorization header instead, and then the tools are limited to that token's role.

What happened to the local @sanity/mcp-server?

Sanity archived it and says to use the hosted server instead. The hosted one is updated continuously and needs no Node.js.

Can it run read-only?

No setting for it is documented. It can create, edit, publish and delete content with your account's permissions.

Is there an easier way to set it up?

Yes. The Sanity command line has a configure command that detects editors such as Cursor, VS Code and Claude Code and sets them up. For Claude Code, Codex CLI, Cursor, OpenCode and VS Code it uses OAuth with no token.

Does it cost extra?

Most tools are normal API calls with no extra charge. Only the image generation and image transform tools use Sanity AI credits.

Can it publish content on its own?

Only if it calls the publish tool. Edits to documents are saved as drafts or release versions, and published content is not changed directly.

Information

updated Nov 2, 2026

Publisher
Official
Transport
Streamable HTTP
Auth
OAuth
Last commit
Feb 6, 2026
Open issues
0

GitHub

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 2
  1. www.sanity.io · sanity.io
  2. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.