How We Use Sanity MCP in Visual Studio Code Copilot

In This Article
Introduction
Managing content in a headless CMS used to mean constantly switching between your code editor and a browser-based studio. That back-and-forth wasn’t just annoying — it slowed down development and broke focus.
With the introduction of Sanity MCP (Model Context Protocol) and GitHub Copilot in VS Code, that context-switching is now a thing of the past.
You can query, create, update, and publish content directly from your editor — simply by describing what you want in natural language.
What Is Sanity MCP?
MCP (Model Context Protocol) is an open standard that allows AI assistants to communicate with external tools in a structured way.
With the official MCP server from Sanity, tools like GitHub Copilot can directly interact with your content.
The official MCP endpoint:
https://mcp.sanity.io
Through this integration, Copilot can:
- List datasets and schemas
- Query documents using GROQ
- Create new documents
- Patch and update existing content
- Publish or unpublish drafts
Instead of writing API calls or opening Sanity Studio, you simply tell Copilot what you want.


