Be the first to get access to new connectors. Get early access →
ConnectorBay Early access

Sanity (BYOK) — connector documentation

  • MCP endpoint: https://byok-sanity.connectorbay.com/mcp
  • REST API: POST https://byok-sanity.connectorbay.com/v1/tools/{tool_name}, described by the OpenAPI 3.1 spec at https://byok-sanity.connectorbay.com/openapi.json
  • Transport: Streamable HTTP, stateless, MCP specification 2025-06-18 or later
  • Authentication: your own Sanity API token with read access (Viewer), sent in the X-Upstream-Key header of every request (never stored, logged or cached)
  • Health: https://byok-sanity.connectorbay.com/health · Tool schemas: https://byok-sanity.connectorbay.com/tools.json
  • Publisher: Unify Dynamics LLC · connectorbay.com/byok-sanity · agent@connectorbay.com

What Sanity (BYOK) is for

Sanity (BYOK) lets an AI assistant read your own Sanity data through the Sanity API with a key you supply (API token with read access (Viewer)). Read-only: 9 tools (run_groq_query, list_document_types, count_documents, list_documents, search_documents, list_recently_updated, get_document, get_dataset_summary, get_document_uncached). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to *.api.sanity.io. Unofficial connector by Unify Dynamics LLC: not affiliated with, endorsed by or sponsored by Sanity. Sanity and its logos are trademarks of their owners and are used only to say which service the connector works with.

Ask your assistant things like:

  • "Run the GROQ query *[_type == 'post'][0...5]{title} on my Sanity dataset"
  • "What document types are in my Sanity dataset?"
  • "How many posts are in my Sanity dataset?"
  • "List the latest posts in my Sanity dataset"
  • "Find Sanity documents about onboarding"
  • "What content changed most recently in my Sanity dataset?"

What it does

  • run_groq_query: Run a read-only GROQ query against a dataset, for example *[_type == 'post'][0...10]{title}. Returns the query result and server time. GET-length limits do not apply.
  • list_document_types: List the distinct document types (_type values) present in a dataset.
  • count_documents: Count the documents of one type in a dataset (drafts included).
  • list_documents: List documents of one type, most recently updated first, with id, type, dates, title (or name) and slug. Use start and end as a slice [start, end).
  • search_documents: Search documents whose title or name matches a word or prefix (GROQ match, e.g. 'launch*'), newest first.
  • list_recently_updated: List the most recently updated documents of any type (system documents excluded) with id, type, dates, title and slug.
  • get_document: Get one document by its _id from the query API (cached, may lag a few seconds). Draft documents have ids starting with 'drafts.'.
  • get_dataset_summary: Count all documents, draft documents and distinct types in a dataset.
  • get_document_uncached: Fetch one document by id straight from the backend, bypassing the cache (use sparingly).

BYOK key

You bring your own Sanity API token with read access (Viewer) (https://www.sanity.io/docs/content-lake/http-auth). Your assistant sends it in the X-Upstream-Key header with each request. ConnectorBay uses it for that one call only: it is never stored, logged or cached, never shown in an answer, and it is only sent to *.api.sanity.io over https, with no redirects followed. Create a key with the fewest permissions the tools need (read-only if the provider offers it), and revoke it at the provider whenever you like.

Data sources

Live from the Sanity API (*.api.sanity.io) with a BYOK key; documentation: https://www.sanity.io/docs/http-reference/query. Endpoints checked against that documentation on 2026-10-16.

What it is not

Unofficial connector by Unify Dynamics LLC: not affiliated with, endorsed by or sponsored by Sanity. Sanity and its logos are trademarks of their owners and are used only to say which service the connector works with. It is read-only: it never creates, changes, sends or deletes anything in your Sanity account.

Built for: Worldwide. Languages: English.