Sanity
Sanity: управление контентом и схемами студии из Claude или Cursor
Что умеет
- Читать и разворачивать схему workspace
- Создавать и патчить документы из JSON или markdown
- Публиковать, снимать с публикации и версионировать документы
- Выполнять запросы к документам через GROQ
- Создавать проекты, датасеты и управлять организациями
Какие данные видит
Ассистент работает с проектами и датасетами Sanity, к которым у пользователя есть доступ, включая создание и изменение документов.
Нужен ли аккаунт
Не нужен: сервер работает без входа
MCP-сервер Sanity даёт ассистенту прямой доступ к рабочему пространству Sanity: выполнение GROQ-запросов, работа с релизами, создание и патчинг документов с учётом схемы проекта. Это избавляет от необходимости вручную объяснять ассистенту структуру контента при каждой задаче.
Как подключить
Как подключить Sanity к Claude
Адрес сервера, который нужно вставить в настройках Claude:
https://sanity.run.tools
- Откройте Claude (сайт claude.ai или приложение для компьютера).
- Перейдите в Настройки → Коннекторы (в английском интерфейсе: Settings → Connectors).
- Нажмите Добавить пользовательский коннектор (Add custom connector).
- Вставьте адрес сервера, скопированный ниже, в поле URL удалённого MCP-сервера и нажмите Добавить.
- В чате нажмите + → Коннекторы и включите новый коннектор.
Пользовательские коннекторы доступны на тарифах Free, Pro, Max, Team и Enterprise. На Free можно добавить только один. В Team и Enterprise коннектор сначала добавляет владелец организации в Настройки организации → Коннекторы.
Авторизация
После нажатия Добавить откроется окно входа в сервис. Войдите под своим аккаунтом и подтвердите доступ. Пароль Claude не видит.
Как подключить Sanity к ChatGPT
Адрес сервера, который нужно вставить в настройках ChatGPT:
https://sanity.run.tools
- Откройте ChatGPT в браузере (chatgpt.com). Нужен тариф Plus, Pro, Business, Enterprise или Edu.
- Один раз включите режим разработчика: Настройки → Приложения → Дополнительные настройки → Режим разработчика (Settings → Apps → Advanced settings → Developer mode).
- Откройте Настройки → Коннекторы и нажмите Создать (Create).
- Заполните форму: Название (любое), Описание (одна фраза, что делает сервис), URL MCP-сервера (скопируйте ниже).
- В поле Аутентификация выберите OAuth, если сервис требует вход, иначе Нет. Нажмите Создать.
- В новом чате откройте + → Приложения/Коннекторы и включите коннектор.
Название раздела у OpenAI менялось (Connectors → Apps/Plugins). Если пункт называется иначе, ищите «режим разработчика» в настройках. В рабочих пространствах Business/Enterprise администратор должен разрешить пользовательские коннекторы.
Авторизация
При первом использовании ChatGPT откроет окно входа в сервис. Войдите и подтвердите доступ.
Как подключить Sanity к Cursor
Адрес сервера, который нужно вставить в настройках Cursor:
https://sanity.run.tools
Быстрый способ: нажмите кнопку Открыть в Cursor ниже, Cursor сам предложит добавить сервер.
Вручную:
- В Cursor откройте Settings → Cursor Settings → MCP и нажмите Add new global MCP server.
- Вставьте JSON, скопированный ниже, в открывшийся файл
~/.cursor/mcp.json(для одного проекта:.cursor/mcp.jsonв корне проекта). - Сохраните файл. Сервер появится в списке MCP; при необходимости пройдите авторизацию по кнопке рядом с ним.
Авторизация
Если сервис требует вход, рядом с сервером в списке MCP появится кнопка авторизации.
Список инструментов сервера (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. |