How to set up the Sanity MCP server in Claude
- Run the hosted-server command below in your terminal.
- Start Claude Code, finish OAuth in its MCP menu, and choose the intended project and dataset.
Claude Code · Add in Claude Code
claude mcp add Sanity -t http https://mcp.sanity.io --scope userTry a first task
Inspect an author schema in a test dataset. Ask which fields a draft biography must contain and which are optional.
Compare the result with your Studio schema and open a known author entry to validate an example.
What to check before using it
Check the chosen dataset before requesting edits. The connection works within the projects visible to the authorized Sanity account.