Sanity for AI agents

Sanity is a headless CMS that stores structured content as documents, giving developers an API to build and manage content for websites and apps. Connect it once through Arc0, and your agent, or Claude, ChatGPT and Cursor, can use it through one MCP endpoint, limited to what each user approved.

Developer toolsAPI keyMCP + RESTsanity.io
AUDIT LOG · SANITYPOLICY: acme-support
09:41:07 · claude · u_8f2read
sanity.list_org_roles
List Organization Roles✓ allowed · 212ms
09:41:08 · claude · u_8f2read
sanity.get_role
Get Role✓ allowed · 164ms
09:41:09 · claude · u_8f2write
sanity.create_prompt_post
Create Prompt Post✓ approved · approved by user
09:41:12 · claude · u_8f2destructive
sanity.delete_document
Delete Document✕ blocked · policy: deny
EVERY SANITY CALL, ON THE RECORD
01 · USE CASES

What agents do in Sanity.

01

Fetch a document by its ID

Reads a specific content document, such as a blog post or product entry, before editing it.

02

Assign a default role to users

Grants project users a default role so they get the right level of access to content.

03

Delete a document only after confirmation

Removes an outdated document from the content dataset only once the request is confirmed.

02 · ACTIONS

21 Sanity actions, graded by risk.

Every Sanity action is tagged read, write or destructive, so one policy covers the whole app and new actions inherit the right default.

read

13

Look things up. Allowed by default.

  • sanity.get_role
    Get Role
  • sanity.get_users
    List Resource Users
  • sanity.get_robots
    Get Robots
  • sanity.get_project
    Get Project
  • sanity.get_document
    Get Document by ID
  • sanity.get_org_role
    Get Organization Role
  • sanity.get_permission
    Get Permission
  • sanity.list_org_roles
    List Organization Roles
  • sanity.query_documents
    Query Documents
  • sanity.get_invite_by_token
    Get Invite By Token
  • sanity.query_all_screening
    Query All Screening
  • sanity.list_user_attributes
    List User Attributes
  • sanity.validate_credential
    Validate Credential

write

5

Create and change things. Allow, or ask the user first.

  • sanity.update_org_acl
    Update Organization ACL
  • sanity.create_prompt_post
    Create Prompt Post
  • sanity.create_attr_definition
    Create Attribute Definition
  • sanity.add_default_role_to_users
    Add Default Role to Users
  • sanity.update_user_attributes_values
    Update User Attributes Values

destructive

3

Delete, cancel or archive. Ask first, or deny outright.

  • sanity.delete_document
    Delete Document
  • sanity.delete_attr_definition
    Delete User Attribute Definition
  • sanity.delete_user_attributes
    Delete User Attributes
03 · HOW IT WORKS

Sanity in three steps.

  1. 01Your users connect SanityThey add their Sanity api key on Arc0 Connect, under your brand. It goes straight into the vault.
  2. 02You set the rulesReads run, writes like “create Prompt Post” can wait for the user, and “delete Document” can be denied outright.
  3. 03Any agent can actYour agent calls Sanity through the Arc0 SDK or MCP, and so can Claude, ChatGPT and Cursor. Every call lands on the audit log.
POLICY.TS
await arc0.policies.set('sanity', {
  read: 'allow',
  write: 'ask',        // create_prompt_post
  destructive: 'deny',  // delete_document
})

# Claude Code: the same connection, one URL
$ claude mcp add --transport http arc0 \
    https://mcp.arc0.ai/u/u_8f2
04 · AUTH AND DATA

How Sanity connects.

Users add their Sanity api key on Arc0 Connect. It is encrypted in the vault, never shown to the model, and each user can rotate or revoke it at any time.

The same Sanity connection serves your agent over MCP and your own backend over REST and the proxy, so a user connects once. How Arc0 handles credentials →

AUTH
API key
CREDENTIALS
Per-tenant encrypted vault
MODEL SEES
Results only, never credentials
AUDIT LOG
Every call, on every plan
05 · WORKS WITH

Use Sanity from any agent.

Claude
ChatGPT
Cursor
Codex
VS Code
OpenAI Agents SDK
Claude Agent SDK
Vercel AI SDK
Mastra
LangGraph
07 · FAQ

Sanity and Arc0, answered.

Q01

Can I use Sanity with Claude, ChatGPT or Cursor?

Yes. Connect Sanity to Arc0 once, then add your Arc0 MCP URL to Claude, ChatGPT, Cursor, Claude Code or any other remote-MCP client. Each assistant only gets the Sanity actions you allow.

Q02

How do users connect Sanity?

Users add their Sanity api key on Arc0 Connect. It is encrypted in the vault, never shown to the model, and each user can rotate or revoke it at any time.

Q03

Which Sanity actions can my agent take?

21 in total: 13 read, 5 write and 3 destructive, such as “create Prompt Post”. Your policies decide which of them each agent may call.

Q04

Can I stop my agent from deleting things in Sanity?

Yes. Actions like “delete Document” are graded destructive. Set destructive actions to deny, or to ask so the user approves each one, and blocked calls still show up on the audit log.

Q05

Can my own backend call Sanity too?

Yes. The same Sanity connection is available over REST and through the Arc0 proxy, so your product and your agent share one connection per user.

Get started

Plug Sanity into your agent.

Your users connect Sanity once, under your brand. Your agent gets 21 actions behind your policies, with every call on the record.

Free to build · MCP + REST · Audit log on every plan