Skip to main content
Glama

Sanity MCP Server

by jlmelis

Sanity MCP 服务器

该 MCP 服务器提供了与 Claude Desktop 的 Sanity.io 内容进行交互的工具。

安装

  1. 克隆此存储库
  2. 安装依赖项:
npm install
  1. 使用您的 Sanity 凭证创建一个.env文件:
SANITY_PROJECT_ID=your_project_id SANITY_DATASET=your_dataset SANITY_TOKEN=your_token

与 Claude Desktop 一起使用

  1. 在 Claude Desktop 中,前往“设置”>“MCP 服务器”
  2. 使用以下设置添加新服务器:
{ "command": "node", "args": ["src/sanity-mcp-server.ts"], "env": { "SANITY_PROJECT_ID": "your_project_id", "SANITY_DATASET": "your_dataset", "SANITY_TOKEN": "your_token" } }

可用工具

创建文档

在 Sanity 中创建新文档

参数:

  • type :文档类型
  • content :文档内容

例子:

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

编辑文档

编辑现有文档

参数:

  • id :文档 ID
  • content :更新内容

列出文件

列出特定类型的文档

参数:

  • type :文档类型
  • limit :返回的最大文档数(默认值:10)

获取架构

根据现有文档获取架构模板

**注意:**为获得最佳效果,请在使用此工具之前手动创建每种类型的至少一个文档。

参数:

  • type :文档类型

示例用法

  1. 创建一篇新的博客文章:
{ "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. 编辑现有帖子:
{ "tool": "edit-document", "arguments": { "id": "post-id-123", "content": { "title": "Updated Title" } } }
  1. 列出最近的帖子:
{ "tool": "list-documents", "arguments": { "type": "post", "limit": 5 } }
  1. 获取帖子的架构:
{ "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.

MCP 服务器使 Claude Desktop 能够与 Sanity.io 内容进行交互,提供创建、编辑、列出文档和获取架构模板的工具。

  1. 安装
    1. 与 Claude Desktop 一起使用
      1. 可用工具
        1. 创建文档
        2. 编辑文档
        3. 列出文件
        4. 获取架构
      2. 示例用法

        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 -
          179
          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

        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