Repository navigation
ADR 0012
github-actions[bot] edited this page Nov 19, 2026
·
2 revisions
- Status: Accepted
- Date: 2026-08-01
- Deciders: LINUX plane (operator-directed)
- Relates to: LBA-REQ-019, LBA-REQ-012 (agent base instructions), LBA-REQ-013 (coordination bus),
src/mcp/
Coding agents (Copilot, Claude, etc.) increasingly consume tools through the Model Context Protocol (MCP).
The benchmark actor already exposes value an agent wants — host capabilities, the deterministic mprr benchmark
series, and the lbabus coordination bus (poll / post). The question is how an agent reaches those: bespoke VS
Code commands only, or a standard MCP tool surface the agent can discover and call directly.
Ship an MCP server that publishes the benchmark actor's tools over newline-delimited JSON-RPC 2.0:
- The protocol logic is a pure, dependency-free handler (
benchmarkActorMcpServer.ts) with injected tool deps, so it is fully unit-testable without VS Code, a display, or a livelbabus. - A thin stdio entrypoint (
runBenchmarkActorMcpServer.ts) wires stdin/stdout and injects the real deps (shelllbabus, read the bundled mprr series). It is dependency-free (Node built-ins only), so it adds nothing to the packaged extension's runtime dependency allowlist. - A definition provider (
benchmarkActorMcpServerProvider.ts) registers the server with VS Code'slm.registerMcpServerDefinitionProviderunder the same id the manifest contributes. - Four tools are published:
get_host_capabilities,get_benchmark_series,poll_coordination_bus,post_coordination_note. A missinglbabusdegrades to a softisErrorresult (not a transport crash) so the agent can act on the message.
- Agents discover and call the benchmark actor's tools through a standard surface, independent of the VS Code command palette.
- The pure-handler + injected-deps seam keeps the protocol deterministically unit-testable (
test/mcp-server.mjs), and a bundled tool-doc check (scripts/mcpToolDoc.mjs) keepsdocs/mcp-tools.mdin sync with the registry. - No new runtime dependency enters the packaged
.vsix(Node built-ins only).
- Expose the tools only as VS Code commands. Rejected: commands are not agent-discoverable as tools; MCP is the emerging standard surface an agent already understands.
- Embed a full MCP SDK. Rejected: the JSON-RPC 2.0 stdio contract the actor needs is small; a dependency-free handler keeps the extension's dependency allowlist clean and the protocol logic unit-testable.
Generated from docs/architecture/adr/ADR-0012-mcp-server-agent-tool-surface.md on develop. Edit the source in the repository, not this page.