About this screen

Copy-ready integration code

The Sample code dialog in Sanity Context shows a complete chat route using the Vercel AI SDK: imports from the Anthropic and MCP packages, a Sanity client set up for the organization, and an MCP client pointing at the "northwind-support-agent" endpoint, whose URL and authorization header are highlighted.

Notes on setup around the code

A line above the code explains which SDK version the sample targets and what to rename on older versions. Text below says to set SANITY_ORGANIZATION_TOKEN server-side and links to the organization's API tokens page.

Other frameworks and copy

The footer offers "Other frameworks" as a link out and a dark "Copy code" button, while the endpoint page stays dimmed behind the wide dialog.

Similar Details screens

All Details screens

More from Sanity

All Sanity screens