# Sanity MCP server

> Ask in plain English to find, edit and publish your Sanity documents, check schemas and manage datasets.

## Server URL

`https://mcp.sanity.io/` (Streamable HTTP)

- Sign-in: Sign in with Sanity
- Connect in RevampKey: https://revampkey.com/marketplace/sanity

## Agent skills (5)

- [Sanity MCP connector essentials: safe setup and usage with AI](https://revampkey.com/marketplace/sanity/skills/essentials.md): Sets the project, dataset and auth mode before any work, picks read, draft or publish tools in order of risk, and asks for explicit approval before every change to content, schema or configuration.
- [Import content into Sanity as drafts with AI](https://revampkey.com/marketplace/sanity/skills/content-draft-import.md): Turns a markdown or JSON source into Sanity draft documents, mapping fields and checking for collisions first. It writes drafts only and asks before any bulk write or publish.
- [Audit your Sanity content model with AI](https://revampkey.com/marketplace/sanity/skills/content-model-audit.md): Reads your deployed and workspace schemas to find unused types, orphaned fields and risky schema changes, and reports them. It never deploys a change, and it asks before switching projects or workspaces.
- [Sanity Dataset Health Check with AI: Audit Projects and Datasets](https://revampkey.com/marketplace/sanity/skills/dataset-health-check.md): Surveys your Sanity projects, datasets, studios, CORS origins and embeddings indices and reports what is misconfigured or unused. It only reads, and asks before changing anything.
- [Sanity draft cleanup review with AI: find stale drafts safely](https://revampkey.com/marketplace/sanity/skills/draft-cleanup-review.md): Finds stale or abandoned drafts and versions in a Sanity dataset, sorts them into keep, discard and publish-candidate groups, and asks before discarding or publishing anything.

All skills: https://revampkey.com/marketplace/sanity/skills.md

Sanity is a content operations platform. Teams store their content as structured documents, and the schemas that define those documents live in Sanity Studio, the editing interface you configure in code. Developers use Sanity to build content applications. Content and operations teams use it to edit, audit and publish content at scale.

Connect Sanity to RevampKey and you can ask the agent about your own projects. It can list your projects and datasets, read the schemas in your workspace, and run GROQ queries to find documents, such as blog posts missing a field. It can read a single document, create and patch documents, publish them and discard drafts. The agent asks before it changes anything.

## What you can do

### Find content gaps before a launch

Before a product launch, you ask which product documents have no description or no image. The agent runs a GROQ query against your dataset and lists the matching documents with their IDs. You read the list and decide what to fix. Nothing changes until you approve an edit.

### Update copy across several articles

Your team changes the refund wording in several help articles. You paste the new paragraph and ask the agent to update those articles. It reads each document and shows you the patched markdown for each one. After you approve, it saves the changes and publishes them.

### Check a schema before deploying it

You plan to add a field to your post type. You ask the agent to show the current schema in your workspace and any Sanity rules that apply. It reads both and summarizes what the new field would change. If you want the change deployed, the agent asks you first before it runs the deploy.

## Things to ask

- List my Sanity projects and the datasets in each one.
- Show me the schema for the post document type in my blog workspace.
- Find every product document that has no image and list their titles.
- Update the intro paragraph of the About page draft and ask me before publishing it.
- What does the Sanity documentation say about adding a CORS origin?

## What the agent can do

### Projects, datasets and access

See your organizations and projects, and check the Studios each project has. Create a new project or dataset, and add a CORS origin so an allowed site can reach your content.

`list_organizations`, `list_projects`, `create_project`, `get_project_studios`, `list_datasets`, `create_dataset`, `add_cors_origin`

### Schemas and rules

Read the schemas in your workspace and the Sanity rules that apply to them. Deploy a schema change when you ask for it. Use the migration guide to see how to move your content when a schema changes.

`list_workspace_schemas`, `get_schema`, `deploy_schema`, `get_sanity_rules`, `list_sanity_rules`, `migration_guide`

### Finding and reading documents

Run GROQ queries to find documents by type, field or value. Read a single document in full. Look up the embeddings indices in a dataset when you need them.

`query_documents`, `get_document`, `list_embeddings_indices`

### Writing and publishing content

Create documents from JSON or markdown, and patch existing ones. Create a version of a document, publish documents, or discard drafts. The agent shows you the change and asks before it saves or publishes.

`create_documents_from_json`, `create_documents_from_markdown`, `patch_document_from_json`, `patch_document_from_markdown`, `create_version`, `publish_documents`, `discard_drafts`

### Sanity documentation

Read Sanity's own docs when you want to check how a feature works. Ask a question and the agent looks up the answer in the docs before it replies.

`read_docs`

## FAQ

### What do I need to connect Sanity to RevampKey?

You need a Sanity account. Click Connect in RevampKey, then approve access on Sanity's own sign-in page. Sanity uses OAuth, so you do not paste API tokens into RevampKey. Once you approve, the agent can use the Sanity tools listed on this page.

### What can the Sanity agent do, and what can it not do?

It can list projects and datasets, read schemas, run GROQ queries, read and patch documents, publish, and discard drafts. It can also deploy schemas and add CORS origins. No tool is listed for deleting documents or datasets, so the agent cannot do those through this connector.

### Does the agent change my content without asking?

No. The agent asks before it changes anything, including creating, patching, publishing or deploying. Your content stays as it is until you approve. Check the agent's answers against your Sanity Studio before you rely on them.

### Can the agent work with my Sanity Studio schemas and GROQ queries?

Yes. The agent reads your workspace schemas and the rules that apply to them, so it knows your document types and fields. It can write GROQ queries against your dataset to find documents, and it can show you the results before any change is made.

### What is the Sanity MCP server URL?

The Sanity MCP server URL is https://mcp.sanity.io/. It uses the Streamable HTTP transport, so any client that supports remote MCP servers can connect to it.

### How does the Sanity MCP server authenticate?

With Sanity's own sign-in (OAuth). You approve access in your browser; no password is shared with the client.

### What can an AI agent do with the Sanity MCP server?

It exposes 24 tools: 16 that read and 8 that create or change things. In RevampKey the agent asks before it runs any tool that changes data.

### Are there agent skills for Sanity?

Yes. 5 SKILL.md playbooks teach an agent how to do real Sanity work step by step. RevampKey installs them when you connect Sanity; for Claude Code, Cursor or Codex you can copy them into your project.

## Tools (24)

- `add_cors_origin` (changes data)
- `create_dataset` (changes data)
- `create_documents_from_json` (changes data)
- `create_documents_from_markdown` (changes data)
- `create_project` (changes data)
- `create_version` (changes data)
- `deploy_schema` (changes data)
- `discard_drafts`
- `get_document`
- `get_project_studios`
- `get_sanity_rules`
- `get_schema`
- `list_datasets`
- `list_embeddings_indices`
- `list_organizations`
- `list_projects`
- `list_sanity_rules`
- `list_workspace_schemas`
- `migration_guide`
- `patch_document_from_json`
- `patch_document_from_markdown`
- `publish_documents` (changes data)
- `query_documents`
- `read_docs`

## Details

- Maker: Sanity
- Setup: Sign in with your account
- Category: Developer tools, Productivity
- Documentation: https://www.sanity.io/docs/ai/mcp-server

Page: https://revampkey.com/marketplace/sanity
