Sanity

Sanity MCP Connector for Claude

A+

Manage headless CMS content via Sanity — query documents with GROQ, create/update/delete content and manage datasets from any AI agent.

11 tools Official Updated Jun 28, 2026 Official Vinkius Partner

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

What you can do

  • Content Queries — List, search and retrieve documents by type or run custom GROQ queries
  • Content Management — Create, update and delete documents with full schema support
  • Dataset Management — List existing datasets and create new ones for staging/development
  • Asset Management — Browse image assets and manage media library content
  • Team Management — List project members and audit access permissions

How it works

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

No more navigating the Sanity Studio to find documents or run GROQ queries. Your AI acts as a dedicated content operations assistant.

Who is this for?

  • Content Teams — quickly create and update content, search for specific documents and browse content collections
  • Developers — run GROQ queries, manage schemas programmatically and audit project access
  • Editors — search for content by keyword, review document details and manage media assets
structured-contentgroqcontent-apidata-modelingreal-time-sync

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

create_dataset

Provide the dataset name (e.g. "staging", "development"). The dataset will be empty and ready for content. Dataset names must be lowercase alphanumeric. Create a new Sanity dataset

create_document

Requires a JSON object with _type and content fields. For example: {"_type": "post", "title": "Hello", "body": "World"}. Returns the created document with its generated ID. Create a new Sanity document

delete_document

Provide the document ID. WARNING: this action is irreversible. Delete a Sanity document

get_document

g. "drafts.abc123" or "abc123"). Returns the full document with all fields. Useful for inspecting individual content items. Get a specific Sanity document by ID

list_datasets

Datasets are isolated content collections within a project (e.g. "production", "staging", "development"). List all datasets in the Sanity project

list_documents

g. "post", "product", "author") from the configured dataset. Each document returns its _id, content fields and metadata. Use this to browse content collections. List documents of a specific type in Sanity

list_image_assets

Each asset includes its _id, original filename, dimensions and metadata. Optionally set a limit. Useful for managing media library content. List image assets in Sanity

list_users

Useful for auditing project access and team management. List project members in Sanity

query_documents

Requires a GROQ query string. Optionally provide params as JSON for parameterized queries. Returns query results as an array. Example query: "*[_type == 'post' && publishedAt > $date]{title, slug}" Run a GROQ query against Sanity

search_documents

Optionally filter by document types and set a result limit. Returns matching documents with their full content. Search documents in Sanity

update_document

Requires the document ID and a JSON object with the fields to set. For example: {"title": "Updated Title", "status": "published"}. Only provided fields will be modified. Update fields on a Sanity document

See how to talk to your AI agent using Sanity.

List all published blog posts in my Sanity project.

I found 15 documents of type 'post'. The most recent include: 'Getting Started with Sanity' (published 2 days ago), 'GROQ Query Tips' (published last week), and 'Content Modeling Best Practices' (published 2 weeks ago).

Create a new draft post titled 'API Integration Guide' with status 'draft'.

Done! I've created a new document of type 'post' with title 'API Integration Guide' and status 'draft'. The document ID is drafts.abc123def456. It's ready for editing in Sanity Studio.

Run a GROQ query to find all products with price greater than 100.

Found 8 products with price > 100. The most expensive is 'Enterprise Plan' at $499/month, followed by 'Pro Plan' at $199/month. Results include product name, price and slug for each.

Log in to [**manage.sanity.io**](https://manage.sanity.io), select your project, go to **API** tab, and click **Generate API token**. Choose read/write permissions and copy the token immediately.

Related Connectors