Create a server
server.fetch is the Web-standard deployment handler. server.listen() uses the same application for local Node serving. The protocol runtime is stateless: registrations are replayed into a fresh SDK server for each request, so register everything before the first request.
Register a tool
Schemas implement Standard Schema; Zod 4 is the documented example.outputSchema should return matching structuredContent and model-visible content.
Add an MCP App view
Put the component atviews/<name>/view.tsx, bind exactly one tool with view: { name }, and declare its outputSchema. The view reads pending, error, and ready states through useToolContext().
Develop locally
http://localhost:3000/mcp and opens the Inspector at http://localhost:3000/mcp/inspector. Successful server reloads swap the handler used by subsequent requests; view edits use Vite hot module replacement.
Tools
Define typed model actions.
Resources
Expose readable URI content.
Prompts
Publish reusable prompt templates.
Authentication
Protect the MCP endpoint.
OpenAPI
Generate tools from an API document.
Deployment
Build and deploy the server.