NeuralTrust has been recognized by Gartner → Read more

Connect Sanity MCP to your AI agents, securely.

One secured endpoint for every Sanity call your AI agents make, scoped per user, inspected, and logged.

Try Sanity MCP now

What your agents can ask once Sanity MCP is connected.

  • “Run a GROQ query for all articles written by Mark”

  • “List all releases in this dataset”

  • “Add localization to my article document type”

  • “Help me migrate existing content to a new schema shape”

  • “Which documents reference this Media Library asset?”

  • “Show me the deployed schema for this workspace”

Select the tools your AI agents can call

54 tools from the Sanity MCP schema.

Showing 54 tools

  • query_documentsreadQueries documents using GROQ. Takes the GROQ string and optional params. Results are not truncated, so field projections and slices matter.
  • get_documentreadFetches a single document by its exact ID. A direct lookup only, with no search or filtering.
  • list_releasesreadLists releases in a dataset, returning active and scheduled ones by default, with a state filter for published or archived.
  • create_documentswriteCreates one or more draft documents from structured content. Creates drafts unless a releaseId is given.
  • create_versionwriteCreates a version document for a specific release. Versions are separate from drafts and published documents and are used for scheduled release workflows.
  • patch_documentswriteUpdates existing documents with client patch operations, applied as one transaction per document, at most 25 documents per call. Edits are saved to the draft or release version, never directly to published content.
  • create_releasewriteCreates a release for grouping content changes. Does not schedule it: release type and intended publish time are recorded as metadata only.
  • publish_documentshigh riskPublishes one or more drafts, making them live.
  • unpublish_documentshigh riskUnpublishes one or more published documents, moving them back to drafts.
  • discard_draftshigh riskDiscards one or more draft documents, deleting the drafts while leaving published documents intact.
  • version_discardhigh riskDiscards one or more document versions from a release.
  • documents_validatereadValidate documents against the deployed schema without modifying them. This tool is in beta. Results may be incorrect or incomplete; review them before making changes.
  • media_library_listreadLists the Media Libraries in an organization, returning the library IDs the other media_library tools need.
  • media_library_get_schemareadGets a Media Library's document types, or the full field definitions for one type. The library schema is fixed, with the organization's own asset aspects merged on.
  • media_library_query_documentsreadQueries a Media Library using GROQ. Assets, collections, folders and aspect definitions are all queryable.
  • media_library_get_documentreadFetches a single Media Library document by its exact ID.
  • media_library_list_asset_referencesreadLists the documents across project datasets that reference a Media Library asset. Intended to be called before replacing an asset.
  • media_library_create_documentswriteCreates documents in a Media Library. Only asset collections can be created; assets themselves come from uploading a binary. Created directly, not as drafts.
  • media_library_patch_documentswriteEdits Media Library documents within a safe subset: an asset's title and aspects, its CDN access policy, and collection metadata and membership. Title and aspect edits go to a draft; the CDN access policy is published-only and takes effect immediately.
  • media_library_publish_documentswritePublishes asset drafts to make unpublished metadata edits live, validating the draft against current aspect definitions first.
  • media_library_discard_draftswriteDiscards asset drafts, throwing away unpublished metadata edits and leaving the published asset intact.
  • media_library_link_assetswriteMakes Media Library assets usable in project documents, creating a local deliverable copy for images and files and returning ready-to-use field values.
  • assets_upload_statusreadChecks one to 20 asset uploads by operation ID. Results include asset IDs, URLs and references, and stay available for up to 24 hours.
  • media_assets_upload_from_urlreadDeprecated. Does not start an upload; use media_library_upload_from_url with the same arguments.
  • dataset_assets_upload_from_urlwriteStarts an image or file upload to a dataset from a public HTTPS URL, returning an operation ID immediately.
  • dataset_assets_upload_from_filewritePrepares a one-use URL for uploading an image or file up to 50 MiB to a dataset.
  • dataset_assets_upload_from_web_chatgptwriteUploads a ChatGPT web attachment or generated file to a dataset, using the temporary download URL ChatGPT web supplies.
  • media_library_upload_from_urlwriteStarts an image, video or file upload to a Media Library from a public HTTPS URL, optionally adding a version to an existing asset.
  • media_library_upload_from_filewritePrepares a one-use URL for uploading an image, video or file up to 50 MiB to a Media Library.
  • whoamireadReturns the currently authenticated Sanity account, including name, email, provider and the MCP authentication method in use.
  • list_organizationsreadLists all organizations the user has access to.
  • list_projectsreadLists all Sanity projects associated with the account.
  • get_project_studiosreadRetrieves all Studio applications linked to a specific project.
  • cors_origins_listreadLists all CORS origins configured for a project.
  • create_projecthigh riskCreates a new Sanity project and initializes it with a dataset and API tokens.
  • add_cors_originhigh riskAdds CORS origins so client-side requests from those origins reach the project.
  • cors_origins_deletehigh riskDeletes a CORS origin from a project, which can break a running front end.
  • get_schemareadFetches a deployed schema, resolving each workspace in order of MCP-managed, Studio-deployed, then legacy.
  • list_workspace_schemasreadLists every deployed schema for a project and dataset, grouped by source, each with a schema ID for exact reads.
  • deploy_schemahigh riskDeploys schema types directly to the cloud, changing how content is validated and presented.
  • deploy_studiohigh riskDeploys a managed Sanity Studio bound to an MCP-managed schema, returning a hosted Studio URL. Requires an existing MCP-managed schema at the same address.
  • list_datasetsreadLists all datasets in a project.
  • create_datasetwriteCreates a new dataset with a name and access settings.
  • update_datasethigh riskModifies a dataset's name or access control settings, which determine whether it is publicly readable.
  • generate_imagewriteTriggers async AI image generation for a document field. Consumes AI credits.
  • transform_imagewriteTriggers async AI transformation of an existing image. Consumes AI credits.
  • list_embeddings_indicesreadLists all available embeddings indices for a dataset.
  • semantic_searchreadPerforms a semantic search against an embeddings index.
  • search_docsreadSearches the Sanity documentation.
  • read_docsreadFetches a specific documentation article.
  • list_sanity_rulesreadLists the available best-practice development rules.
  • get_sanity_rulesreadLoads specific best-practice development rules, such as the GROQ rules.
  • give_sanity_feedbackwriteSubmits feedback about Sanity when the agent hits an unexpected error, a missing capability or unclear documentation.
  • run_sanity_clihigh riskRuns a limited subset of Sanity CLI commands and returns their output. Commands run without a shell and cannot access the filesystem, prompt for input, run in the background or change authentication.

What Sanity MCP exposes

Sanity MCP groups its 54 tools into 10 categories, each with a suggested starting policy.

CategoryCoversAccessSuggested policy
DocumentsGROQ queries, direct ID lookups, creating drafts and release versions, patching documents, publishing, unpublishing, discarding drafts and versions, and creating and listing releasesRead / WriteEdits are saved to the draft or release version, never directly to published content. Scheduling, publishing, archiving and deleting a release are deliberately not available here and must be done in Studio or the HTTP Actions API
Media LibraryListing libraries, their schema, GROQ queries and ID lookups, creating collections, patching the safe subset of asset metadata, publishing and discarding asset drafts, listing what references an asset and linking assets into project documentsRead / Writemedia_library_patch_documents is deliberately narrow, but cdnAccessPolicy is published-only and takes effect immediately, so it bypasses the draft step the rest of the surface relies on
Assets & UploadsUploading images, video and files to a dataset or Media Library from a public URL, a one-use upload URL, a local file or a ChatGPT web attachment, plus upload status polling and CLI guidanceRead / WriteThe from_url tools make Sanity fetch an arbitrary public HTTPS URL on the agent's behalf; pin the allowed sources. File uploads are capped at 50 MiB
Projects & AccessOrganizations, projects, studio applications, creating a project, listing, adding and deleting CORS origins, and identifying the authenticated accountRead / Writecreate_project initializes a project with its own dataset and API tokens. The CORS tools change which browsers can reach the project, so they are a security control rather than a convenience
Docs & RulesSearching and reading Sanity documentation, listing and loading best-practice development rules, and submitting product feedbackRead / WriteAccount-independent; safe to allow broadly
Schema & StudioFetching a deployed schema, listing every deployed schema by source, deploying schema types to the cloud and deploying a managed Studio bound to an MCP-managed schemaRead / Writedeploy_schema changes how content is validated and presented for everyone; deploy_studio creates a publicly reachable hosted Studio URL
DatasetsListing datasets, creating one with access settings and modifying a dataset's name or access controlRead / Writeupdate_dataset can change access control settings, which is what decides whether a dataset is public
AI ImagesTriggering async AI image generation for a document field and async AI transformation of an existing imageRead / WriteThe only two tools that consume AI credits; Sanity suggests disabling them in the client if credit usage is a concern
SearchListing the embeddings indices available for a dataset and running a semantic search against oneReadRead-only
CLIRunning a limited subset of Sanity CLI commands and returning their outputRead / WriteA meta-tool: the tool name says nothing about the command run. Commands execute without a shell and cannot touch the filesystem or change authentication, but the reachable surface is the CLI's, not this tool list's

Connect Sanity MCP to your AI agent

Four steps, under ten minutes.

  1. 01

    Sign in to NeuralTrust

    Open the NeuralTrust platform, sign in and go to Getting started, then Connect your tools.

    Sign in to NeuralTrust
  2. 02

    Choose your agent

    When asked which agent you use, pick Claude Code, Codex, Cursor, Windsurf, Copilot or your own code.

    Choose your agent
  3. 03

    Connect Sanity

    Find Sanity in the tool list and connect it.

    Connect Sanity
  4. 04

    Connect your agent

    Follow the steps on screen to add the config to your agent, then send the test prompt.

    Connect your agent

Permissions down to the single tool

You do not allow Sanity MCP or block it. You allow the exact tools each agent can call, one by one.

Sanity MCP54 TOOLS AVAILABLE
Code review agent4 tools, read only
Issue triage bot9 tools
Platform team assistantall 54 tools
  • Tool by toolConnecting the server is not the unit of access. Each tool is granted on its own.
  • Default denyA tool you have not enabled is never exposed to the agent.
  • Approval on writesTools that change or delete things can require a human to confirm.

Is Sanity MCP secure?

One endpoint instead of raw credentials. Every call is checked against policy and logged.

AI agentsConnect through your MCP client configuration.NeuralTrustApply controls based on your configuration.Sanity MCP54 documented tools. Availability varies with the account's project and dataset permissions, and the set changes as Sanity ships updates.
Coding assistantsConnection & credentialsper userDocuments12 tools
Internal copilotsTool access policiesdeny by defaultMedia Library10 tools
Workflow automationsRequest & response inspectioninlineProjects & Access8 tools
Compatible MCP clientsActivity monitoringalerts and logsAll other tools24 tools
FAQ

Common questions about running Sanity MCP through TrustGate.

Connect Sanity MCP instantly

Pick the tools, point your agent at TrustGate, and Sanity MCP is live: scoped, inspected, logged.