Sanity

Sanity MCP Connector for Claude

A+

Manage your Sanity Content Lake via AI — execute GROQ queries, manage documents, and handle media assets directly from your agent.

10 tools Official Updated Jun 28, 2026 Official Vinkius Partner

Connect your Sanity project to any AI agent and take full control of your Content Lake through natural conversation.

What you can do

  • GROQ Queries — Execute powerful Graph-Relational Object Queries to fetch exactly the content you need
  • Document Management — Create, read, update, patch, and delete documents of any schema type
  • Schema Insights — List unique schema types and count entity nodes dynamically
  • Media Assets — Browse and manage images and file assets uploaded to your project
  • Bulk Operations — Run raw Sanity mutations for complex, multi-document transactions

How it works

  1. Subscribe to this server
  2. Enter your Sanity Project ID, Dataset, API Version, and API Token
  3. Start managing your content from Claude, Cursor, or any MCP-compatible client

Your AI agent becomes a headless CMS power-user, perfectly capable of navigating references and transforming content on the fly.

Who is this for?

  • Developers — prototype GROQ queries, audit schema types, and run quick data migrations
  • Content Editors — bulk edit fields, update taxonomy, and manage assets without leaving your chat
  • Product Managers — query content stats and generate instant reports on published vs. draft documents
groq-queriesstructured-contentdocument-managementschema-modelingcontent-lakeapi-driven

10 tools expose this connector's capabilities to your AI agent.

list_typed_documents

g., "post", "author"). Lists all documents of a specific type

count_entity_nodes

Counts the number of documents of a specific type

list_unique_schema_types

Retrieves a list of all unique document types present in the dataset

create_cms_document

Specify the type and provide attributes as a JSON object. Creates a new document in the CMS

get_document_details

Retrieves full details for a specific document by ID

list_media_assets

Lists all image and file assets uploaded to Sanity

patch_cms_document

Provide a JSON object of fields to set. Updates specific fields of an existing document

run_groq_query

Executes a GROQ (Graph-Relational Object Queries) query

run_raw_mutation

Provide a JSON array of mutation objects. Executes a raw Sanity mutation

wipe_cms_document

This action is irreversible. Permanently deletes a document from the CMS

See how to talk to your AI agent using Sanity.

List all unique schema types in my dataset.

I checked your schema types. Your dataset contains the following 5 types: `post`, `author`, `category`, `product`, and `siteSettings`. Would you like to know how many documents exist for a specific type?

Write a GROQ query to find the 3 most recently updated authors.

I executed the GROQ query `*[_type == 'author'] | order(_updatedAt desc)[0...3]`. The most recently updated authors are: 1. Sarah Chen, 2. Marcus Rivera, 3. Alex Nguyen. Should I retrieve their full biographical details?

Update the post with ID 'drafts.1234' and set its published state to true.

I've successfully patched document 'drafts.1234'. The field `isPublished` is now set to `true`. The change is immediately live in your Content Lake.

Yes. If you know what data you want but aren't totally familiar with GROQ syntax, you can simply ask your agent: 'Write and execute a GROQ query to find all author documents where the name starts with John and return just their ID and bio.' The agent will draft the query, execute it via the `run_groq_query` tool, and return the filtered JSON.

Related Connectors