integrations tools sanity

    Sanity MCP for your AI agent

    Cogny's Sanity integration exposes 17 tools (7 read, 8 write, 2 destructive) to an AI agent over MCP. The same tools are available on every plan, from your own AI client or inside the Cogny app.

    • 7readonly reads data.
    • 8writecreates or changes something.
    • 2destructivedeletes, removes or replaces something.

    Over MCP your own AI client asks before it runs a write. To take a tool away from your agent, block it in Settings → Integrations. Plans, approvals and limits

    set it up.

    Add Cogny to your AI client once, then connect Sanity in Cogny. Every Sanity tool below appears in the client.

    • Claude CodeRun claude mcp add --transport http cogny https://app.cogny.com/mcp, then authorise in the browser.
    • Claude.aiSettings → Connectors → Add custom connector, URL https://app.cogny.com/mcp, then log in and pick your workspace.
    • ChatGPTSettings → Apps → Advanced settings → Developer mode → Create app, URL https://app.cogny.com/mcp, authentication OAuth.
    • CursorIn Cogny, Settings → Data & Integrations → Connect AI Clients shows the block to paste into .mcp.json, with an API key.
    • CodexRun codex mcp add cogny --url https://app.cogny.com/mcp.

    Full setup, and how to undo it

    what each tool does.

    Read 7 · only reads data

    • tool_query_groqReadExecute a GROQ query against the Sanity Content Lake.
    • tool_get_documentReadGet a single document by its ID.
    • tool_list_documentsReadList documents of a specific type with pagination and filtering.
    • tool_search_documentsReadFull-text search across documents.
    • tool_get_schema_typesReadDiscover all document types and their counts in the dataset.
    • tool_list_assetsReadList assets (images and/or files) in the dataset.
    • tool_get_referencesReadFind all documents that reference a given document.

    Write 8 · creates or changes something

    • tool_create_documentWriteCreate a new document.
    • tool_create_or_replace_documentWriteCreate a document if it doesn't exist, or completely replace it.
    • tool_patch_documentWritePartially update a document.
    • tool_publish_documentWritePublish a draft document, making it live.
    • tool_unpublish_documentWriteUnpublish a document, moving it back to draft state.
    • tool_batch_patchWriteApply multiple patches in a single transaction.
    • tool_upload_image_from_urlWriteUpload an image from an external URL to Sanity.
    • tool_upload_file_from_urlWriteUpload a file from an external URL to Sanity.

    Destructive 2 · deletes, removes or replaces something

    • tool_delete_documentDestructiveDelete a document by ID.
    • tool_delete_documents_by_filterDestructiveDelete all documents matching a GROQ filter.

    Exact input schemas come from tools/list once Sanity is connected; the free plan is enough to check. Missing something? Your agent can ask for it with request_feature.