# Sanity MCP

Query, create, patch and publish Sanity content, manage schemas, releases, datasets, projects, CORS origins and Media Library assets through Sanity's hosted MCP server.

Category: Developer. Connect from any SulusAssist agent at https://assist.sulus.ai/integrations/sanity-mcp/.

## Actions

- **Add cors origin**: Adds CORS origin(s) to allow client-side requests to a Sanity project
- **Assets upload status** (read-only): Check one to 20 asset uploads using operationIds.
- **Cors origins delete**: Deletes a CORS origin from a Sanity project
- **Cors origins list** (read-only): Lists all CORS origins configured for a Sanity project
- **Create dataset**: Creates a new dataset with specified name and access settings
- **Create documents**: Create one or more documents by directly providing structured content.
- **Create project**: Creates a new Sanity project and initializes it with a dataset and API tokens
- **Create release**: Create a new release for grouping content changes.
- **Create version**: Create a version document (versions.{releaseId}.* prefix) for a specific release.
- **Dataset assets upload from file**: Prepare a one-use URL for uploading an image or file up to 50 MiB to a Content Lake dataset.
- **Dataset assets upload from url**: Start an image or file upload from a public HTTPS URL to a Content Lake dataset.
- **Dataset assets upload from web chatgpt**: Upload a ChatGPT web attachment or generated file to a Content Lake dataset.
- **Deploy schema**: Only use deploy_schema when no local Sanity Studio project exists.
- **Deploy studio**: Deploy a managed Sanity Studio bound to an MCP-managed schema.
- **Discard drafts**: Discard one or more draft documents.
- **Documents validate** (read-only): Validate documents against the deployed schema without modifying them.
- **Generate image**: Generate a new image in a document using AI.
- **Get document** (read-only): Fetch a single document by its exact ID.
- **Get project studios** (read-only): Retrieves all studio applications linked to a specific Sanity project
- **Get sanity rules** (read-only): Load Sanity development rules.
- **Get schema** (read-only): Fetch the deployed schema for a project and dataset.
- **Get ui context** (read-only): Returns UI enrichment data for widgets.
- **Give sanity feedback**: Submit feedback about Sanity when you encounter issues while working with a Sanity codebase or project.
- **List datasets** (read-only): Lists all datasets in your Sanity project
- **List embeddings indices** (read-only): List all available embeddings indices for a dataset
- **List organizations** (read-only): Lists all organizations the user has access to in Sanity
- **List projects** (read-only): Lists all Sanity projects associated with your account
- **List releases** (read-only): List releases in a dataset.
- **List sanity rules** (read-only): IMPORTANT.
- **List workspace schemas** (read-only): Deprecation notice.
- **Media assets upload from url** (read-only): Deprecated.
- **Media library create documents**: Create documents in a Media Library.
- **Media library discard drafts**: Discard asset drafts, throwing away unpublished metadata edits and leaving the published asset intact.
- **Media library get document** (read-only): Fetch a single Media Library document by its exact ID.
- **Media library get schema** (read-only): Get the document types of a Media Library, or the full field definitions for one type.
- **Media library link assets**: Make one or more Media Library assets usable in project documents.
- **Media library list** (read-only): Lists the Sanity Media Libraries in an organization.
- **Media library list asset references** (read-only): Lists documents (across project datasets) that reference a Media Library asset.
- **Media library patch documents**: Edit Media Library documents.
- **Media library publish documents**: Publish asset drafts to make unpublished metadata edits (title, aspects.*) live, preserving published-only and system-managed fields.
- **Media library query documents** (read-only): Query a Media Library using GROQ.
- **Media library upload from file**: Prepare a one-use URL to upload a local or private image, video, or file up to 50 MiB to a Media Library, or add a version to an existing…
- **Media library upload from url**: Start an image, video, or file upload from a public HTTPS URL to a Media Library.
- **Patch documents**: Update existing documents with @sanity/client patch() operations.
- **Publish documents**: Publish one or more drafts.
- **Query documents** (read-only): Query documents from Sanity using GROQ.
- **Read docs** (read-only): Read a specific Sanity documentation article
- **Run sanity cli**: Run a limited subset of Sanity CLI commands and return their output.
- **Schema fields patch**: Add, replace, or remove top-level fields on one document or object type.
- **Schema type get** (read-only): Read one type from the current MCP-managed or Studio-deployed schema before calling a granular schema edit tool.
- **Schema types delete**: Remove one or more types from the dataset schema.
- **Search docs** (read-only): Search Sanity docs
- **Semantic search** (read-only): Perform a semantic search on an embeddings index
- **Transform image**: Transform an existing image in a document using AI.
- **Undeploy schema**: Remove a legacy MCP-managed schema from an explicitly named workspace.
- **Unpublish documents**: Unpublish one or more published documents (moves them back to drafts), or provide releaseId to mark them for unpublishing when that…
- **Update dataset**: Update an existing dataset's visibility (public or private) and description.
- **Usage history get** (read-only): Get metered usage for a project, organization or media library as a series of daily, monthly or yearly data points.
- **Usage snapshot get** (read-only): Get metered usage totals, such as API requests, CDN requests, documents and assets, for a project, organization or media library over one…
- **Version discard**: Discard one or more document versions from a release
- **Whoami** (read-only): Returns the currently authenticated Sanity account.
