Sanity MCP server
- MCP server
- 58 callable tools
- 6 capabilities
Overview
Sanity publishes a hosted MCP server at mcp.sanity.io that lets AI assistants work with Sanity projects, datasets, documents, schemas and Media Libraries.
Capabilities:
- Run GROQ queries against Sanity datasets
- Create, patch, publish and discard documents and releases
- Read and deploy document schemas and Studios
- Upload images and files to datasets and Media Libraries
- Manage projects, datasets and CORS origins
- Check API usage totals and history
Works with
The products your agent can work with through this server.
Tools
The callable functions your agent uses to work with this server.
| Tool | What it does |
|---|---|
usage_ | and usage_history_get tools: Read API request, document, AI, and other usage for projects, organizations, and Media Libraries. |
create_ | tool: Configure the appropriate default CORS origin when given a supported app-builder alias. |
get_ | tool: Deprecated the schemaId selector. |
list_ | tool: Deprecated in favor of get_schema for inspecting the deployed schema. |
schema_ | and schema_types_delete tools: Preserve validation and other settings on fields and types you haven't edited, avoiding unrelated conversion-loss reports. |
patch_ | tool: Fixed patches with negative array indices being rejected when followed by additional unset operations. |
documents_ | tool: Accept references from a release document to documents in the same release, and flag references to documents the release unpublishes. |
query_ | tool: Reduced whitespace in responses to use fewer tokens. |
whoami | tool: Include the active Sanity account in responses. |
get_ | tool: Validate provided document IDs. |
create_ | tool: Validate provided dataset names. |
search_ | tool: Fixed an error when no results were returned. |
cors_ | tool: Agents can delete an existing CORS origin from a Sanity project. |
cors_ | tool: Added support for listing CORS origins. |
create_ | tool: Now returns a corrective error instead of silently discarding document fields placed outside the content wrapper, so a document field named content no lon |
run_ | tool: Run a limited set of Sanity CLI commands through MCP without access to a local shell. |
give_ | tool: Renamed from give_feedback and broadened its guidance so agents can report general Sanity issues, including docs, @sanity/client, HTTP API, schemas, Studi |
deploy_ | tool: Now throws a clear error when no schema types can be parsed successfully. |
create_ | tool: Uses the draft content as the base for new release versions when a draft exists. |
deploy_ | tool: Deploys a hosted Sanity Studio bound to an MCP-managed schema. |
read_ | tool: Simplified the parameters so it now accepts url or path separately instead of a combined field. |
list_ | tool: Fixed incorrect rule name prefixes shown in the quick reference. |
create_ | tool: Create content releases to stage and publish groups of document changes together. |
list_ | tool: List content releases with filtering by state and pagination support. |
add_ | tool: The Figma Make CORS origin is now available as a recognized origin value. |
dataset_ | Uploads a ChatGPT web attachment or generated file to a Content Lake dataset. |
dataset_ | Starts an image or file upload from a public HTTPS URL to a Content Lake dataset. |
dataset_ | Prepares a one-use URL for uploading a local or attached file up to 50 MiB to a Content Lake dataset. |
media_ | Starts an image, video or file upload from a public HTTPS URL to a Media Library. |
media_ | Prepares a one-use URL for uploading a local or private file up to 50 MiB to a Media Library. |
media_ | Deprecated alias of media_library_upload_from_url that does not start an upload. |
assets_ | Checks the status of one to 20 asset uploads by operation ID. |
undeploy_ | Removes a legacy MCP-managed schema from a named workspace. |
schema_ | Reads one schema type and its current schemaVersion before a schema edit. |
schema_ | Removes one or more types from the dataset schema. |
publish_ | Publishes one or more drafts by ID. |
unpublish_ | Moves one or more published documents back to drafts. |
discard_ | Deletes one or more drafts while keeping published documents. |
version_ | Discards one or more document versions from a release. |
list_ | Lists the organizations the user has access to. |
list_ | Lists the Sanity projects associated with the account. |
get_ | Retrieves the studio applications linked to a project. |
list_ | Lists the datasets in a Sanity project. |
update_ | Updates a dataset's visibility and description. |
list_ | Lists the embeddings indices available for a dataset. |
semantic_ | Runs a semantic search on an embeddings index. |
media_ | Lists the Media Libraries in an organization. |
media_ | Gets the document types and field definitions of a Media Library. |
media_ | Runs a GROQ query against a Media Library. |
media_ | Fetches a single Media Library document by exact ID. |
media_ | Creates Media Library collection documents. |
media_ | Edits the title, aspects, access policy and collection metadata of Media Library documents. |
media_ | Publishes asset drafts with unpublished title or aspect edits. |
media_ | Discards unpublished metadata edits on asset drafts. |
media_ | Lists documents across project datasets that reference a Media Library asset. |
media_ | Creates local deliverable copies of Media Library assets for use in project documents. |
usage_ | Gets metered usage for a project, organization or Media Library as a time series. |
get_ | Loads specific Sanity best-practice development rules. |
Installation
Follow the installation guide for supported clients, authentication and required permissions.
Add Sanity MCP server to Claude Code
Run this in your terminal:
If the server asks you to sign in, run /mcp in Claude Code and follow the browser prompt.
Add Sanity MCP server to Cursor
Add it with the Add to Cursor button below, or add it to .cursor/mcp.json in your project (~/.cursor/mcp.json for every project):
Add Sanity MCP server to VS Code
Add it to .vscode/mcp.json in your workspace. VS Code uses servers rather than mcpServers. Or run MCP: Add Server from the Command Palette and choose HTTP.
Add Sanity MCP server to Codex
Run this in your terminal:
Or add it to ~/.codex/config.toml:
If the server uses OAuth, sign in with codex mcp login sanity.
Add Sanity MCP server to Claude
Add it as a custom connector with this URL:
- Open Customize, then Connectors.
- Click + Add, then Add custom connector.
- Name it, paste the URL and click Continue.
- Choose how to sign in, then click Add.
On Team and Enterprise plans, an Owner adds it in Organization settings first, then members connect it.
Add Sanity MCP server to other clients
For any other client that connects to remote MCP servers over HTTP, use this URL:
Sources
Documentation and source code reviewed on 10 November 2026.