> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sanity (MCP)

> Connect AI tools to Sanity via the Model Context Protocol (MCP) to query and manage content, schemas, and releases

## 🚀 Quickstart

Connect to the Sanity MCP server with Nango and call MCP tools in minutes. Sanity MCP uses OAuth 2.0 with **dynamic client registration**, so no app registration is required.

**1. Create the integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) → *Configure New Integration* → *Sanity (MCP)*.

**2. Authorize Sanity**

Go to [Connections](https://app.nango.dev/dev/connections) → *Add Test Connection* → *Authorize*, then log in to your Sanity account. Later, you'll let your users do the same directly from your app.

**3. Call the Sanity MCP API**

Make your first MCP request (initialize handshake). Replace the placeholders below with your [API key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] cURL
>
> ```bash theme={null}
> curl "https://api.nango.dev/proxy/v2/mcp" \
>   -X POST \
>   -H "Authorization: Bearer <NANGO-API-KEY>" \
>   -H "Provider-Config-Key: <INTEGRATION-ID>" \
>   -H "Connection-Id: <CONNECTION-ID>" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "jsonrpc": "2.0",
>     "id": 1,
>     "method": "initialize",
>     "params": {
>         "protocolVersion": "2024-11-05",
>         "capabilities": {},
>         "clientInfo": {
>             "name": "nango-client",
>             "version": "1.0.0"
>         }
>     }
> }'
> ```

> [tab] Node
>
> Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
>
> ```typescript theme={null}
> import { Nango } from '@nangohq/node';
>
> const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });
>
> const res = await nango.post({
>     endpoint: '/v2/mcp',
>     providerConfigKey: '<INTEGRATION-ID>',
>     connectionId: '<CONNECTION-ID>',
>     body: {
>         jsonrpc: '2.0',
>         id: 1,
>         method: 'initialize',
>         params: {
>             protocolVersion: '2024-11-05',
>             capabilities: {},
>             clientInfo: {
>                 name: 'nango-client',
>                 version: '1.0.0'
>             }
>         }
>     }
> });
>
> console.log(res.data);
> ```

✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/auth/auth-guide.md) to integrate Nango in your app.

## 📚 Sanity (MCP) guides

Nango uses **dynamic client registration** with Sanity's MCP OAuth server. You do not need to register an MCP application — just create the integration in Nango and authorize with your Sanity account.

Sanity's MCP server exposes tools for schema exploration and deployment (`get_schema`, `deploy_schema`, `deploy_studio`), document operations (`create_documents`, `patch_documents`, `query_documents`, `publish_documents`), release management (`create_release`, `list_releases`), and project administration (`list_projects`, `create_dataset`, `add_cors_origin`), among others.

Official resources: [Sanity MCP server](https://www.sanity.io/docs/ai/mcp-server)

## 🧩 Pre-built syncs & tools for Sanity (MCP)

Explore Nango-provided tools in your dashboard. [Extend and customize them](https://nango.dev/docs/guides/functions/functions-guide.md) to fit your needs.

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.