Skip to content

MCP client: spawn servers, capability handshake, tool discovery #3

@humancto

Description

@humancto

Status

MCP client already exists in crates/punch-runtime/src/mcp.rs — fully implemented with:

  • Subprocess spawning with stdio transport (JSON-RPC 2.0)
  • Tool discovery (tools/list)
  • Tool invocation (tools/call)
  • Error handling, timeouts, comprehensive tests

What is NOT wired in

  • fighter_loop.rs — No calls to McpClient
  • tool_executor.rs — No MCP tool execution logic
  • Ring — No MCP server lifecycle management
  • PunchConfig — No mcp_servers config field
  • FighterManifest — No MCP capability gating

Work Required

  1. Add mcp_servers: HashMap<String, McpServerConfig> to PunchConfig
  2. Integrate McpClient startup/shutdown into Ring lifecycle
  3. Register discovered MCP tools in the tool executor
  4. Route MCP tool calls from fighters to the correct server
  5. Add mcp_allowlist capability to FighterManifest
  6. End-to-end integration tests

Context

The hard part (protocol implementation) is done. This is integration work — wiring the existing client into the Ring and fighter loop.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions