Migrate a Custom Tool-Calling Loop to an MCP Server (TypeScript, 2026)
A step-by-step checklist for lifting a hand-rolled Anthropic tool-calling loop onto a standalone MCP server. The tool bodies move almost verbatim; what changes is where the schema comes from, how results are wrapped, and how errors cross the process boundary.