Sanity Studio v4.21.0: Configure Sanity MCP server with CLI, updated blueprint commands + improvements and bugfixes

✨ Highlights

Configure Sanity MCP server with CLI

We’ve made it easier to connect your AI coding assistant to Sanity. When running sanity init, the CLI now detects AI-powered editors like Cursor, Claude Code and VSCode and offers to configure the Sanity MCP server automatically.
Once configured, your AI agents gains access to a suite of Sanity tools, allowing it to:

Understand context: Read schemas and project configuration automatically.

Manage content: Create documents, patch fields, and generate images.

Run operations: Execute GROQ queries, manage datasets, and schedule releases.

To add this to an existing project, run sanity mcp configure. If you prefer to skip this step during init, you can use the --no-mcp flag.
Read more about the MCP server on https://mcp.sanity.io.

Updated blueprints commands: init and config.

blueprints init and blueprints config got some nice quality-of-life updates including more dynamic re-initialization and configuration for blueprints projects. Output is also more helpful and interactive.

This update also helps support multiple blueprint stacks per Sanity project, enabling some very powerful customer workflows in the near future. You can learn more about stacks in the blueprints documentation.

🐛 Notable bugfixes

Fixes an issue where datetime was saved using the selected timezone if the user selected the date from the calendar.

Typegen: Fixes a regression when extracting schema that would generate an invalid self reference type.

Enhanced object dialog (beta) improvements: added more flexible approach for custom components within arrays of objects. Custom components should open as expected.

Dropping files into array and Portable Text inputs will now support uploading images and files to Media Library.

Improves how the user chooses destinations for uploads if several destinations are available.