Cover image
Try Now
2025-03-06

MCP与理智项目互动。

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

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"
  }
}

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    3 (1)
    Avatar
    user_Cp0x7PB1
    2025-04-16

    Sanity-mcp-server by jlmelis is an exceptional tool for managing MCP applications. The server is user-friendly, well-documented, and integrates seamlessly with various systems. The performance is remarkable, providing stable and efficient service without any hitches. Highly recommend this for anyone looking for a reliable MCP server!