Integration

Sanity integration

Unified content platform and headless CMS. Create, manage, and deliver structured content with real-time collaboration, powerful queries with GROQ, and flexible content modeling. Perfect for modern websites, apps, and omnichannel content delivery.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in Sanity.Built from the 19 Sanity tools below, on the connection you add once.

Common Sanity use cases

  • Change tracking
  • Page load
  • Audit trail
  • Data backup
  • File upload
  • Edit content
  • Image upload
  • Content audit
  • Real-time sync
  • Remove content

What you can do with Sanity

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Each badge shows the default agent permission of an endpoint (allowed: an agent calls it without asking; ask first: you are asked before an agent calls it, when the agent or chat asks permission for sensitive actions; never: no agent may call it), which every user can change endpoint by endpoint in their credential settings.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Document, 8 operations

  • create_documentCreate documentPOSTAgents: ask firstCreates a new document in Sanity.
  • delete_documentDelete documentPOSTAgents: ask firstDeletes a document from Sanity.
  • get_documentGet documentGETAgents: ask firstRetrieves one or more documents by ID.
  • get_document_historyGet document historyGETAgents: ask firstRetrieves a specific historical revision of a document.
  • listenListenGETAgents: ask firstStreams real-time document change events via SSE.
  • queryQueryGETAgents: ask firstQueries content using GROQ query language.
  • query_postQuery postPOSTAgents: ask firstQueries content using GROQ via POST for large queries.
  • update_documentUpdate documentPOSTAgents: ask firstUpdates an existing document with patch operations.

Webhook, 6 operations

  • create_webhookCreate webhookPOSTAgents: ask firstCreates a new webhook for document or transaction events.
  • delete_webhookDelete webhookDELETEAgents: ask firstPermanently deletes a webhook.
  • get_webhookGet webhookGETAgents: ask firstRetrieves details of a specific webhook.
  • list_webhook_attemptsList webhook attemptsGETAgents: ask firstLists delivery attempts and execution history for a webhook.
  • list_webhooksList webhooksGETAgents: ask firstLists all webhooks configured for the project.
  • update_webhookUpdate webhookPATCHAgents: ask firstEnables or disables an existing webhook.

Asset, 2 operations

  • upload_fileUpload filePOSTAgents: ask firstUploads a file to Sanity assets.
  • upload_imageUpload imagePOSTAgents: ask firstUploads an image to Sanity assets.

Dataset, 2 operations

  • export_datasetExport datasetGETAgents: ask firstExports dataset content as newline-delimited JSON.
  • list_datasetsList datasetsGETAgents: ask firstLists all datasets in the Sanity project.

Transaction, 1 operation

  • get_transactionsGet transactionsGETAgents: ask firstLists transaction history for a dataset.

Use Sanity from Claude Code, Cursor or Codex

Connect Sanity in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Sanity operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect Sanity

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect Sanity once

    Add your Sanity connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

Sanity integration FAQ

What can you do with the Sanity integration?

LiveContext exposes 19 operations on Sanity, covering document, webhook, asset and dataset. Common uses include Change tracking, Page load and Audit trail.

Popular integrations

Browse the whole catalog