Sanity MCP Server — Hosted Api Connectors Integration
MCP Server language Hosted language PublicConnect your Sanity.io CMS to AI — run GROQ queries, manage documents, explore schemas, and administer projects with natural language.
Use with AI AssistantsMCP
Connect Claude, Cursor, or any MCP-compatible client — then call tools directly
① Add This MCP Server
Paste into your AI client config — then all its tools are available instantly.
{
"mcpServers": {
"sanity": {
"url": "https://mcp.aerostack.dev/s/aerostack/mcp-sanity",
"headers": {
"Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
}
}
}
}Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.
② Call a Tool
Ask your AI assistant to call a specific tool, or send raw JSON-RPC:
Natural Language Prompt
“Use the _ping tool to verify sanity credentials by calling a lightweight read endpoint. used internally by aerostack to validate credentials”
Using a Workspace?
Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.
description Overview
mcp-sanity — Sanity MCP Server
Connect your Sanity.io CMS to AI — run GROQ queries, manage documents, explore schemas, and administer projects with natural language.
Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-sanity
What You Can Do
This MCP server gives AI agents access to Sanity via 12 tools. Connect it to any Aerostack workspace and your agents can interact with Sanity directly.
Available Tools
| Tool | Description |
|---|---|
query |
Run a GROQ query against the Sanity dataset |
get_document |
Get a document by its ID |
create_document |
Create a new document in Sanity |
patch_document |
Update specific fields in an existing document |
delete_document |
Delete a document from Sanity |
list_projects |
List all Sanity projects accessible with the current token |
get_project |
Get details about a Sanity project |
list_datasets |
List datasets in a Sanity project |
list_schemas |
List all document types defined in the dataset |
count_documents |
Count documents of a specific type |
list_recent_documents |
List recently updated documents of a given type |
get_api_stats |
Get API usage statistics and project details |
Configuration
| Variable | Required | Description |
|---|---|---|
SANITY_API_TOKEN |
Yes | Personal access token or service token from the provider |
SANITY_PROJECT_ID |
Yes | See provider documentation |
SANITY_DATASET |
Yes | See provider documentation |
Quick Start
Add to Aerostack Workspace
- Go to aerostack.dev → Your Project → MCPs
- Search for "Sanity" and click Add to Workspace
Add the following secrets under Project → Secrets:
SANITY_API_TOKENSANITY_PROJECT_IDSANITY_DATASET
Once added, every AI agent in your workspace can use Sanity tools automatically.
Direct API Call
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-sanity \
-H 'Content-Type: application/json' \
-H 'X-Mcp-Secret-SANITY-API-TOKEN: your-sanity-api-token' \
-H 'X-Mcp-Secret-SANITY-PROJECT-ID: your-sanity-project-id' \
-H 'X-Mcp-Secret-SANITY-DATASET: your-sanity-dataset' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query","arguments":{}}}'
License
MIT
terminal Tools (13)
Available tools on this MCP server. Each tool can be called directly from any AI agent.
_ping #1 Verify Sanity credentials by calling a lightweight read endpoint. Used internally by Aerostack to validate credentials.
query #2 Run a GROQ query against the Sanity dataset
get_document #3 Get a document by its ID
create_document #4 Create a new document in Sanity
patch_document #5 Update specific fields in an existing document
delete_document #6 Delete a document from Sanity
list_projects #7 List all Sanity projects accessible with the current token
get_project #8 Get details about a Sanity project
list_datasets #9 List datasets in a Sanity project
list_schemas #10 List all document types defined in the dataset
count_documents #11 Count documents of a specific type
list_recent_documents #12 List recently updated documents of a given type
get_api_stats #13 Get API usage statistics and project details
Details
language Live Endpoint
https://mcp.aerostack.dev/s/aerostack/mcp-sanity
Sub-50ms globally · Zero cold start
Publisher
Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.
Tags
More in API Connectors
Browse API Connectors MCPs →Aerostack Registry
by @aerostack
Discover and invoke any MCP, Function, or Skill published to the Aerostack marketplace — the universal AI capability hub.
Algolia
by @aerostack
Search indexes, manage records, browse data, and configure ranking in Algolia — AI-native instant search access.
Arangodb
by @aerostack
Query documents, run AQL, traverse graphs, and manage collections in your ArangoDB database — AI-native multi-model database access.
Ayrshare
by @aerostack
Post, schedule, and analyze social media across 13 platforms — Facebook, Instagram, X, LinkedIn, TikTok, Bluesky, Threads, Reddit, Pinterest, YouTube, Telegram, Snapchat, Google Business.
Basecamp
by @aerostack
Manage projects, to-dos, messages, schedules, and campfire chats in Basecamp — AI-native project management.
Bigquery
by @aerostack
Run SQL queries, list datasets and tables, inspect schemas, and export results from Google BigQuery — AI-native data warehouse access.
Frequently asked questions
What is the Sanity MCP server and what can it do? +
The Sanity MCP server is hosted on Aerostack and exposes these tools to your AI agent: `_ping`, `query`, `get_document`, `create_document`, `patch_document`. You get one hosted URL — no self-hosting — that works from Claude, Cursor, ChatGPT, Gemini, VS Code, or any MCP-compatible client, and you can share it with your team or combine it with other MCP servers in a workspace.
Is the Sanity MCP server hosted, or do I have to run it myself? +
It's hosted on Aerostack's edge infrastructure — you don't deploy or maintain anything. Add it to a workspace and you get one authenticated URL, with secrets encrypted, that any AI agent or editor can connect to. Use it solo or share the same URL across your whole team.
Which AI agents and editors can use the Sanity MCP server? +
Any MCP client: Claude and Claude Code, Cursor, ChatGPT, Gemini, Windsurf, Cline, VS Code, and custom agents. Because it's one hosted URL, the same Sanity MCP server works everywhere — and you can compose it with other MCP servers, skills, and functions behind a single workspace URL.
How do I install the Sanity MCP server in Claude Desktop? +
Add the following to your Claude Desktop config (`claude_desktop_config.json`): ```json { "mcpServers": { "@aerostack/mcp-sanity": { "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-sanity"] } } } ``` Then restart Claude Desktop and the tools will appear automatically.
How do I use the Sanity MCP server in Cursor? +
In Cursor, open **Settings → MCP** and add: ```json { "name": "@aerostack/mcp-sanity", "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-sanity"] } ``` Save and reload Cursor. The MCP tools will be available in Agent mode.
Does Sanity MCP require authentication? +
Yes. Sanity requires authentication. Check the MCP's documentation for the required credentials.