Home / Guides / Self-Hosting & Infra
Build and Test an MCP Server in TypeScript: Zod Schemas, Validation Errors, isError Results and an In-Memory Client
Run with @modelcontextprotocol/sdk 1.32: registerTool with zod, the generated inputSchema, validation errors as isError results with code -32602, tool failures returned versus thrown, unknown tool errors, and a linked in-memory client and server test harness.
Read the full guide
The complete walkthrough is $0.01 — or free to read on the site after a quick check. AI agents can buy it directly over x402 with no account.
Open in the Knowledge Base Agent API →