Skip to content

Sanity MCP server

  • MCP server
  • 58 callable tools
  • 6 capabilities
Installation guide

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.

Sanity MCP server tools
ToolWhat it does
usage_snapshot_getand usage_history_get tools: Read API request, document, AI, and other usage for projects, organizations, and Media Libraries.
create_projecttool: Configure the appropriate default CORS origin when given a supported app-builder alias.
get_schematool: Deprecated the schemaId selector.
list_workspace_schemastool: Deprecated in favor of get_schema for inspecting the deployed schema.
schema_fields_patchand schema_types_delete tools: Preserve validation and other settings on fields and types you haven't edited, avoiding unrelated conversion-loss reports.
patch_documentstool: Fixed patches with negative array indices being rejected when followed by additional unset operations.
documents_validatetool: Accept references from a release document to documents in the same release, and flag references to documents the release unpublishes.
query_documentstool: Reduced whitespace in responses to use fewer tokens.
whoamitool: Include the active Sanity account in responses.
get_documenttool: Validate provided document IDs.
create_datasettool: Validate provided dataset names.
search_docstool: Fixed an error when no results were returned.
cors_origins_deletetool: Agents can delete an existing CORS origin from a Sanity project.
cors_origins_listtool: Added support for listing CORS origins.
create_documentstool: 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_sanity_clitool: Run a limited set of Sanity CLI commands through MCP without access to a local shell.
give_sanity_feedbacktool: Renamed from give_feedback and broadened its guidance so agents can report general Sanity issues, including docs, @sanity/client, HTTP API, schemas, Studi
deploy_schematool: Now throws a clear error when no schema types can be parsed successfully.
create_versiontool: Uses the draft content as the base for new release versions when a draft exists.
deploy_studiotool: Deploys a hosted Sanity Studio bound to an MCP-managed schema.
read_docstool: Simplified the parameters so it now accepts url or path separately instead of a combined field.
list_sanity_rulestool: Fixed incorrect rule name prefixes shown in the quick reference.
create_releasetool: Create content releases to stage and publish groups of document changes together.
list_releasestool: List content releases with filtering by state and pagination support.
add_cors_origintool: The Figma Make CORS origin is now available as a recognized origin value.
dataset_assets_upload_from_web_chatgptUploads a ChatGPT web attachment or generated file to a Content Lake dataset.
dataset_assets_upload_from_urlStarts an image or file upload from a public HTTPS URL to a Content Lake dataset.
dataset_assets_upload_from_filePrepares a one-use URL for uploading a local or attached file up to 50 MiB to a Content Lake dataset.
media_library_upload_from_urlStarts an image, video or file upload from a public HTTPS URL to a Media Library.
media_library_upload_from_filePrepares a one-use URL for uploading a local or private file up to 50 MiB to a Media Library.
media_assets_upload_from_urlDeprecated alias of media_library_upload_from_url that does not start an upload.
assets_upload_statusChecks the status of one to 20 asset uploads by operation ID.
undeploy_schemaRemoves a legacy MCP-managed schema from a named workspace.
schema_type_getReads one schema type and its current schemaVersion before a schema edit.
schema_types_deleteRemoves one or more types from the dataset schema.
publish_documentsPublishes one or more drafts by ID.
unpublish_documentsMoves one or more published documents back to drafts.
discard_draftsDeletes one or more drafts while keeping published documents.
version_discardDiscards one or more document versions from a release.
list_organizationsLists the organizations the user has access to.
list_projectsLists the Sanity projects associated with the account.
get_project_studiosRetrieves the studio applications linked to a project.
list_datasetsLists the datasets in a Sanity project.
update_datasetUpdates a dataset's visibility and description.
list_embeddings_indicesLists the embeddings indices available for a dataset.
semantic_searchRuns a semantic search on an embeddings index.
media_library_listLists the Media Libraries in an organization.
media_library_get_schemaGets the document types and field definitions of a Media Library.
media_library_query_documentsRuns a GROQ query against a Media Library.
media_library_get_documentFetches a single Media Library document by exact ID.
media_library_create_documentsCreates Media Library collection documents.
media_library_patch_documentsEdits the title, aspects, access policy and collection metadata of Media Library documents.
media_library_publish_documentsPublishes asset drafts with unpublished title or aspect edits.
media_library_discard_draftsDiscards unpublished metadata edits on asset drafts.
media_library_list_asset_referencesLists documents across project datasets that reference a Media Library asset.
media_library_link_assetsCreates local deliverable copies of Media Library assets for use in project documents.
usage_history_getGets metered usage for a project, organization or Media Library as a time series.
get_sanity_rulesLoads specific Sanity best-practice development rules.

Installation

Add Sanity MCP server to Claude Code

Run this in your terminal:

claude mcp add --transport http sanity https://mcp.sanity.io

If the server asks you to sign in, run /mcp in Claude Code and follow the browser prompt.

Sources

Documentation and source code reviewed on 10 November 2026.