# Sanity

> Query and edit Sanity content over a remote OAuth MCP — no token in a config file.

[Canonical HTML page](https://top-mcps.com/mcp/sanity) · [server.json](https://top-mcps.com/mcp/sanity.json) · [methodology](https://top-mcps.com/about/methodology)

## Install

### Claude Desktop — `claude_desktop_config.json`

Claude Desktop launches stdio servers, so mcp-remote bridges to the hosted endpoint and opens the sign-in in your browser. On Pro, Max, Team and Enterprise you can skip the file: Settings → Connectors → Add custom connector → https://mcp.sanity.io. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "mcpServers": {
    "sanity": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.sanity.io"
      ]
    }
  }
}
```

### Claude Code — `CLI or .mcp.json`

Then run /mcp inside Claude Code to finish the sign-in. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```shell
claude mcp add --transport http sanity https://mcp.sanity.io
```

### Cursor — `.cursor/mcp.json`

Global path: ~/.cursor/mcp.json. Cursor shows "Needs login" once it connects — click it to authorize. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "mcpServers": {
    "sanity": {
      "url": "https://mcp.sanity.io"
    }
  }
}
```

### VS Code — `.vscode/mcp.json`

VS Code uses the "servers" key. Run MCP: List Servers → Start Server and allow the sign-in. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```jsonc
{
  "servers": {
    "sanity": {
      "type": "http",
      "url": "https://mcp.sanity.io"
    }
  }
}
```

### Windsurf — `~/.codeium/windsurf/mcp_config.json`

Windsurf uses "serverUrl" for hosted servers. Open via Cascade → hammer icon → Configure. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "mcpServers": {
    "sanity": {
      "serverUrl": "https://mcp.sanity.io"
    }
  }
}
```

### Cline — `cline_mcp_settings.json`

Bridged through mcp-remote. Open via the Cline sidebar → MCP Servers → Edit. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "mcpServers": {
    "sanity": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.sanity.io"
      ]
    }
  }
}
```

### Continue — `~/.continue/config.json`

Continue takes the hosted URL directly in the transport block. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "streamable-http",
          "url": "https://mcp.sanity.io"
        }
      }
    ]
  }
}
```

### Codex CLI — `CLI`

Codex detects OAuth support and opens the browser to authorize. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```shell
codex mcp add sanity --url https://mcp.sanity.io
```

### Zed — `~/.config/zed/settings.json`

Bridged through mcp-remote under "context_servers". Settings live-reload on save. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```jsonc
{
  "context_servers": {
    "sanity": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "mcp-remote",
          "https://mcp.sanity.io"
        ]
      }
    }
  }
}
```

### ChatGPT — `ChatGPT → Settings → Connectors (remote URL)`

Paste this into Settings → Connectors → Add custom connector. Requires ChatGPT Pro / Team / Enterprise / Edu with Developer mode enabled.

```json
{
  "name": "Sanity",
  "transport": "http",
  "url": "https://mcp.sanity.io"
}
```

## At a glance

- **Maintainer:** Sanity
- **Transport:** Streamable HTTP
- **Auth model:** OAuth 2.1
- **Required secrets:** None
- **Supported clients:** Claude, Cursor, VS Code, Codex, Replit, Any MCP-compatible client, Sanity projects
- **Language:** TypeScript
- **Latest version:** latest
- **Last verified:** 2026-09-17
- **GitHub stars:** 183 (fetched 2026-10-15T10:09:13.500Z)
- **Score:** 75/100 (rubric 2026-09 — see https://top-mcps.com/about/methodology)
- **Source:** https://github.com/sanity-io/agent-toolkit
- **Homepage:** https://www.sanity.io/docs

## Security & scope

- **Access scope:** read-write
- **Sandbox:** Datasets are the isolation boundary — point the agent at a development dataset before production.
- **Gotchas:**
  - OAuth grants the signed-in user's access, which on a personal account is usually every project you can see. Authorize from an account scoped to the project you mean.
  - The local `@sanity/mcp-server` npm package is published as DEPRECATED and tells you to use the hosted endpoint. Anything still pinned to it is running unmaintained code.
  - Drafts and published documents are different records in Sanity. An agent that patches the published document bypasses the draft review step entirely.

## Quick answer

**What it does.** Gives agents access to Sanity projects: browse datasets and schema, query and read documents, create and patch drafts, and work with releases. Configuration is one URL plus an OAuth authorization, or `npx sanity@latest mcp configure` to wire it up from an already-logged-in CLI.

**Best for:**
- GROQ-shaped content queries from an agent
- Drafting and patching documents
- Schema-aware content audits
- OAuth instead of a stored project token
- Content releases

**Not for:**
- Page layout and design
- Self-hosted-only requirements
- Teams still pinned to the deprecated local npm package

## Description

Sanity's official MCP server is hosted at `https://mcp.sanity.io` and authenticates with OAuth. It reaches projects, datasets, documents, schema and releases, so an agent can query content with GROQ, draft and patch documents, and work with content releases. The old local `@sanity/mcp-server` npm package is deprecated in favour of this endpoint.

## Why it matters

Sanity models content as queryable structured documents rather than fixed page records, which is the shape an agent handles best — it can ask "every post referencing this author" as a query instead of paging a list. The remote-plus-OAuth setup also removes the long-lived project token that every local CMS MCP asks you to paste.

## Key features

- Official hosted MCP at mcp.sanity.io
- OAuth in Claude, Cursor, Codex, VS Code and Replit
- `npx sanity@latest mcp configure` reuses your CLI login
- Deprecated local package explicitly points here
- Schema-aware: the agent can read the content model

## FAQ

### Do I need a token?

No. The supported path is the hosted endpoint at `https://mcp.sanity.io` with OAuth. `npx sanity@latest mcp configure` goes one better and reuses the login your Sanity CLI already has.

### What happened to the npm package?

`@sanity/mcp-server` is published with a DEPRECATED description pointing at the remote server. Treat any config still referencing it as something to migrate.

### Why no tool table?

The server is remote and OAuth-gated, so it cannot be run and probed without a Sanity account. This directory only lists tool names it has read back from a running server.

## Changelog

- **2026-09-17** — Refreshed install snippets and fact sheet; verified for 2026.
