Skip to directory

About Sanity MCP

Sanity's hosted MCP server lets an AI client query GROQ, inspect schemas and manage Sanity content, projects, datasets, releases and assets within the authenticated user's permissions.

What you can use it for

  • Explore a project schema and query documents using GROQ
  • Create and patch draft documents; organize releases and content assets
  • Manage projects, datasets, CORS settings and other project resources
  • Search and read Sanity documentation and rules
Connection and setup
Hosting
remote
Transport
Not documented
Endpoint
https://mcp.sanity.io
Authentication
OAuth by default. Alternatively, an Authorization Bearer API token can be configured; permissions then follow the token role. OAuth sessions typically expire after seven days.

Requirements

  • Sanity account
  • MCP-compatible client supporting remote HTTP MCP and OAuth, or a documented proxy for clients without remote MCP support
  • Sanity project/dataset permissions for requested tools

Setup steps

  1. Recommended for Cursor, VS Code and Claude Code: from an authenticated Sanity project run npx sanity@latest mcp configure and select the editor/client to configure.
  2. Claude Code manual setup: claude mcp add Sanity -t http https://mcp.sanity.io --scope user.
  3. For Cursor or VS Code, add the documented remote HTTP server URL https://mcp.sanity.io and complete OAuth when prompted.
  4. For OpenCode, add remote server type with oauth config then run opencode mcp auth sanity.
  5. Use a harmless read-only GROQ query or list available datasets to check access.
  6. Use an API token instead of OAuth only when needed; create it in Sanity Manage or with the Sanity CLI, store it in a secure client secret store, and never paste the real token in a chat.
Tools 54

The current Sanity reference now enumerates 53 tools. Replaced the older 37-name sample with the complete current list, including schema deployment, dataset upload variants, validation, and Media Library operations; media_assets_upload_from_url remains documented as deprecated. Effective availability can depend on account permissions and server updates.

  • dataset_assets_upload_from_web_chatgpt

    Upload an attachment from ChatGPT web to a Content Lake dataset.

    01
  • dataset_assets_upload_from_url

    Start an image or file upload from a public URL to a dataset.

    02
  • media_library_upload_from_url

    Start an image, video or file upload from a public URL to a Media Library.

    03
  • media_assets_upload_from_url

    Deprecated: use media_library_upload_from_url instead.

    04
  • assets_upload_status

    Check the status of one or more asset uploads.

    05
  • media_library_upload_from_file

    Prepare an upload URL for a local or private file in a Media Library.

    06
  • dataset_assets_upload_from_file

    Prepare an upload URL for a local or private file in a dataset.

    07
  • get_schema

    Fetch the deployed schema for a project and dataset.

    08
  • list_workspace_schemas

    List deployed schema sources and IDs for a workspace.

    09
  • deploy_schema

    Deploy schema types to the cloud.

    10
  • deploy_studio

    Deploy a managed Sanity Studio.

    11
  • create_documents

    Create draft documents or release versions.

    12
  • create_version

    Create a version document for a release.

    13
  • patch_documents

    Patch draft or release-version documents.

    14
  • query_documents

    Query Sanity documents using GROQ.

    15
  • generate_image

    Start asynchronous AI image generation for a document field.

    16
  • transform_image

    Start asynchronous AI transformation of an image.

    17
  • get_document

    Fetch one document by exact ID.

    18
  • documents_validate

    Validate documents against the deployed schema.

    19
  • publish_documents

    Publish one or more drafts.

    20
  • unpublish_documents

    Move published documents back to drafts.

    21
  • discard_drafts

    Discard drafts while leaving published documents intact.

    22
  • version_discard

    Discard document versions from a release.

    23
  • list_organizations

    List organizations accessible to the authenticated user.

    24
  • list_projects

    List projects accessible to the authenticated user.

    25
  • get_project_studios

    List Studio applications linked to a project.

    26
  • create_project

    Create a Sanity project with a dataset and API tokens.

    27
  • cors_origins_list

    List CORS origins configured for a project.

    28
  • add_cors_origin

    Add allowed CORS origins to a project.

    29
  • cors_origins_delete

    Remove a CORS origin from a project.

    30
  • whoami

    Return the authenticated Sanity account.

    31
  • list_datasets

    List datasets in a project.

    32
  • create_dataset

    Create a dataset with specified access settings.

    33
  • update_dataset

    Update a dataset name or access settings.

    34
  • create_release

    Create a release for grouping content changes.

    35
  • list_releases

    List releases in a dataset.

    36
  • list_embeddings_indices

    List embeddings indices for a dataset.

    37
  • semantic_search

    Run semantic search against an embeddings index.

    38
  • media_library_list

    List Media Libraries available in an organization.

    39
  • media_library_get_schema

    Fetch Media Library document types or field definitions.

    40
  • media_library_query_documents

    Query documents in a Media Library using GROQ.

    41
  • media_library_get_document

    Fetch a Media Library document by exact ID.

    42
  • media_library_create_documents

    Create supported documents in a Media Library.

    43
  • media_library_patch_documents

    Edit supported Media Library metadata or collection membership.

    44
  • media_library_publish_documents

    Publish Media Library asset drafts.

    45
  • media_library_discard_drafts

    Discard Media Library asset drafts.

    46
  • media_library_list_asset_references

    List documents referencing a Media Library asset.

    47
  • media_library_link_assets

    Link Media Library assets into project documents.

    48
  • run_sanity_cli

    Run a limited set of Sanity CLI commands.

    49
  • search_docs

    Search Sanity documentation.

    50
  • read_docs

    Fetch a Sanity documentation article.

    51
  • list_sanity_rules

    List available Sanity best-practice rules.

    52
  • get_sanity_rules

    Load selected Sanity best-practice rules.

    53
  • give_sanity_feedback

    Submit feedback about Sanity MCP or its documentation.

    54
Limitations and notes
  • Tool availability varies with server updates and account/project/dataset permissions.
  • The server can make write and project-management operations; drafts, releases and publish actions have different effects. Review tool descriptions and target dataset before changes.
  • AI image generation and image transformation consume Sanity AI credits.
  • OAuth sessions typically expire after seven days; official troubleshooting documents client-specific token reset steps.
  • A limited mcp-remote fallback is documented for clients without remote MCP support; proxy setup should only be used where that client is officially supported.
Original sources
  • official tool reference

    The current Sanity reference now enumerates 53 tools. Replaced the older 37-name sample with the complete current list, including schema deployment, dataset upload variants, validation, and Media Library operations; media_assets_upload_from_url remains documented as deprecated. Effective availability can depend on account permissions and server updates.

  • official documentation or source

    The current Sanity reference now enumerates 53 tools. Replaced the older 37-name sample with the complete current list, including schema deployment, dataset upload variants, validation, and Media Library operations; media_assets_upload_from_url remains documented as deprecated. Effective availability can depend on account permissions and server updates.

Documentation checked 2026-10-28T14:15:00.000Z. Connection has not been runtime tested.