Skip to main content
Glama

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

Related MCP Servers

  • -
    security
    F
    license
    -
    quality
    An MCP server that integrates with Claude to provide smart documentation search capabilities across multiple AI/ML libraries, allowing users to retrieve and process technical information through natural language queries.
    Last updated -
  • A
    security
    F
    license
    A
    quality
    A server built on mcp-framework that enables integration with Claude Desktop through the Model Context Protocol.
    Last updated -
    1
    1
    • Apple
  • A
    security
    F
    license
    A
    quality
    A server built with mcp-framework that allows users to extend Claude's capabilities by adding custom tools that can be used through the Claude Desktop client.
    Last updated -
    3
    31
  • A
    security
    F
    license
    A
    quality
    An MCP server that integrates with Claude Desktop for managing personal journal entries, providing both a web viewer for browsing journals and tools for adding, searching, and analyzing journal content.
    Last updated -
    6
    9
    1

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jlmelis/sanity-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server