Sanity MCP Server

by jlmelis

Integrations

  • Provides tools for interacting with Sanity.io content, including creating new documents, editing existing documents, listing documents of specific types, and retrieving schema templates based on document types.

Sanity MCP Server

This MCP server provides tools for interacting with Sanity.io content from Claude Desktop.

Installation

  1. Clone this repository
  2. Install dependencies:
npm install
  1. Create a .env file with your Sanity credentials:
SANITY_PROJECT_ID=your_project_id SANITY_DATASET=your_dataset SANITY_TOKEN=your_token

Usage with Claude Desktop

  1. In Claude Desktop, go to Settings > MCP Servers
  2. Add a new server with these settings:
{ "command": "node", "args": ["src/sanity-mcp-server.ts"], "env": { "SANITY_PROJECT_ID": "your_project_id", "SANITY_DATASET": "your_dataset", "SANITY_TOKEN": "your_token" } }

Available Tools

Create Document

Creates a new document in Sanity

Parameters:

  • type: Document type
  • content: Document content

Example:

{ "type": "post", "content": { "title": "My Post", "body": [ { "_type": "block", "children": [ { "_type": "span", "text": "Hello world!" } ] } ] } }

Edit Document

Edits an existing document

Parameters:

  • id: Document ID
  • content: Updated content

List Documents

Lists documents of a specific type

Parameters:

  • type: Document type
  • limit: Maximum number of documents to return (default: 10)

Get Schema

Gets a schema template based on an existing document

Note: For best results, manually create at least one document of each type before using this tool.

Parameters:

  • type: Document type

Example Usage

  1. Create a new blog post:
{ "tool": "create-document", "arguments": { "type": "post", "content": { "title": "My First Post", "slug": "my-first-post", "body": [ { "_type": "block", "children": [ { "_type": "span", "text": "This is my first post!" } ] } ] } } }
  1. Edit an existing post:
{ "tool": "edit-document", "arguments": { "id": "post-id-123", "content": { "title": "Updated Title" } } }
  1. List recent posts:
{ "tool": "list-documents", "arguments": { "type": "post", "limit": 5 } }
  1. Get schema for posts:
{ "tool": "get-schema", "arguments": { "type": "post" } }
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An MCP server that enables Claude Desktop to interact with Sanity.io content, providing tools to create, edit, list documents and get schema templates.

  1. Installation
    1. Usage with Claude Desktop
      1. Available Tools
        1. Create Document
        2. Edit Document
        3. List Documents
        4. Get Schema
      2. Example Usage

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          MCP server that builds itself by creating new tools as needed based on user requests (Requires restart of Claude Desktop to use newly created tools).
          Last updated -
          4
          13
          Python
          The Unlicense
        • -
          security
          A
          license
          -
          quality
          A local MCP server that enables AI applications like Claude Desktop to securely access and work with Obsidian vaults, providing capabilities for reading notes, executing templates, and performing semantic searches.
          Last updated -
          60
          TypeScript
          MIT License
          • Apple
          • Linux
        • -
          security
          A
          license
          -
          quality
          An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
          Last updated -
          132
          Python
          MIT License
          • Apple
          • Linux
        • -
          security
          -
          license
          -
          quality
          An MCP server that enables Claude and other MCP clients to interact with Mattermost workspaces, providing channel management, messaging capabilities, and topic monitoring functionality.
          Last updated -
          TypeScript

        View all related MCP servers

        ID: r586ovnwc0