Skip to content

LBA REQ 019

github-actions[bot] edited this page Nov 23, 2026 · 3 revisions

LBA-REQ-019: MCP server agent tool surface

Status

Proven

Area

Agentic infra (Model Context Protocol tool surface; ADR-0012)

Statement

The system shall expose the benchmark actor's tools to a coding agent through a Model Context Protocol server.

Rationale

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.

Acceptance Criteria

  • The pure JSON-RPC 2.0 handler (benchmarkActorMcpServer.ts) answers initialize, tools/list, and tools/call over newline-delimited stdio, publishing exactly four core tools — get_host_capabilities, get_benchmark_series, poll_coordination_bus, post_coordination_note — and returns -32601 / -32602 for an unknown method / tool.
  • A missing lbabus degrades to a soft isError tool 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.md in 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) and scripts/mcpToolDoc.mjs --check run under npm test, all deterministic and host-free (no real VS Code, no display, no live lbabus).

Verification

Historical statement (no longer implemented)

Supersession

Change Guidance

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).

TestID

T-019

CodeRef

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

RTM Status

Proven

Clone this wiki locally