Sanity

Sanity MCP integration

Runs GROQ queries and fetches documents by ID, audits project roles and service accounts, and manages custom user attributes.

21actions available

Three actions you can hand over today

Every action runs live through MCP. Nothing to build, nothing to maintain.

  • Create prompt post

    Lyro sends one-shot prompts to the Sanity Content Agent. This enables Lyro to request content generation or updates mid-conversation.

  • Get document by ID

    Lyro retrieves full document details from Sanity by ID instantly. Content teams pull published or draft material to reference during support conversations.

  • Update user attributes values

    Lyro modifies custom user attribute values for resources in Sanity. Teams manage user metadata and preferences on the fly to personalize experiences.

See all 21 actions

How businesses use Sanity + Lyro

Each card is one request a support team gets, and the Sanity actions Lyro runs to close it.

  • Answer a content question straight from the dataset

    Lyro runs a GROQ query when the answer spans documents, or fetches one complete record by its ID when the question names a specific piece of content.

    Query DocumentsGet Document By IDQuery All Screening
  • Report who can do what on a project

    Lyro lists a project's users with their assigned roles, shows the roles an organization offers, and assigns a member a different role when access needs to change.

    List Resource UsersList Organization RolesUpdate Organization ACL
  • Track custom attributes against a user

    Lyro defines an attribute such as customer tier, sets its value for a given user, and reads back the attributes already attached to someone in the organization.

    Create Attribute DefinitionUpdate User Attributes ValuesList User Attributes
  • Put a single question to the Content Agent

    Lyro confirms the API credentials and project, then sends a one-shot prompt to Sanity's Content Agent and returns what comes back.

    Validate CredentialGet ProjectCreate Prompt Post

How it works

Get started in 3 steps

Connect once, then just ask. There is no workflow builder to learn and nothing to maintain — Lyro reads the Sanity actions it has and picks the ones a request needs.

  1. 01

    Connect Sanity

    Authorize the Sanity account your team already uses — one consent screen, no API keys, no mapping tables. Lyro can only do what you granted that account, and you can disconnect it at any time.

  2. 02

    Tell your agent what you need

    Describe the job the way you would hand it to a teammate. Lyro maps it to the Sanity actions that close it and chains as many as the request needs.

  3. 03

    Watch it work

    The agent runs the actions inside the conversation the customer is already in, so nobody copies data between tabs and your team can take over at any point.

    Get started free
Sanity · Lyro

Everything else about Sanity

Setup, permissions, and the limits of what Lyro can do inside Sanity.

  • Not with this toolkit. Content access here is read and delete only - Query Documents runs arbitrary GROQ, Get Document by ID fetches one record, and Delete Document removes one. Authoring and updating still happen in Studio or through Sanity's own write APIs.

Every action available in Sanity

All 21 actions your agent can call on Sanity, straight from the live MCP connection.

  • Add default role to users

    Apply organization default role to all users.

  • Create attribute definition

    Create a new user attribute definition in Sanity.

  • Create prompt post

    Send a one-shot prompt to the Sanity Content Agent.

  • Delete user attribute definition

    Delete a user attribute definition.

  • Delete document

    Delete a document from Sanity by ID or query.

  • Delete user attributes

    Delete custom attributes from a Sanity user within an organization.

  • Get document by ID

    Fetch a single document by its ID from Sanity.

  • Get invite by token

    Retrieve an invite by its public token.

  • Get organization role

    Retrieve a specific organization role by its ID.

  • Get permission

    Get a permission for a specific resource.

  • Get project

    Retrieve full details for a specific Sanity project by its ID.

  • Get robots

    Get robots with access to a resource.

  • Get role

    Retrieve a specific role for a given resource type and resource ID.

  • List resource users

    List all users of a resource and their assigned roles.

  • List organization roles

    List all roles available for an organization.

  • List user attributes

    Retrieve user attributes from a Sanity organization.

  • Query all screening

    Execute a GROQ query to fetch all screening documents from Sanity.

  • Query documents

    Execute an arbitrary GROQ query against a Sanity dataset.

  • Update organization acl

    Assign a role to a member in a Sanity organization.

  • Update user attributes values

    Update user attribute values for a resource.

  • Validate credential

    Validate Sanity API credentials by fetching the authenticated user's information.

Ready to connect Sanity?

Authorize the account and your agent has all 21 actions from the first conversation.

Support agent working at a laptop next to the Lyro mascot