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.

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 documentPOSTCreates a new document in Sanity.
  • delete_documentDelete documentPOSTDeletes a document from Sanity.
  • get_documentGet documentGETRetrieves one or more documents by ID.
  • get_document_historyGet document historyGETRetrieves a specific historical revision of a document.
  • listenListenGETStreams real-time document change events via SSE.
  • queryQueryGETQueries content using GROQ query language.
  • query_postQuery postPOSTQueries content using GROQ via POST for large queries.
  • update_documentUpdate documentPOSTUpdates an existing document with patch operations.

Webhook, 6 operations

  • create_webhookCreate webhookPOSTCreates a new webhook for document or transaction events.
  • delete_webhookDelete webhookDELETEPermanently deletes a webhook.
  • get_webhookGet webhookGETRetrieves details of a specific webhook.
  • list_webhook_attemptsList webhook attemptsGETLists delivery attempts and execution history for a webhook.
  • list_webhooksList webhooksGETLists all webhooks configured for the project.
  • update_webhookUpdate webhookPATCHEnables or disables an existing webhook.

Asset, 2 operations

  • upload_fileUpload filePOSTUploads a file to Sanity assets.
  • upload_imageUpload imagePOSTUploads an image to Sanity assets.

Dataset, 2 operations

  • export_datasetExport datasetGETExports dataset content as newline-delimited JSON.
  • list_datasetsList datasetsGETLists all datasets in the Sanity project.

Transaction, 1 operation

  • get_transactionsGet transactionsGETLists 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