# How to connect Sanity to Claude Cowork

```json
{
  "title": "How to connect Sanity to Claude Cowork",
  "toolkit": "Sanity",
  "toolkit_slug": "sanity",
  "framework": "Claude Cowork",
  "framework_slug": "claude-cowork",
  "url": "https://composio.dev/toolkits/sanity/framework/claude-cowork",
  "markdown_url": "https://composio.dev/toolkits/sanity/framework/claude-cowork.md",
  "updated_at": "2026-06-18T10:07:33.985Z"
}
```

## Introduction

Cowork is Anthropic's AI agent for knowledge work. Think of it as Claude Code for everything else. It works autonomously with your computer, local files, and applications to accomplish complex tasks.
This guide walks you through the easiest and most secure way to connect your Sanity account to Cowork via Composio Connect, enabling it to list recent Sanity posts needing review, create draft product page in Sanity, update author bio across Sanity articles, and more such actions on your behalf without compromising your account security.

## Also integrate Sanity with

- [Codex](https://composio.dev/toolkits/sanity/framework/codex)

## Connect Sanity to Claude Cowork

### Connecting Sanity to Claude Cowork
1. Open Customize
In Claude Desktop, click Customize in the left sidebar, then select Connectors and click the + icon at the top.
2. Add the Composio MCP server
Click Add custom connector and paste in the Composio MCP server URL:

```bash
https://connect.composio.dev/mcp
```

## What is Claude Cowork?

Claude Cowork is Anthropic's agent for general knowledge work. It can use your computer, files, and connected applications to complete longer-running tasks across your work tools.
With Composio Connect, Cowork can securely access apps like Sanity through MCP without you sharing account credentials directly with the agent.

## What is the Sanity MCP server, and what's possible with it?

The Sanity MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Sanity account. It provides structured and secure access so your agent can perform Sanity operations on your behalf.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `SANITY_ADD_DEFAULT_ROLE_TO_USERS` | Add Default Role to Users | Apply organization default role to all users. Use when you need to assign the organization's default role to all existing users in the organization. Requires the resource ID of the organization. |
| `SANITY_CREATE_ATTR_DEFINITION` | Create Attribute Definition | Tool to create a new user attribute definition in Sanity. Use when you need to define a custom attribute (like 'customer-tier' or 'subscription-level') that can be attached to resources. The key must be unique within the resource. The attribute can have a type of 'string', 'number', or 'boolean' and can optionally be a list of values or read-only. |
| `SANITY_CREATE_PROMPT_POST` | Create Prompt Post | Send a one-shot prompt to the Sanity Content Agent. Stateless one-shot prompt endpoint. No thread management or message persistence. Ideal for simple, single-turn interactions. Use when you need to send a single prompt and receive a response without maintaining conversation context. |
| `SANITY_DELETE_ATTR_DEFINITION` | Delete User Attribute Definition | Delete a user attribute definition. Use when you need to remove a custom attribute definition from an organization or project in Sanity. The attribute definition controls how user attributes are structured and validated for a given resource. Deleting a definition does not delete existing user attribute values, but users will no longer be able to set values for that attribute. |
| `SANITY_DELETE_DOCUMENT` | Delete Document | Delete a document from Sanity by ID or query. This action is irreversible when purge is true — the document cannot be recovered once permanently deleted. Use when you need to remove a specific document by ID or bulk delete documents matching a GROQ query (limited to 10,000 documents per operation). For large deletions, paginate by document ID. Set dry_run to true to test the operation without modifying data. |
| `SANITY_DELETE_USER_ATTRIBUTES` | Delete User Attributes | Delete custom attributes from a Sanity user within an organization. Use this tool when you need to remove specific custom attributes from a user account. The action deletes the attributes specified in the request and returns the updated attribute list for the user. Example use case: Removing outdated metadata like 'location' or 'year_started' from a user profile. |
| `SANITY_GET_DOCUMENT` | Get Document by ID | Fetch a single document by its ID from Sanity. Use this action when you need to retrieve a specific document using its unique identifier rather than running a GROQ query. Returns the complete document with all system fields including _id, _type, _rev, _createdAt, and _updatedAt. |
| `SANITY_GET_INVITE_BY_TOKEN` | Get Invite By Token | Retrieve an invite by its public token. Use this action when you need to fetch details about an invite using the invite token that was shared with the invitee. Returns invite information including status, role, and inviter details. |
| `SANITY_GET_ORG_ROLE` | Get Organization Role | Retrieve a specific organization role by its ID. Use this action when you need to fetch details about an organization role including its permissions, title, description, and whether it applies to users or robots. The role must exist for the specified organization. |
| `SANITY_GET_PERMISSION` | Get Permission | Get a permission for a specific resource. Use when you need to retrieve details about a particular permission including its actions, parameters, and scope. The action retrieves permission information based on the resource type, resource ID, and permission name provided in the path parameters. |
| `SANITY_GET_PROJECT` | Get Project | Retrieve full details for a specific Sanity project by its ID. Returns comprehensive project information including display name, organization, studio host, and timestamps. Use this action when you need to fetch complete project details or verify project configuration. Optional parameters allow including member lists and feature flags in the response. |
| `SANITY_GET_ROBOTS` | Get Robots | Tool to get robots with access to a resource. Use when you need to retrieve a list of robots (service accounts) that have been granted access to a specific resource along with their assigned roles. This action supports pagination through the next_cursor parameter. |
| `SANITY_GET_ROLE` | Get Role | Retrieve a specific role for a given resource type and resource ID. Use this action when you need to fetch details about a role including its permissions, title, description, and whether it applies to users or robots. The role must exist for the specified resource. |
| `SANITY_GET_USERS` | List Resource Users | List all users of a resource and their assigned roles. Use when you need to retrieve user information and role assignments for a specific project or organization. Supports pagination via cursor. |
| `SANITY_LIST_ORG_ROLES` | List Organization Roles | List all roles available for an organization. Use this action to retrieve all available roles that can be assigned to users within a specific Sanity organization. The organization_id is required to identify which organization's roles to list. |
| `SANITY_LIST_USER_ATTRIBUTES` | List User Attributes | Tool to retrieve user attributes from a Sanity organization. Use when you need to get the attributes (such as roles, permissions, or custom properties) associated with a specific user in a Sanity organization. Supports pagination via the cursor parameter. |
| `SANITY_QUERY_ALL_SCREENING` | Query All Screening | Execute a GROQ query to fetch all screening documents from Sanity. Uses the Sanity HTTP query API endpoint. Default query retrieves all documents of type 'screening'. Supports optional query parameters for dynamic queries. |
| `SANITY_QUERY_DOCUMENTS` | Query Documents | Execute an arbitrary GROQ query against a Sanity dataset. GROQ is Sanity's query language for fetching and transforming content. This is a general-purpose query action distinct from any screening-specific tools. Use this action when you need to query documents from a Sanity dataset using custom GROQ queries. Supports optional parameters, perspective control, and CDN optimization. |
| `SANITY_UPDATE_ORG_ACL` | Update Organization ACL | Tool to assign a role to a member in a Sanity organization. Use when adding or modifying user roles within an organization. |
| `SANITY_UPDATE_USER_ATTRIBUTES_VALUES` | Update User Attributes Values | Update user attribute values for a resource. Use this action to set or update custom attributes for a user within an organization or project. When setting a value for an attribute key that also exists in SAML, the Sanity value will take precedence and shadow the SAML value. |
| `SANITY_VALIDATE_CREDENTIAL` | Validate Credential | Validate Sanity API credentials by fetching the authenticated user's information. Use this action when you need to verify that an API token is valid and has proper authentication. This action returns user information and accessible projects if the token is valid. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Sanity MCP server connects Claude Cowork to your Sanity account through Composio. Once connected, Cowork can use the available Sanity tools and triggers to complete tasks on your behalf.

## Complete Code

None listed.

## How to build Sanity MCP Agent with another framework

- [Codex](https://composio.dev/toolkits/sanity/framework/codex)

## Related Toolkits

- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
- [Google Docs](https://composio.dev/toolkits/googledocs) - Google Docs is a cloud-based word processor that enables document creation and real-time collaboration. Its seamless sharing and version history make team editing and content management a breeze.
- [Google Super](https://composio.dev/toolkits/googlesuper) - Google Super is an all-in-one suite combining Gmail, Drive, Calendar, Sheets, Analytics, and more. It gives you a unified platform to manage your digital life, boosting productivity and organization.
- [Affinda](https://composio.dev/toolkits/affinda) - Affinda is an AI-powered document processing platform that automates data extraction from resumes, invoices, and more. It streamlines document-heavy workflows by turning files into structured, actionable data.
- [Agility cms](https://composio.dev/toolkits/agility_cms) - Agility CMS is a headless content management system for building and managing digital experiences across platforms. It lets teams update content quickly and deliver omnichannel experiences with ease.
- [Algodocs](https://composio.dev/toolkits/algodocs) - Algodocs is an AI-powered platform that automates data extraction from business documents. It delivers fast, secure, and accurate processing without templates or manual training.
- [Api2pdf](https://composio.dev/toolkits/api2pdf) - Api2Pdf is a REST API for generating PDFs from HTML, URLs, and documents using powerful engines like wkhtmltopdf and Headless Chrome. It streamlines document conversion and automation for developers and businesses.
- [Aryn](https://composio.dev/toolkits/aryn) - Aryn is an AI-powered platform for parsing, extracting, and analyzing data from unstructured documents. Use it to automate document processing and unlock actionable insights from your files.
- [Boldsign](https://composio.dev/toolkits/boldsign) - Boldsign is a digital eSignature platform for sending, signing, and tracking documents online. Organizations use it to automate agreements and manage legally binding workflows efficiently.
- [Boloforms](https://composio.dev/toolkits/boloforms) - BoloForms is an eSignature platform built for small businesses, offering unlimited signatures, templates, and forms. It simplifies digital document signing and team collaboration at a predictable, fixed price.
- [Box](https://composio.dev/toolkits/box) - Box is a cloud content management and file sharing platform for businesses. It helps teams securely store, organize, and collaborate on files from anywhere.
- [Carbone](https://composio.dev/toolkits/carbone) - Carbone is a blazing-fast report generator that turns JSON data into PDFs, Word docs, spreadsheets, and more using flexible templates. It lets you automate document creation at scale with minimal code.
- [Castingwords](https://composio.dev/toolkits/castingwords) - CastingWords is a transcription service specializing in human-powered, accurate transcripts via a simple API. Get seamless audio-to-text conversion for interviews, meetings, podcasts, and more.
- [Cloudconvert](https://composio.dev/toolkits/cloudconvert) - CloudConvert is a powerful file conversion service supporting over 200 file formats. It streamlines converting, compressing, and managing documents, media, and more, all in one place.
- [Cloudlayer](https://composio.dev/toolkits/cloudlayer) - Cloudlayer is a document and asset generation service for creating PDFs and images via API or SDKs. It lets you automate high-quality doc creation, saving dev time and reducing manual work.
- [Cloudpress](https://composio.dev/toolkits/cloudpress) - Cloudpress is a content export tool for Google Docs and Notion. It automates publishing to your favorite Content Management Systems.
- [Contentful graphql](https://composio.dev/toolkits/contentful_graphql) - Contentful graphql is a content delivery API that lets you access Contentful data using GraphQL queries. It gives you efficient, flexible ways to fetch and manage structured content for any digital project.
- [Conversion tools](https://composio.dev/toolkits/conversion_tools) - Conversion Tools is an online service for converting documents between formats such as PDF, Word, Excel, XML, and CSV. It lets you automate complex document workflows with just a few clicks.
- [Convertapi](https://composio.dev/toolkits/convertapi) - ConvertAPI is a robust file conversion service for documents, images, and spreadsheets. It streamlines programmatic format changes and lets developers automate complex workflows with a single API.
- [Craftmypdf](https://composio.dev/toolkits/craftmypdf) - CraftMyPDF is a web-based service for designing and generating PDFs with templates and live data. It streamlines document creation by automating personalized PDFs at scale.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Sanity MCP?

With a standalone Sanity MCP server, the agents and LLMs can only access a fixed set of Sanity tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Sanity and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Claude Cowork?

Yes, you can. Claude Cowork fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Sanity tools.

### Can I manage the permissions and scopes for Sanity while using Tool Router?

Yes, absolutely. You can configure which Sanity scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Sanity data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
