sanity-io/agent-toolkit

Verified

Collection of resources to help AI agents build better with Sanity.

56 stars3 forksUpdated Jan 24, 2026
npx skills add sanity-io/agent-toolkit

README

Sanity Agent Toolkit

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, Agent Skills, or .mdc rules.


Features

  • Agent rules: 20+ portable .mdc files covering schema design, GROQ, Visual Editing, SEO, localization, migrations, and front-end framework integrations.
  • Agent skills: Comprehensive best practices skills for Sanity development, content modeling, SEO/AEO, and experimentation.
  • MCP server: Direct access to your Sanity projects (content, datasets, releases, schemas) and agent rules.
  • Claude Code plugin: Slash commands and MCP integration for Claude Code users.

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. Claude Code plugin — Adds interactive skills and slash commands on top of MCP for guided workflows.
  4. Manual installation — Copy rules 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:

npx sanity@latest mcp configure

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

Client-specific instructions

Cursor

One-click install:
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:

{
  "mcpServers": {
    "Sanity": {
      "type": "http",
      "url": "https://mcp.sanity.io"
    }
  }
}
Claude Code

Run in terminal. Authenticate with OAuth on next launch:

claude mcp add Sanity -t http https://mcp.sanity.io --scope user
VS Code

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

{
  "servers": {
    "Sanity": {
      "type": "http",
      "url": "https://mcp.sanity.io"
    }
  }
}
Lovable

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

v0

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

Replit

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.

OpenCode

Add to your opencode.json:

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

Then run: opencode mcp auth sanity

Other clients

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:

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

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.

npx skills add sanity-io/agent-toolkit

*Cursor:

...

Read full README

Publisher

sanity-iosanity-io

Statistics

Stars56
Forks3
Open Issues2
LicenseMIT License
CreatedMar 11, 2025