Sanity

平台与服务

by sanity-io

可直接访问你的 Sanity 项目,包括 content、datasets、releases、schemas 及 agent rules。

需要统一管理 Sanity 项目的内容、数据集、schema 和发布流程时,它能直连核心资源,协作更新比东拼西凑更省心。

什么是 Sanity

可直接访问你的 Sanity 项目,包括 content、datasets、releases、schemas 及 agent rules。

README

<p align="center"> <a href="https://sanity.io"> <img src="https://cdn.sanity.io/images/3do82whm/next/d6cf401d52c33b7a5a354a14ab7de94dea2f0c02-192x192.svg" /> </a> <h1 align="center">Sanity Agent Toolkit</h1> </p>

Collection of resources to help AI agents build better with Sanity. Supports Cursor, Claude Code, VS Code, Lovable, v0, and any other editor/agent compatible with MCP or Agent Skills.


Features

  • MCP server: Direct access to your Sanity projects (content, datasets, releases, schemas) and agent rules.
  • Agent skills: Comprehensive best practices skills for Sanity development, content modeling, SEO/AEO, and experimentation. Includes 21 integration/topic guides and 26 focused best-practice rules.
  • Claude Code plugin: MCP server, agent skills, and slash commands for Claude Code users.
  • Cursor plugin: MCP server, agent skills, and commands for the Cursor Marketplace.

Get started

Choose your path based on how you want agents to work with Sanity:

  1. MCP server — Give your agent always up-to-date rules and full access to your Sanity projects. No local files to maintain. Works with Cursor, VS Code, Claude Code, Lovable, v0, and other MCP-compatible clients.
  2. Agent skills — Install best practices skills for Sanity, content modeling, SEO/AEO, and experimentation. Works with Cursor, Claude Code, and any Agent Skills-compatible agent.
  3. Plugin — Install the Sanity plugin for Cursor or Claude Code. Bundles MCP server, agent skills, and commands.
  4. Manual installation — Copy the skill references locally for offline use. You'll need to update them yourself.

Option 1: Install MCP server (recommended)

Give agents direct access to Sanity projects and always up-to-date agent rules via the MCP server.

Quick install via Sanity CLI

Run in terminal to detect and configure MCP for Cursor, Claude Code and VS Code automatically:

bash
npx sanity@latest mcp configure

Uses your logged-in CLI user for authentication — no manual tokens or OAuth needed.

Client-specific instructions

<details> <summary><strong>Cursor</strong></summary>

One-click install:<br> Install MCP Server

Or manually: Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P) → View: Open MCP Settings+ New MCP Server → add to mcp.json:

json
{
  "mcpServers": {
    "Sanity": {
      "type": "http",
      "url": "https://mcp.sanity.io"
    }
  }
}
</details> <details> <summary><strong>Claude Code</strong></summary>

Run in terminal. Authenticate with OAuth on next launch:

bash
claude mcp add Sanity -t http https://mcp.sanity.io --scope user
</details> <details> <summary><strong>VS Code</strong></summary>

Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P) → MCP: Open User Configuration → add:

json
{
  "servers": {
    "Sanity": {
      "type": "http",
      "url": "https://mcp.sanity.io"
    }
  }
}
</details> <details> <summary><strong>Lovable</strong></summary>

SettingsConnectorsPersonal connectorsNew MCP server → Enter Sanity as name and https://mcp.sanity.io as Server URL → Add & authorize → Authenticate with OAuth.

</details> <details> <summary><strong>v0</strong></summary>

In the prompt input field, click Prompt ToolsMCPsAdd New → Select SanityAuthorize → Authenticate with OAuth.

</details> <details> <summary><strong>Replit</strong></summary>

Go to Integrations Page → scroll to MCP Servers for Replit AgentAdd MCP server → Enter Sanity as name and https://mcp.sanity.io as Server URL → Test & Save → Authenticate with OAuth.

</details> <details> <summary><strong>OpenCode</strong></summary>

Add to your opencode.json:

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "sanity": {
      "type": "remote",
      "url": "https://mcp.sanity.io",
      "oauth": {}
    }
  }
}

Then run: opencode mcp auth sanity

</details> <details> <summary><strong>Other clients</strong></summary>

For any MCP-compatible client, add https://mcp.sanity.io as the server URL.

If your client doesn't support remote MCP servers, use a proxy like mcp-remote:

json
{
  "mcpServers": {
    "Sanity": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.sanity.io", "--transport", "http-only"]
    }
  }
}
</details> <br />

See the Sanity MCP docs for authorization options and troubleshooting.

Option 2: Install Agent Skills

Install best practices skills that work with any Agent Skills-compatible agent.

bash
npx skills add sanity-io/agent-toolkit

See Option 3 for plugin installation.

Option 3: Install plugin

Install the Sanity plugin to get MCP server, agent skills, and commands.

Claude Code

  1. Add the Sanity marketplace:
code
/plugin marketplace add sanity-io/agent-toolkit
  1. Install the plugin:
code
/plugin install sanity-plugin@sanity-agent-toolkit
  1. Verify installation: Ask Claude Code: "which skills do you have access to?"

You should see the Sanity skills listed.

  1. Start using: Use natural language and skills activate automatically:

Help me create a blog post schema in Sanity

Review my GROQ query and Next.js Visual Editing setup

Or run /sanity to explore all capabilities.

Cursor

In Cursor chat, run:

code
/add-plugin sanity

Option 4: Manual installation

Install the skill references locally to teach your editor Sanity best practices:

  1. Copy skills/sanity-best-practices/ to your project.
  2. (Recommended) Copy AGENTS.md to your project root to act as a knowledge router.

Capabilities

MCP tools

With MCP connected, your AI can use tools like:

  • query_documents — run GROQ queries directly
  • create_documents_from_json / create_documents_from_markdown — create draft documents
  • patch_document_from_json / patch_document_from_markdown — surgical edits to existing documents
  • publish_documents / unpublish_documents — manage document lifecycle
  • deploy_schema / get_schema — deploy and inspect schemas
  • create_version — create version documents for releases
  • generate_image / transform_image — AI image generation and editing
  • search_docs / read_docs — search and read Sanity documentation
  • list_sanity_rules / get_sanity_rules — load agent rules on demand

See the full list of available tools.

Agent skills

Best practices skills that agents like Claude Code, Cursor, GitHub Copilot, etc. can discover and use automatically. Skills follow the Agent Skills format. See Option 2 for installation.

SkillDescription
sanity-best-practicesGROQ performance, schema design, Visual Editing, images, Portable Text, Studio, TypeGen, localization, migrations, and framework integration guides
content-modeling-best-practicesStructured content principles: separation of concerns, references vs embedding, content reuse
seo-aeo-best-practicesSEO/AEO with EEAT principles, structured data (JSON-LD), technical SEO patterns
content-experimentation-best-practicesA/B testing methodology, statistical foundations, experiment design

Getting started flow

The onboarding guide follows three phases:

  1. Studio & Schema — Set up Sanity Studio and define your content model
  2. Content — Import existing content or generate placeholder content via MCP
  3. Frontend — Integrate with your application (framework-specific)

Just say: "Get started with Sanity" to begin.

Slash commands (Claude Code)

CommandWhat it does
/sanityList available skills and help topics
/reviewReview code for Sanity best practices
/typegenRun TypeGen and troubleshoot issues
/deploy-schemaDeploy schema with verification

Repository structure

Note: The reference files in skills/sanity-best-practices/references/ are the canonical content for the Sanity MCP server's list_sanity_rules / get_sanity_rules tools. Each file must have valid name and description frontmatter — rule names are derived from filenames (e.g., nextjs.mdnextjs).

text
sanity-io/agent-toolkit/
├── AGENTS.md                      # Knowledge router & agent behavior
├── README.md                      # This file
├── .claude-plugin/                # Claude Code plugin configuration
│   └── marketplace.json           # Plugin metadata and marketplace config
├── .cursor-plugin/                # Cursor plugin configuration
│   ├── marketplace.json           # Cursor marketplace metadata
│   └── plugin.json                # Per-plugin manifest
├── .mcp.json                      # MCP server configuration
├── assets/                        # Plugin branding
│   └── logo.svg                   # Sanity logo for marketplace display
├── commands/                      # Agent commands
│   ├── sanity.md                  # /sanity help
│   ├── review.md                  # /review
│   ├── typegen.md                 # /typegen
│   └── deploy-schema.md           # /deploy-schema
├── scripts/                       # Validation and CI scripts
│   └── validate-cursor-plugin.mjs # Cursor plugin validator
└── skills/                        # Agent skills (agentskills.io format)
    ├── sanity-best-practices/     # Comprehensive Sanity skill
    │   ├── SKILL.md               # Skill definition and quick reference
    │   └── references/            # Canonical content (22 guides)
    │       ├── get-started.md     # Onboarding guide
    │       ├── nextjs.md          # Next.js integration
    │       ├── groq.md            # GROQ patterns & performance
    │       ├── schema.md          # Schema design & validation
    │       └── ...                # See SKILL.md for full index
    ├── content-modeling-best-practices/      # Modeling guidance + topic resources
    ├── seo-aeo-best-practices/               # SEO/AEO guidance + topic resources
    └── content-experimentation-best-practices/ # Experiment design + stats resources

Focused topic skills keep their supporting docs in resources/. The main sanity-best-practices skill uses references/ because those files are also the canonical source for the MCP server's Sanity rules.


Resources


Contributing

Found a better pattern? Missing a framework or best practice?

  1. Fork the repo.
  2. Install dependencies with npm ci.
  3. Update the relevant file in skills/<skill-name>/SKILL.md, skills/<skill-name>/references/, or skills/<skill-name>/resources/.
  4. Keep SKILL.md frontmatter focused on name and description, since those are the primary discovery fields for skills.
  5. Run npm run validate:all to check skill and plugin validity.
  6. Submit a PR.

Support


License: MIT

常见问题

Sanity 是什么?

可直接访问你的 Sanity 项目,包括 content、datasets、releases、schemas 及 agent rules。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描109.6k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描109.6k

接口设计评审

by alirezarezvani

Universal
热门

审查 REST API 设计是否符合行业规范,自动检查命名、HTTP 方法、状态码与文档覆盖,识别破坏性变更并给出设计评分,适合评审接口方案和版本迭代前把关。

做API和架构方案时,它能帮你提前揪出接口设计问题并对齐最佳实践,评审视角系统,团队协作更省心。

平台与服务
未扫描9.0k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
82.9k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.5k

评论