- Home
- MCP Integrations
- Sanity MCP Server
Installation
Get StartedCreate a Gumloop Account
To use this MCP, you need a Gumloop account. If you don't have one yet, you can create one for free.
Copy Your Server URL
Copy your MCP server URL and add it to your client. You'll be prompted to authorize on first use.
Tools (34)
Get Schema
Fetch the deployed schema for a workspace. Resolves the best available source automatically — MCP-managed first, then Studio-deployed, then a legacy `system.schema` document.
List Workspace Schemas
List the deployed schemas for a project and dataset.
Deploy Schema
Deploy an MCP-managed schema for a workspace. Writes to MCP-managed workspaces and adopts legacy `system.schema` workspaces into MCP management on first call. Refuses Studio-deployed workspaces. Can add new types or overwrite existing types iteratively. When called on a legacy workspace, the existing types become the baseline; pass an empty `schemaDeclaration` to adopt the legacy types as-is, or pass new types to add them on top. IMPORTANT: Do not use this tool if a local Sanity Studio project exists. When local Studio files exist, modify them and deploy with `npx sanity@latest schema deploy` instead — using this tool would cause the deployed schema to diverge from your source. If a Studio-deployed schema already exists at the target workspaceName, this tool refuses. Either update the Studio source and deploy via CLI, or choose a different `workspaceName` for a new MCP-managed schema.
Deploy Studio
Deploy a managed Sanity Studio bound to an MCP-managed schema. Creates a hosted Studio whose URL follows the current environment — `sanity.studio` on production, `studio.sanity.work` on staging — and returns the concrete `studioUrl` in the response. Requires an existing MCP-managed schema at the same `(projectId, dataset, workspaceName)` address — call `deploy_schema` first if none exists. Re-run after subsequent `deploy_schema` calls so the deployed Studio picks up the latest schema.
Create Documents
Create one or more draft documents by directly providing structured content. Creates drafts (drafts.* prefix) unless releaseId is specified for version creation.
Create Version
Create a version document (versions.{releaseId}.* prefix) for a specific release. Versions are separate from drafts and published documents, and are used for scheduled release workflows.
Patch Documents
Update or edit one or more existing documents by applying precise modifications using @sanity/client patch() operations. Patches for each document are applied as a single transaction (all succeed or all fail). Edits are saved to the draft or release version; published content is never modified directly.
Query Documents
Query documents from Sanity using GROQ query language
Generate Image
Generate a new image in a document using AI. When targeting a published document, this creates or updates a draft with the generated image (published document remains unchanged). The draft must be published separately to make changes live. For image arrays, automatically adds a new array item. Note: Image generation is asynchronous and completes in the background.
Transform Image
Transform an existing image in a document using AI. When targeting a published document, this creates or updates a draft with the transformed image (published document remains unchanged). The draft must be published separately to make changes live. Note: Image transformation is asynchronous and completes in the background.
Get Document
Fetch a single document by its exact ID. This is a direct ID lookup only - it does not search, filter, or query. Use when you have a specific document ID and need its full content.
Publish Documents
Publish one or more draft documents to make them live
Ship Sanity agents in minutes
Connect any AI agent to 100+ MCP servers, zero setup.