Sanity MCP. Query, write, and manage your entire content lake via AI.
Sanity MCP gives your AI agent total control over your Content Lake. Execute powerful queries against structured data, manage document records, and handle media assets without ever leaving your chat window. Stop context switching between your CMS interface and an API client; your agent now acts as a native power-user for all Sanity content.
Give Claude and any AI agent real-world access
Fetch specific pieces of content by running powerful queries against your document schema.
Build new documents or modify existing fields on any type of record in the CMS.
Browse, list, and handle all images and file assets uploaded to your project.
List every unique document type available in the dataset or count how many records exist for a given type.
Execute complex, multi-document transactions that require advanced API calls.
Ask an AI about this
Waiting for input…
What AI agents can do with Sanity MCP - 10 Tools Available
Use these specialized tools to automate nearly every task in your Sanity Content Lake, from running complex queries to managing documents and files.
Make your AI actually useful.
Add this MCP to Claude, Cursor, or Windsurf and your AI stops guessing. It gets real tools to look things up, take action, and handle the stuff you keep doing by hand.
Start using Sanity MCPList Typed Documents
Lists all available document types within your Sanity project.
Count Entity Nodes
Counts the total number of documents belonging to a specific type.
List Unique Schema Types
Retrieves a full list of every unique document structure defined in your dataset.
Create Cms Document
Builds and saves a brand new content document by specifying its type and attributes.
Get Document Details
Pulls all the specific data fields for one single document using its unique ID.
List Media Assets
Displays a list of every image and file asset that has been uploaded to your project.
Patch Cms Document
Updates specific fields on an existing document without affecting any other data points.
Run Groq Query
Executes powerful, complex graph-relational object queries to fetch precise content...
Run Raw Mutation
Runs advanced, raw mutations for highly complex, multi-document data transactions.
Wipe Cms Document
Permanently deletes a document from the CMS; this action is irreversible.
Security and governance baked right in.
Pick your AI client below to get set up. Just create a Vinkius account, subscribe, and you're instantly up and running. We handle the entire backend infrastructure, delivering out-of-the-box support for HTTPS Streamable, SSE, and OAuth2—zero messy routing required.
Choose How to Get Started
Build a custom MCP for your own tools, or connect a ready-made integration from our catalog.
Build Your Own
Turn any API into an MCP. Import a spec, define Agent Skills, or deploy with MCPFusion.
- Import from OpenAPI, Swagger, or YAML specs
- Create Agent Skills with progressive disclosure
- Deploy to edge with MCPFusion framework
- Built in DLP, auth, and compliance on each call
- Real time usage dashboard and cost metering
- Publish to catalog or keep private
Make Your AI Do More
Start with Sanity, then connect any of our 5,200+ other servers whenever your AI needs more. One click, no limits.
- Use this MCP plus 5,200+ others, all in one place
- Add new capabilities to your AI anytime you want
- Connections are secured and governed automatically
- Track usage and costs across all your servers
- Works with Claude, ChatGPT, Cursor, and more
- New servers added to the catalog weekly
Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Sanity. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
VINKIUS CLOUD
Cloud Hosted
Managed infra
V8 Isolated
Sandboxed per request
Zero-Trust Proxy
No stored credentials
DLP Enforced
Policy on each call
GDPR Compliant
EU data residency
Token Compression
~60% cost reduction
The Pain of Copying Content Data
Today, if you need data from a content lake—say, finding all product descriptions that reference an old policy document—you're stuck. You have to jump into the CMS UI, manually filter by dates, click through category dropdowns, and then copy-paste chunks of text or IDs into a spreadsheet just to start your analysis.
With this MCP, you simply ask your agent: 'Show me all product listings that link to policy document 456.' The agent executes the necessary query and gives you a clean, structured output directly in the chat. You get immediate answers without leaving your workflow.
Using Sanity's Structured Data for Automation
Manual content changes are slow and risky. To update 50 items, you might have to open 50 individual records, find the right field, manually change the status flag, and hit save—a process that takes hours and invites human error.
Now, you can tell your agent to patch_cms_document for all those items in one go. The command executes the necessary updates across dozens of records instantly. It's reliable automation.
What Sanity MCP does for your AI
This MCP connects any compatible AI client directly to your entire Sanity Content Lake. You can manage every aspect of your structured data—from creating brand new records to running deep queries across thousands of documents.
Want to find all posts written by a specific author who mention 'AI'? Your agent handles that with one command, executing complex graph-relational object queries (GROQ) that pull exactly the content you need. Need to update 50 product descriptions simultaneously? You can patch multiple fields on existing documents or even run raw mutations for tricky transactions.
It’s more than just reading data; your agent becomes a full CMS power-user, capable of listing every schema type in your project and managing all uploaded media assets. If you're looking for the best way to connect structured content sources to AI workflows, Vinkius hosts this MCP, giving you one connection point to manage complex document structures.
This means developers can prototype migrations instantly, editors can perform bulk updates without leaving their chat, and product managers get instant reports on published versus draft content.
019d7603-0e9e-7390-8bd7-2b34d5edcc2e How to set up Sanity MCP
The bottom line is that once connected, your agent treats your CMS like a built-in database, letting you talk to its data instead of writing API calls.
Subscribe to this MCP and input your Sanity Project ID, Dataset name, and API Token.
Your AI agent automatically connects the credentials and makes all document types available for querying and modification.
Tell your AI client what you need—for example, 'List all unique content types' or 'Update post 123 to say it is published.' — and watch the actions happen.
Who uses Sanity MCP
This is for the developer who hates context switching between their IDE and the web UI. It's for the editor who needs to bulk update metadata across hundreds of posts fast. If your job involves reading, writing, or reporting on structured content in a headless CMS, this MCP saves you hours.
Needs to perform large-scale updates, like changing the taxonomy or updating metadata across dozens of draft posts without exporting data to Excel.
Uses the MCP to prototype complex GROQ queries or run quick schema audits before writing production integration code.
Needs real-time content statistics, such as counting published versus draft documents for a specific content type, without needing dedicated analytics access.
Benefits of connecting Sanity MCP
You eliminate context switching. Instead of jumping between the CMS UI and an API playground to test queries, you just ask your agent what you need in plain English. The agent handles the complex GROQ execution for you.
Content updates get faster. Use tools like patch_cms_document to update specific fields on existing records—like changing a status or updating a date—without having to recreate the entire document payload every time.
Schema discovery is instant. Never wonder what content types exist again; just ask your agent to list unique schema types, and it gives you an immediate inventory of everything in your Content Lake.
Media management simplifies. You can browse all images and file assets using list_media_assets right from the chat, treating media files like data points rather than just visual clutter.
Data integrity is maintained. For complex tasks that involve multiple documents (like creating a new post and simultaneously updating its author's profile), you use run_raw_mutation to keep everything consistent.
Sanity MCP use cases
Finding all outdated content
A Product Manager needs to find every product listing that hasn't been updated in six months. They prompt their agent, and it executes a run_groq_query targeting the 'product' type and filtering by the last update date. The result is a clean list of IDs ready for review.
Mass publishing content
A Content Editor has 20 articles that are finished but still marked as drafts. They ask the agent to patch_cms_document for all 20 records, setting the 'isPublished' field to true in one go, bypassing manual UI clicks.
Auditing content structure changes
A Developer needs to know if a new schema type was added since yesterday. They ask the agent to list_unique_schema_types and compare that output against their local records, instantly verifying the CMS structure.
Creating related articles automatically
A user wants to create a new case study document based on an old one. They ask the agent to get_document_details for the original post's data and then use those fields to run a create_cms_document, saving the structured copy.
Sanity MCP tradeoffs
What to watch out for, and the recommended way to handle each one.
Treating content like files
A user tries to paste a whole JSON blob into the chat and expects it to update 50 records at once. This won't work because simple text input doesn't contain the necessary structured instructions for bulk changes.
For mass updates, you must use patch_cms_document or run_raw_mutation. For instance, if you need to change a field on all documents of type 'product', start by running count_entity_nodes to confirm how many records are affected.
Over-relying on the UI
The user manually navigates through 10 different tabs and forms in the CMS interface just to retrieve a list of unique types.
Instead, prompt your agent directly: 'list all unique schema types.' This uses list_unique_schema_types and gives you an immediate, clean list without any clicking or navigating.
Assuming data is simple
A user tries to write a query but forgets that the author's name needs to be linked across two different document types. The resulting query fails because it doesn't account for references.
You must use run_groq_query and structure your request using specific field joins, like *[_type == 'post'] | connectedTo('author'). This ensures the agent writes a complex, interconnected query.
When to use Sanity MCP
Use this MCP if your goal is to automate data access or write content logic. You need an intermediary layer that can understand natural language commands and translate them into precise, structured CMS operations (like querying relationships between documents). Don't use it if you just want to read a single page of content; the native CMS UI works fine for reading. Also, don't use this if your primary task is basic file hosting—use dedicated asset management tools for that. However, if your workflow requires 'read data -> process logic -> write new data,' then this MCP is essential because it allows your agent to perform all those steps sequentially using the available tools like run_groq_query and create_cms_document.
Frequently asked questions about Sanity MCP
How does Sanity MCP handle complex queries? +
It handles them by allowing your agent to execute GROQ (Graph-Relational Object Queries). This means you can ask questions that require linking data across multiple different content types, not just simple field searches.
Can Sanity MCP delete content permanently? +
Yes. It provides the wipe_cms_document tool to permanently remove records from your CMS. Be warned: this action is irreversible and should only be used when you are absolutely sure.
Does the Sanity MCP help with media assets? +
Absolutely. You can list all image and file assets using the list_media_assets tool, letting your agent manage or reference these files directly within your content workflows.
Is this better than just using the Sanity API directly? +
It's much easier. You don't need to write boilerplate API calls; you just talk naturally to your agent, and it translates those instructions into the correct tool commands for you.
What if I want to create a new document with specific attributes? +
You use the create_cms_document tool. You specify the desired schema type and provide all the necessary data points in a simple, structured format that the agent handles.