Build Module 5 on top of your Module 4 work (or checkpoint-4-hitl-schedule).
The goal
Offer the reviewer you built as MCP tools so any client can call it:
ReviewMCPextendsMcpAgent,review-prandreview-diffregistered ininit(),- served at
/mcpover Streamable HTTP.
Build the server
Have your agent scaffold ReviewMCP with an McpServer. Register review-pr (fetch a public PR, run the reviewer) and review-diff (review a raw diff), reusing runReview and the generalist prompt from Module 2.
Wire it up
Mount with ReviewMCP.serve("/mcp", { binding: "ReviewMCP" }) and route /mcp in the Worker’s fetch handler. In wrangler.jsonc, add a second Durable Object binding and a new_sqlite_classes migration for ReviewMCP, and re-export the class from the entrypoint.
Critical gotcha
Forget the re-export or the migration and the binding silently no-ops at runtime. Cloudflare will not error.
Stuck?
git checkout checkpoint-5-mcp -- src/
Done when
- An MCP client (or
curl) to/mcplistsreview-prandreview-diff. - Calling
review-pron a public PR returns structured findings. - You can explain why the re-export and migration are required.