Sanity MCP server: GROQ and mutations from Claude and ChatGPT

The Ryze AI Sanity MCP server gives Claude, ChatGPT and Cursor 3 tools: run GROQ queries, create or patch documents with a dry run, and delete by id. It uses the same URL as the other Ryze AI platforms, so one chat can check Sanity content next to Search Console or ad data (see Setup).

  • Any plan
  • Editor token
  • 3 tools
Claude logoChatGPT logoCursor logoGrok logo

One connector for Claude, ChatGPT, Cursor and Grok Bot

Query your Sanity dataset in chat, then approve any change

Runs GROQ against the connected dataset. In Claude, set write and delete tools to Needs approval so nothing changes until you say so.

Try asking

Nine content jobs for a Sanity blog

Find content gaps with a query

  • Posts with an empty slug, title or description field
  • Ids returned so the next step can target them

Review what is still unpublished

  • Query drafts alongside published documents
  • A list of draft-only posts by creation date

Check a bulk edit before it writes

  • dryRun validates the mutation without changing the dataset
  • Apply it only after you read the result

Fill a missing field on many posts

  • Patch mutations as drafts for Studio review
  • Plain ids when you want the change live

Rewrite weak descriptions

  • Search Console clicks for each post URL first
  • Updated copy saved as drafts you approve

Track Content Plan articles

  • Articles published as documents of your post type
  • Check slugs before the next article goes out

Match posts to traffic

  • Post slugs read from Sanity
  • GA4 sessions for the same pages

Copy author and category links

  • Reference fields read from your newest posts
  • Orphaned category documents listed

Remove duplicates you confirm

  • Delete by id, with drafts when you name them
  • Hold the delete tool for approval in Claude

01 · Overview

What the Ryze AI Sanity MCP server is

The short version

  1. 01Each article publishes as a published document of your blog post type, with images uploaded as Sanity assets. Ryze AI learns the fields from your newest posts.
  2. 02Three tools: query runs GROQ, mutate creates, replaces or patches documents with an optional dry run, and delete removes documents by id.
  3. 03Article publishing only touches the documents Ryze AI created. The agent tools run with your Editor token and can reach every document in the dataset.
  4. 04Static builds on Next.js or Astro need a rebuild hook, for example a Sanity webhook, before new articles go live (see Compare and Setup).
  5. 05Works with any Ryze AI plan or trial. SEO Starter is $129/mo with a 3-day free trial.
sanity · server specOAuth
Server name
Ryze AI (Sanity tools)
Endpoint
https://connector.get-ryze.ai/mcp
Transport
Remote MCP over HTTP
Client sign-in
OAuth to Ryze AI, up to 20 workspaces per connection
Sanity sign-in
Project ID, Editor API token, optional dataset (default production), blog URL
Scope of a connection
One Sanity project and dataset per workspace
Sanity tools
3 (1 read, 1 write, 1 delete)
Also on this URL
Google Ads, Meta Ads, TikTok Ads, GA4, Search Console, Shopify
Price
Any Ryze AI plan or trial, SEO Starter $129/mo
Checked
November 8, 2026

“Sanity MCP” names more than one thing. Sanity hosts its own MCP server at https://mcp.sanity.io for working on Sanity projects: content, schemas, datasets and releases. Community servers exist on GitHub. The Ryze AI server is a hosted connector that adds three Sanity tools next to the Ryze AI SEO publishing flow and its ad tools. This page documents the Ryze AI one and compares it with Sanity’s in section 06.

01

GROQ in plain chat

sanity__query runs a GROQ query against the connected dataset and can read published documents, drafts or both, so the agent can count posts, list slugs or find documents with an empty field.

02

Transactional mutations

sanity__mutate takes create, createOrReplace, createIfNotExists and patch mutations in one transaction. Sanity applies a transaction fully or not at all.

03

Dry run before writing

Set dryRun and the mutation is validated without changing the dataset. Ask for it first whenever a prompt touches more than a few documents.

04

Published or draft, by id

A plain document id publishes at once. An id that starts with drafts. leaves a draft for an editor to review in Studio.

05

Delete in its own tool

sanity__delete removes documents by id, and removes their drafts when those ids are given. Keeping it separate lets you allow edits and hold removals for approval.

06

Article publishing

Ryze AI SEO publishes each Content Plan article as a published document of your blog post type, with images uploaded as Sanity assets.

07

Fields learned from your posts

Ryze AI reads the fields from your newest published posts and copies author and category references when every recent post has them.

08

Connect from inside the chat

Sanity can also be connected from Claude or ChatGPT with a one-time connection link, as long as the workspace has no Sanity connection yet.

02 · Tool reference

Three Sanity tools: query, mutate, delete

The names below come from the Ryze AI app source. Sanity is not connected in any test workspace yet, so the tool list was not seen live. Confirm it in your client after connecting.

ToolAccessWhat it doesInput
sanity__queryreadRuns a GROQ query against the connected dataset. It reads published documents, drafts, or both.GROQ query, published and/or drafts
sanity__mutatewriteRuns create, createOrReplace, createIfNotExists or patch mutations in one transaction. A plain document id publishes immediately, a drafts. id leaves a draft, and dryRun validates without writing.mutations, dryRun
sanity__deletedeleteDeletes Sanity documents by id, including their drafts when those ids are given.document ids

A GROQ query, as the agent writes it

sanity__querygroq
*[_type == "post" && !defined(slug.current)]{
  _id, title, _createdAt
} | order(_createdAt desc)

Posts with no slug, newest first. The type name post is whatever document type you picked when you connected Sanity.

A mutation, validated first

sanity__mutate · dryRun: truejson
{
  "mutations": [
    { "patch": { "id": "drafts.<post id>", "set": { "seoDescription": "..." } } }
  ],
  "dryRun": true
}

The shape follows Sanity’s Mutate API. The drafts. prefix keeps the change as a draft; a plain id would publish it. Sanity’s own reference lists the mutation types and the dry run flag in the Mutate API docs. Ad and analytics tools on the same URL are documented on Google Ads MCP, Meta Ads MCP and Google Analytics MCP.

03 · Use cases

Publishing rules, then prompts for your content dataset

Ryze AI SEO publishes through its own pipeline, and the agent tools work on the same dataset. The rules differ, so read them before you write a prompt that changes documents.

PublishEach Content Plan article becomes a published document of the post type you picked, with images uploaded as Sanity assets.
RepublishRyze AI updates only its own document and keeps the fields it does not manage. Edits made in Studio to that document are replaced on the next republish.
UnpublishDeletes the document Ryze AI created, and its draft.
Documents it did not createRyze AI publishing never edits or deletes posts it did not create. If one of your posts already uses the same slug, publishing stops until the article slug is renamed.
Agent tools are differentThe rule above describes article publishing. sanity__mutate and sanity__delete run with your Editor token and can change any document in the dataset. Whether the mutate tool limits itself to documents Ryze AI created is not documented, so assume it does not.
Headless front endsA static site on Next.js or Astro needs its own rebuild trigger. A Sanity webhook that calls your host's deploy hook makes new articles go live.
Read with GROQ
  • “List every post of our blog type with no slug, newest first, and show the ids.”
  • “Count published posts per author and show the authors with fewer than 3.”
  • “Which posts still exist only as drafts?”
Check, then write
  • “Dry run: set the category reference on these 5 posts to the category I name, and show what would change.”
  • “Create a draft post with the title and body I paste, using the same fields as our latest published post.”
  • “Patch the seoDescription field on the 4 posts I list, as drafts, so I can review them in Studio.”
Publishing checks
  • “Which posts were updated in the last 30 days, newest first?”
  • “Find posts whose slug is used by more than one document.”
  • “List posts without a cover image so I can decide which to refresh first.”
Cleanup (delete on approval)
  • “Find test documents whose title starts with the word Test and list their ids. Do not delete anything yet.”
  • “Delete these 2 duplicate posts and their drafts after I confirm each id.”
  • “Show orphaned category documents that no post references.”

Every answer comes from your own dataset, so no sample output is shown here. The full publishing workflow is described in the Ryze AI Sanity guide.

04 · Setup

Connect Sanity once, then add the URL to each client

Step 1: connect Sanity in Ryze AI

  1. 01At sanity.io/manage open the project and copy the Project ID.
  2. 02Open API, then Tokens, click Add API token, choose Editor permissions and copy the token.
  3. 03In Ryze AI open Integrations and click Connect on the Sanity card.
  4. 04Enter the Project ID, the token, an optional dataset (default production) and the public Blog URL, then click Continue.
  5. 05Pick the document type your blog posts use. The dataset needs at least one published post of that type.

Screens for each step are in the Ryze AI Sanity guide. A Viewer token is rejected.

Step 2: add the Ryze AI connector to your client

The connector URL is the same for every client:

Connector URLtext
https://connector.get-ryze.ai/mcp

Claude on the web or desktop

  1. 01Go to Customize, Connectors.
  2. 02Choose + Add, then Add custom connector. Enter Ryze AI as the name and https://connector.get-ryze.ai/mcp as the URL. Leave Authentication on a sign-in option, not No sign in.
  3. 03Press Connect, sign in to Ryze AI, tick the workspace that holds Sanity and press Allow connection.
  4. 04Start a new chat.

Any Claude plan works, and Free allows one custom connector. On Team and Enterprise an Owner adds the connector first and each member then clicks Connect.

ChatGPT

OpenAI documents custom MCP servers for ChatGPT Business and Enterprise/Edu on the web, where an admin or owner creates them, and read and fetch only on Pro. Open Plugins, choose the plus button, then Add custom MCP server, name it Ryze AI, enter the URL, pick OAuth, create it and sign in to Ryze AI. Plan rules for ChatGPT differ between OpenAI’s article and older guides, so check your plan in OpenAI’s help center. Write tools such as sanity__mutate need a plan with write actions.

Cursor

.cursor/mcp.jsonjson
{ "mcpServers": {
  "ryze": { "url": "https://connector.get-ryze.ai/mcp" }
} }

Cursor runs OAuth the first time a tool is used. The Add to Cursor link on the developer page writes the same entry.

Claude tool cache

Claude keeps the tool list from the moment the connector is added. If you connect Sanity after the connector, remove the Ryze AI connector, add it again and start a new chat. ChatGPT also stores the tool list, so remove and re-add it there as well.

You can also connect Sanity from inside Claude or ChatGPT with a one-time connection link. The link is refused while a Sanity connection already exists in the workspace.

05 · Permissions

What the Editor token reaches, and how to revoke it

Who can connectAnyone who can create an Editor token for the project and copy its Project ID. Sanity says robot tokens need a developer, admin or equivalent custom role to create.
Token levelEditor. A Viewer token is rejected when you connect, because it cannot publish.
What the token reachesThe one project and dataset you entered. Editor access covers every document in that dataset, so the agent's mutate and delete tools can reach all of them.
Dataset prerequisiteThe dataset needs at least one published post of the chosen type, so Ryze AI can learn the fields before it publishes.

Fields Ryze AI needs when you connect:

FieldWhere it comes from
Project IDAt sanity.io/manage open the project and copy the Project ID.
API tokenOpen API, then Tokens, click Add API token, choose Editor permissions and copy the token. Sanity shows it once.
DatasetOptional. The default is production.
Blog URLThe public URL your site serves posts under.
Document typePick the document type your blog posts use.

Removing access

In Sanity, delete the token under API, Tokens in sanity.io/manage; Sanity says deletion revokes it immediately. In Ryze AI, open View on the Sanity card and use the trash icon. In Claude, open Customize, Connectors, Ryze AI and click Disconnect, which cuts off every workspace at once. A workspace holds one Sanity connection, tied to one project and dataset.

06 · Compare

Ryze AI vs Sanity’s own MCP server

Three things called Sanity MCP

OptionBuilt forHow you connectWhat it coversChanges
Ryze AI Sanity toolsSEO teams that publish articles to Sanity and also run adsProject ID and Editor token in Ryze AI, then OAuth from the clientGROQ query, mutate with dryRun, delete, plus article publishingCreate, replace, patch, delete by id
Sanity MCP server (mcp.sanity.io)Developers and editors working on Sanity projectsOAuth by default, or an API token in the Authorization headerContent, releases and versions, media assets, schemas, projects and datasets, docs search, image generationDocuments, schemas, datasets, CORS and releases
Community servers on GitHubDevelopers who self-hostVaries by repoDepends on the repoDepends on the repo

Source: Sanity MCP server docs, checked Nov 8, 2026. Sanity lists v2.46.0 from Nov 3, 2026 as the latest version, and says OAuth sessions expire after about 7 days and that custom validation rules are skipped when it runs over MCP.

Side by side

Ryze AISanity MCP server
Who sets it upSomeone who can create an Editor token, then adds one URL in the clientA developer or editor who adds mcp.sanity.io to the client or runs the Sanity CLI configure command
Hosted athttps://connector.get-ryze.ai/mcphttps://mcp.sanity.io, run on Sanity's infrastructure
Sign-inOAuth to Ryze AI after the token is stored in Ryze AIOAuth, or an API token in the Authorization header
Content tools3: query, mutate, deleteMany: query, create, patch and publish documents, drafts, releases, validation
Schema and project adminNot offeredDeploy schemas, manage datasets and CORS origins, create projects
MediaArticle images uploaded as assets during publishingUpload from URLs, files or ChatGPT attachments, Media Library tools
Publishing articles on a planContent Plan articles publish as documents, up to 3 a weekdayNot a publishing queue
Other data in the same chatGoogle Ads, Meta Ads, TikTok Ads, GA4, Search Console, ShopifySanity only
PriceAny Ryze AI plan or trial. SEO Starter $129/mo, 3-day free trialNeeds a Sanity account, with a free tier. Image generation uses AI credits

As published on Nov 8, 2026. Sanity adds tools often, so check its list before you decide.

Which to pick: if the work is building a Sanity project, changing schemas, managing datasets or releases, or generating images, Sanity’s own server covers far more. If the job is publishing SEO articles to a Sanity blog and checking the results next to Search Console or ad data in one chat, the Ryze AI connector fits. Both can run in the same client.

07 · API limits

Sanity limits an agent runs into

Mutations25 requests per second per IP, shared by POSTs to /data/mutate and /data/actions. Up to 100 concurrent mutations per dataset.
QueriesUp to 500 concurrent queries per dataset and a 1 minute execution timeout. The global limit is 500 requests per second per IP.
Mutation payload4 MB per mutation request. Mutations time out after 3 minutes.
Document size32 MB per document, up to 1,000 attributes on Free and Growth plans and 8,000 on Enterprise, nested at most 20 levels deep.
Asset uploads25 requests per second per IP.
Sanity's own MCP serverSanity says query results larger than 64 KiB are rejected, and a patch call handles at most 25 documents. These limits are documented for mcp.sanity.io; Ryze AI does not publish whether its tools apply the same caps.
Long GROQ queriesGET requests are limited by URL length; Sanity recommends POST once a query passes about 11 KB.
CDN and perspectivesThe API CDN host serves only the published and raw perspectives. Drafts need the uncached API host.
Ryze AI planThe tools need an active Ryze AI plan or trial. SEO Starter Content Plan allows up to 90 articles per billing cycle and up to 3 a weekday.
Client plansClaude: any plan, with one custom connector on Free. ChatGPT: custom MCP servers on Business and Enterprise/Edu, read and fetch only on Pro.

From Sanity’s technical limits and Query API pages, checked Nov 8, 2026. Sanity’s query reference sets no hard result size or request rate beyond these.

08 · Approvals and safety

How you keep control of edits

Approvals in Claude

Under Customize, Connectors, Ryze AI, Tool permissions, set each tool. The help center recommends Needs approval for the write and delete tools.

Approvals in the Ryze AI app

The Tool approvals picker in the chat defaults to Skip all approvals. Switch to Approve write & delete or Manual approve in the message box; the choice is remembered in that browser.

Publishing mode

Article publishing follows Publishing mode under SEO, Preferences, Publishing: Automatic (the default) or Manual.

Dry run first

Ask for dryRun before any mutation that touches several documents. Sanity validates it without writing.

Plain ids publish

A mutation with a plain document id goes live on the site. Use a drafts. id when an editor should review first.

09 · Errors and fixes

Sanity connection errors and fixes

Message or symptomCauseFix
Connect fails with a permission errorThe token has Viewer permissions.Create a new token with Editor permissions in sanity.io/manage under API, Tokens, and connect again.
Publishing says there is no post to learn fromThe dataset has no published post of the chosen type.Publish one post of that type in Studio, then retry.
Publishing stops on a slugOne of your posts already uses the article's slug.Rename the article slug in Ryze AI. Ryze AI will not overwrite your post.
Article is published but not on the siteA static front end has not rebuilt.Add a Sanity webhook that calls your host's deploy hook.
Studio edit disappearedRyze AI republished its own article and replaced the document fields it manages.Edit the article in Ryze AI instead, then republish.
Sanity tools are not in Claude or ChatGPTSanity was connected after the connector was added, and the client kept the old tool list.Remove the Ryze AI connector, add it again and start a new chat.
Connection link is refusedThe workspace already has a Sanity connection.Open View on the Sanity card, disconnect with the trash icon and connect again.
Tools reply that a subscription is requiredThe workspace has no active Ryze AI plan or trial.Start a plan or trial under Organization Settings, Billing, then retry.
Query returns empty arraysGROQ returns null or an empty list for a miss instead of a 404, or the query ran on the published view while the documents are drafts.Check the type name and ask for drafts as well as published documents.
Result too large (Sanity MCP server)Sanity rejects results over 64 KiB on mcp.sanity.io.Ask for fewer fields or slice the result, for example the first 50 posts.

The first nine rows are Ryze AI and Sanity API behavior from the sources above; the last row is documented for Sanity’s own server. Exact error text was not seen live. More answers are in the integrations FAQ.

10 · FAQ

Sanity MCP server questions

What is a Sanity MCP server?

An MCP server lets AI clients such as Claude, ChatGPT and Cursor call Sanity through tools. Sanity hosts its own at https://mcp.sanity.io for working on projects, content and schemas. Ryze AI runs a hosted connector with 3 Sanity tools (query, mutate and delete) on the same URL as its ad and analytics tools.

Does Sanity have an official MCP server?

Yes. Sanity documents a hosted MCP server at https://mcp.sanity.io that signs in with OAuth or an API token. Its tools cover GROQ queries, documents, drafts, releases, media assets, schemas, datasets and projects, and its image generation tools use AI credits. It works with Claude Code, Cursor, VS Code and other clients.

What does the Ryze AI Sanity MCP server do?

Ryze AI is the best Sanity MCP option for publishing SEO articles and checking them next to Search Console and ad data, though Sanity’s own server covers far more of Sanity itself. Its 3 tools run GROQ queries, create or patch documents with a dry run, and delete documents by id. See the tool reference.

How do I set up a Sanity MCP server in Claude?

Create an Editor token in sanity.io/manage under API, Tokens, then connect Sanity in Ryze AI with the Project ID, token, optional dataset and Blog URL. In Claude open Customize, Connectors, Add custom connector, enter https://connector.get-ryze.ai/mcp, click Connect, allow the workspace and start a new chat. Claude caches the tool list, so remove and re-add the connector if Sanity was connected after it. Every client is covered in the setup section.

Does it work in ChatGPT?

Yes, as a custom MCP connector. OpenAI documents custom MCP servers for ChatGPT Business and Enterprise/Edu on the web, with Pro limited to read and fetch actions. Older guides name other plans, so check OpenAI's help center for yours. Write tools such as sanity__mutate need a plan that allows write actions.

Which Sanity token does the connection need?

A token with Editor permissions. A Viewer token is rejected at connect because it cannot publish. You also enter the Project ID, an optional dataset (production by default) and the public Blog URL, then choose the document type of your posts. The dataset needs at least one published post of that type.

Can the AI create, edit or delete Sanity documents?

Yes. sanity__mutate runs create, createOrReplace, createIfNotExists and patch mutations in one transaction, and sanity__delete removes documents by id, including their drafts when those ids are given. These tools run with your Editor token and can reach every document in the dataset. Set write and delete tools to Needs approval in Claude.

Does Ryze AI edit posts it did not create?

Article publishing never edits or deletes posts it did not create. Republishing updates only Ryze AI's own document, and Unpublish deletes only that document and its draft. The agent tools are different: they use your Editor token. Whether the mutate tool limits itself to Ryze AI documents is not documented, so treat it as able to change any document.

Does it publish as a draft or live?

Content Plan articles publish as published documents of your blog post type, with images uploaded as Sanity assets, and Publishing mode (Automatic or Manual) in SEO, Preferences, Publishing controls when. For agent mutations, a plain document id publishes immediately and an id that starts with drafts. leaves a draft.

Why is my article published in Sanity but not on my site?

A static front end such as Next.js or Astro needs a rebuild before new documents appear. Add a Sanity webhook that calls your host's deploy hook. Also check the slug: if one of your posts already uses it, publishing stops until the article slug is renamed.

Is the Sanity MCP server free?

Sanity’s own server needs a Sanity account, which has a free tier, and its image generation tools use AI credits. Adding the Ryze AI connector costs nothing, but its tools need a Ryze AI plan or trial: SEO Starter $129/mo with a 3-day free trial, Paid Ads $89/mo with a 7-day free trial or Agency $279/mo, with 30% off the first year on annual billing. See the pricing page.

Can I connect more than one Sanity project?

Not in one workspace. A workspace holds one Sanity connection, tied to one project and dataset. To switch, click View on the Sanity card, disconnect with the trash icon and connect again. A connection link is refused while a Sanity connection already exists.

11 · Compatibility

Where the Sanity tools run

Claude (web & desktop)01
ChatGPT02
Cursor03
Grok Bot04
Own agents (API key)05
Any remote MCP client06

12 · Related

Other integrations and guides

Sources and changelog

Page checked Nov 8, 2026. First version. Ryze AI details come from the Ryze AI help center and the Ryze AI app source. The tool names were not seen live.

Sanity sources: MCP server, Query API, Mutate API, technical limits and API authentication.

Editor token · 3 Sanity tools · SEO publishing on the same connection

Bring Sanity into your AI chat

The Sanity tools work with any Ryze AI plan or trial. SEO Starter is $129/mo with a 3-day free trial; Paid Ads is $89/mo with a 7-day free trial. Annual billing takes 30% off the first year.

Nothing to host · Dry run before writes · Deletes can wait for your approval