> ## 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.

<Steps>
  <Step id="create-integration" title="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)*.
  </Step>

  <Step id="authorize-sanity" title="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.
  </Step>

  <Step id="call-sanity-mcp" title="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):

    <Tabs>
      <Tab title="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>

      <Tab title="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({ secretKey: '<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);
        ```
      </Tab>
    </Tabs>

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

  <Step id="implement-nango" title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/auth/auth-guide) to integrate Nango in your app.
  </Step>
</Steps>

## 📚 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 & actions for Sanity (MCP)

Enable them in your dashboard. [Extend and customize](/guides/functions/functions-guide) to fit your needs.

***
