• v1.15.0-mcp-multi: multi-server MCP client + stdio transport + config file + tool globs

    indifferentketchup released this 2026-05-24 04:08:42 +00:00 | 80 commits to main since this release

    Generalizes the v1.14.1 single-server Context7 PoC into a multi-server MCP
    client registry with per-server graceful degradation. JSON config at
    /data/mcp.json (bind-mounted alongside AGENTS.md) matches opencode's
    mcpServers schema shape. Config file missing = no MCP (opt-in by presence).

    Two transports: Streamable HTTP (remote servers like Context7) and stdio
    (local subprocess servers like codecontext). Stdio spawns a persistent child
    via the SDK's StdioClientTransport; shutdown hook closes all transports.

    Tool prefix generalized from context7_ to with
    a toolToServer reverse map for dispatch routing. AGENTS.md tools: field now
    supports glob patterns (context7
    , !web_) via matchToolGlob — last-match-
    wins with ! deny prefix. Replaces exact-match .includes() in stream-phase.ts.

    refreshToolNames() in agents.ts rebuilds the DEFAULT_TOOLS snapshot after
    appendMcpTools so agents without explicit tools: lists see MCP tools —
    reviewer caught that the module-load-time snapshot would permanently exclude
    late-registered tools.

    Read-only invariant: readOnlyHint === false rejected at discovery. Result
    size capped at 5MB. v1.14.1 env vars removed — superseded by config file.
    Default data/mcp.json ships with Context7 disabled.

    363/363 server tests passing. No schema changes, no frontend changes.

    Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

    Downloads