Open Code Review (OCR) — MCP client
Lets a review extend its available tools with external MCP servers, without the model ever seeing a difference from a built-in tool. Package: internal/mcp/.
What flows through it
Technical details
Package: internal/mcp/
Depends on: llm, tool
Depended on by: CLI, LLM transport
What actually happens here
client.go manages the MCP session (stdio transport, per client_test.go/stdio_test.go). provider.go's RegisterAll copies each MCP tool into the shared tool.Registry as a Provider whose Execute calls client.CallTool, after checking two collision rules: a tool name can't shadow a built-in (tool.IsReserved) and can't shadow an already-registered tool — either logs a warning and skips rather than silently overriding.
How the LLM / model version is chosen
No model calls in this package — it is pure protocol/adapter plumbing between MCP servers and the tool.Registry.
Deterministic (non-LLM) work in this module
Tool-name collision resolution and JSON-schema-to-llm.ToolDef conversion (ToToolDef) are fully deterministic.
Part of the module docs index. Full interactive version, with every module
side by side: architecture.html §7. Cross-cutting mechanisms
this module participates in (retry, compression, manifest, resume, hashing): LLD.