Sanity
Enable AI agents to interact with your Sanity workspace through the Model Context Protocol (MCP).
От сообщества: Добавлен пользователем или импортирован; проверьте владельца перед подключениемРаботаетБез входаГлобальныйБесплатноТолько чтение
Что умеет
- Get Schema: Get the full schema of the current Sanity workspace
- List Workspace Schemas: Get a list of all available workspace schema names
- Deploy Schema: Deploy Sanity schema directly to cloud (project and dataset). IMPORTANT: Only use this for projects WITHOUT a local Sanity Studio. If sanity.config.ts/js or a schema directory exists, g
Какие данные видит
Нужен ли аккаунт
Не нужен: сервер работает без входа
Enable AI agents to interact with your Sanity workspace through the Model Context Protocol (MCP).
The Sanity Model Context Protocol (MCP) server enables AI assistants like Claude Code and Cursor to interact directly with your Sanity projects.
With the MCP server, agents can go beyond code generation and perform advanced content management operations in your Sanity projects—execute GROQ queries, manage releases, and patch documents with full awareness of your schema, eliminating the need to manually supply context.
Список инструментов сервера (41)
Технические названия из tools/list. Нужны только разработчикам.
| get_schema | Get the full schema of the current Sanity workspace |
| list_workspace_schemas | Get a list of all available workspace schema names |
| deploy_schema | Deploy Sanity schema directly to cloud (project and dataset). IMPORTANT: Only use this for projects WITHOUT a local Sanity Studio. If sanity.config.ts/js or a schema directory exists, generate local schema files instead. Can be called iteratively to add/overwrite types. |
| create_documents_from_json | Create one or more draft documents by directly providing JSON content. Creates drafts (drafts.* prefix) unless releaseId is specified for version creation. |
| create_documents_from_markdown | Create one or more draft documents from Markdown content. Creates drafts (drafts.* prefix) unless releaseId is specified for version creation. |
| create_version | Create a version document (versions.{releaseId}.* prefix) for a specific release. Versions are separate from drafts and published documents, and are used for scheduled release workflows. |
| patch_document_from_json | Apply precise modifications to document fields. When targeting a published document, this creates or updates a draft with the changes (published document remains unchanged). When targeting a draft or version, updates it in place. |
| patch_document_from_markdown | Patch a specific field in a document using Markdown content |
| query_documents | Query documents from Sanity using GROQ query language |
| generate_image | Generate a new image in a document using AI. When targeting a published document, this creates or updates a draft with the generated image (published document remains unchanged). The draft must be published separately to make changes live. For image arrays, automatically adds a new array item. Note: Image generation is asynchronous and completes in the background. |
| transform_image | Transform an existing image in a document using AI. When targeting a published document, this creates or updates a draft with the transformed image (published document remains unchanged). The draft must be published separately to make changes live. Note: Image transformation is asynchronous and completes in the background. |
| get_document | Fetch a single document by its exact ID. This is a direct ID lookup only - it does not search, filter, or query. Use when you have a specific document ID and need its full content. |
| publish_documents | Publish one or more draft documents to make them live |
| unpublish_documents | Unpublish one or more published documents (moves them back to drafts) |
| version_replace_document | Replace the contents of a document version with contents from another document |
| discard_drafts | Discard one or more draft documents (deletes drafts while keeping published documents intact). Can also discard release versions if releaseId is provided. |
| version_unpublish_document | Mark a document to be unpublished when the release is run |
| list_organizations | Lists all organizations the user has access to in Sanity |
| list_projects | Lists all Sanity projects associated with your account |
| get_project_studios | Retrieves all studio applications linked to a specific Sanity project |
| create_project | Creates a new Sanity project and initializes it with a dataset and API tokens |
| add_cors_origin | Adds CORS origin(s) to allow client-side requests to a Sanity project |
| list_datasets | Lists all datasets in your Sanity project |
| create_dataset | Creates a new dataset with specified name and access settings |
| update_dataset | Modifies a dataset's name or access control settings |
| list_releases | List content releases in Sanity, optionally filtered by state (active, scheduled, etc) |
| create_release | Create a new content release in Sanity with an automatically generated ID |
| edit_release | Update metadata for an existing content release |
| schedule_release | Schedule a content release to be published at a specific time |
| publish_release | Publish a release immediately |
| archive_release | Archive a release that is no longer active |
| unarchive_release | Restore an archived release |
| unschedule_release | Remove a previously set schedule from a release |
| delete_release | Delete a release |
| list_embeddings_indices | List all available embeddings indices for a dataset |
| semantic_search | Perform a semantic search on an embeddings index |
| migration_guide | Get comprehensive guidance for migrating existing projects to Sanity. Supports general migration guides, analyzing existing content structures + designing Sanity schemas, and migrating content from various CMS platforms (like Contentful, WordPress, Strapi). Use this tool when users want to migrate their existing CMS or content system to Sanity. |
| search_docs | Search Sanity docs |
| read_docs | Read a specific Sanity documentation article |
| list_sanity_rules | IMPORTANT: Call this FIRST before any Sanity development work. Returns available best practice rules for schemas, queries, frameworks, and visual editing. You MUST load relevant rules before writing Sanity code. |
| get_sanity_rules | Load Sanity development rules. ALWAYS call list_sanity_rules first to see available rules, then load all rules relevant to your task in a single call. |