# Sanity (MCP Server)

> Query, edit and publish Sanity content, schemas and assets with AI

- Type: MCP server
- Publisher: Sanity (official)
- Categories: Development, Writing
- Website: https://www.sanity.io/docs/compute-and-ai/mcp-server
- Transport: streamable-http
- Server URL: https://mcp.sanity.io
- Sign-in: oauth
- Listed: 2025-12-11

## About

Sanity's official remote MCP server lets agents query and patch documents, create versions and releases, publish content, deploy schemas and Studios, upload assets and run semantic search across datasets. It authenticates with OAuth by default, or with a bearer API token. It replaced Sanity's earlier local server, which is now deprecated.

## Install

1. **Connect it in ChatGPT** Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://mcp.sanity.io as the MCP server URL, then sign in with OAuth. Add it to a chat from the composer's tools menu.

2. **Or add it to Codex or the API**

   Codex CLI:

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

   config.toml:

   ```toml
   [mcp_servers.sanity]
   url = "https://mcp.sanity.io"
   ```

   Responses API:

   ```python
   import os
   from openai import OpenAI
   
   client = OpenAI()
   
   response = client.responses.create(
       model="gpt-6-astra",
       tools=[{
           "type": "mcp",
           "server_label": "sanity",
           "server_url": "https://mcp.sanity.io",
           "authorization": os.environ["SANITY_API_KEY"],
           "require_approval": "never",
       }],
       input="Find all blog posts missing an SEO description and draft one for each",
   )
   print(response.output_text)
   ```

## Tools

- `query_documents`
- `get_document`
- `create_documents`
- `patch_documents`
- `publish_documents`
- `create_release`
- `get_schema`
- `deploy_schema`
- `semantic_search`
- `list_projects`
- `search_docs`

## Example prompts

- "Find all blog posts missing an SEO description and draft one for each"
- "Translate the homepage document into German as a new version"
- "Add a 'readingTime' field to the article schema and deploy it"
- "Publish every draft in the spring-launch release"

## Also available as

- app: [Sanity](https://chatgptplugins.directory/apps/sanity.md)

## Related

- [Chrome DevTools MCP](https://chatgptplugins.directory/mcp/chrome-devtools.md): Let coding agents control and debug a live Chrome browser
- [Playwright MCP](https://chatgptplugins.directory/mcp/playwright.md): Browser automation for agents via Playwright accessibility snapshots
- [GitHub](https://chatgptplugins.directory/mcp/github.md): Manage repos, issues, pull requests and Actions from your AI agent
- [Context7](https://chatgptplugins.directory/mcp/context7.md): Pull up-to-date, version-specific library docs into your coding agent
- [Notion](https://chatgptplugins.directory/mcp/notion.md): Search, read, and write Notion pages, databases, and comments via hosted MCP
- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs

---
Source: https://chatgptplugins.directory/mcp/sanity · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
