Repository navigation
LBA REQ 019
Proven
Agentic infra (Model Context Protocol tool surface; ADR-0012)
The system shall expose the benchmark actor's tools to a coding agent through a Model Context Protocol server.
Coding agents consume tooling through MCP. The actor already holds
value an agent wants — host capabilities, the deterministic mprr benchmark
series, and the lbabus coordination bus — so a standard MCP surface lets an
agent discover and call those tools directly rather than through bespoke VS
Code commands.
- The pure JSON-RPC 2.0 handler (
benchmarkActorMcpServer.ts) answersinitialize,tools/list, andtools/callover newline-delimited stdio, publishing exactly four core tools —get_host_capabilities,get_benchmark_series,poll_coordination_bus,post_coordination_note— and returns-32601/-32602for an unknown method / tool. - A missing
lbabusdegrades to a softisErrortool result, not a transport crash, so the agent can act on the message. - The definition provider (
benchmarkActorMcpServerProvider.ts) registers with VS Code under the same id the manifest contributes, launching the bundled dependency-free stdio entry (runBenchmarkActorMcpServer.ts). - The bundled tool-doc check keeps
docs/mcp-tools.mdin sync with the published registry. - A local Ollama client can discover and call those tools without the editor.
Only the three read-only core tools are enabled by default. A fake chat endpoint
exercises the real stdio server and the self-test receipt (
test/ollama-mcp-bridge.mjs, ADR-0092). - Gated:
test/mcp-server.mjs(pure-core, activation, and stdio legs) andscripts/mcpToolDoc.mjs --checkrun undernpm test, all deterministic and host-free (no real VS Code, no display, no livelbabus).
Keep the protocol logic a pure handler with injected deps and
the stdio entry dependency-free (Node built-ins only) so no new runtime
dependency enters the packaged .vsix. Decision recorded in ADR-0012. Authored
under the repo-standards-review singular-requirement directive (one shall).
src/mcp/benchmarkActorMcpServer.ts; src/mcp/runBenchmarkActorMcpServer.ts; src/mcp/benchmarkActorMcpServerProvider.ts; test/mcp-server.mjs; scripts/mcpToolDoc.mjs; docs/mcp-tools.md; docs/architecture/adr/ADR-0012-mcp-server-agent-tool-surface.md; src/mcp/ollamaMcpBridge.ts; test/ollama-mcp-bridge.mjs; docs/architecture/adr/ADR-0092-local-ollama-mcp-bridge.md
Proven