# Sanity [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/sanity-io/agent-toolkit  
**GitHub Stars:** 194  
**npm Downloads (last month):** 4251533  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sanity

## Description
Direct access to your Sanity projects (content, datasets, releases, schemas) and agent rules

## Tools
Capabilities this server exposes over MCP:

- **query_documents** — run GROQ queries directly
- **create_documents** — create draft documents from structured content, or version documents when a release ID is provided
- **patch_documents** — surgical edits to existing documents; published documents are edited by creating or updating drafts
- **deploy_studio** — deploy a hosted Studio bound to an MCP-managed schema
- **create_version** — create version documents for releases
- **whoami** — verify the authenticated Sanity user
- **get_project_studios** — list Studio applications linked to a project
- **give_feedback** — report MCP tool errors, missing capabilities, confusing output, or documentation issues

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "sanity": {
    "command": "npx",
    "args": ["-y","sanity@latest"]
  }
}
```

## Documentation

## What Sanity MCP server does

Sanity MCP server gives AI agents direct access to Sanity projects, including content, datasets, releases, schemas, and linked Studio applications. Its tools cover both read and write workflows: agents can execute GROQ queries, create structured documents, apply targeted edits, prepare release versions, deploy a hosted Studio, and confirm the currently authenticated Sanity user.

The toolkit also provides agent rules and guidance for Sanity development, content modeling, SEO/AEO, and experimentation. Those resources are separate from the MCP operations but are bundled into the broader agent toolkit for supported plugin and skills workflows.

## How it works

The hosted MCP endpoint is available at `https://mcp.sanity.io`. MCP-compatible clients connect to that URL and authorize access to a Sanity account. OAuth is the default authentication method for manual MCP configuration. A client that needs token-based access can send an `Authorization: Bearer <token>` header instead.

Agents call individual MCP tools rather than interacting with Sanity through a local project file. GROQ queries run against the connected Sanity data, while write operations create documents, drafts, patches, or release versions according to the request. Published documents are handled through drafts when they are edited.

Clients without native support for remote MCP servers can connect through `mcp-remote` using the HTTP-only transport. The toolkit also offers client plugins and agent-skill installations for supported environments.

## Setup and configuration

The Sanity CLI can configure MCP automatically for Cursor, Claude Code, and VS Code:

```bash
npx sanity@latest mcp configure
```

This uses the logged-in CLI user for authentication. Remote clients can instead be configured manually with `https://mcp.sanity.io` as the server URL. Claude Code and Codex provide command-line registration, while Cursor and VS Code accept JSON MCP configurations. Lovable, v0, Replit, and OpenCode provide their own connection flows and authenticate with OAuth.

If authentication stops working after setup, rerun the CLI configuration and restart the MCP client. Cursor and VS Code also expose controls for clearing or removing stored MCP authentication providers.

## Tools and capabilities

- `query_documents` runs GROQ queries directly against Sanity content.
- `create_documents` creates draft documents from structured content, or creates release versions when given a release ID.
- `patch_documents` applies focused changes to existing documents. Changes to published documents are made through draft creation or updates.
- `deploy_studio` deploys a hosted Studio associated with an MCP-managed schema.
- `create_version` creates version documents for releases.
- `whoami` checks the authenticated Sanity user.
- `get_project_studios` lists Studio applications associated with a project.
- `give_feedback` reports tool errors, unclear output, missing capabilities, or documentation problems.

## Limitations and notes

The available operations depend on the authenticated Sanity account and the projects it can access. Write actions may create drafts or release versions instead of changing published content directly. A release ID is required when creating versioned documents through `create_documents`. The server is remote by default, so clients must support remote MCP connections or use a compatible proxy.

_Full upstream README: https://allmcps.com/mcp/sanity/readme_

