Skip to content

v0.2: stdio-transport MCP source adapter (Claude Desktop / Cursor MCP servers) #13

Description

@shreyanshjain7174

What

Add a transport adapter so ACP can import tools from MCP servers that speak stdio (the default mode for Claude Desktop and Cursor MCP integrations) in addition to the HTTP tools/list envelope already supported in v0.1.

Why

Today the importer at internal/sources/mcp speaks the MCP HTTP envelope only. But the most common MCP servers in the wild — chrome-devtools-mcp, flyctl mcp server, the official filesystem / GitHub / Slack reference servers — are stdio processes spawned by the client. Without stdio support, ACP can't ingest the largest existing population of MCP servers without users wrapping each one behind an HTTP shim.

Proposed shape

sources:
  - name: filesystem
    type: mcp-stdio
    command: npx
    args: ["-y", "@modelcontextprotocol/server-filesystem", "/Users/sunny/work"]
    env:
      LOG_LEVEL: warn

  - name: chrome
    type: mcp-stdio
    command: npx
    args: ["-y", "chrome-devtools-mcp@latest"]

Each mcp-stdio source is launched as a subprocess by acp-server at boot, then sent the standard MCP JSON-RPC initialize + tools/list framing over stdin/stdout. The discovered tools are normalized into the same registry.Tool shape the HTTP importer produces.

Acceptance

  • internal/sources/mcp_stdio package implementing Importer against a JSON-RPC stdio framing (the exact frame mcp-go and @modelcontextprotocol/sdk agree on).
  • Process lifecycle: spawn at boot, restart-on-crash with backoff, graceful shutdown on SIGTERM.
  • Exec routing: when an agent calls /v1/exec/<source>.<tool>, the proxy must forward the call over the same stdio process (not over HTTP), preserving JSON-RPC id correlation.
  • Integration test using the official @modelcontextprotocol/server-filesystem reference server.
  • Hot-reload note: stdio sources cannot be reloaded without restarting the subprocess; document in README.

Why v0.2, not v0.1.1

Stdio is a meaningfully different transport (process lifecycle, framing, exec routing). Forcing it into the v0.1.1 patch release alongside the --mcp-source flag (#13) makes both ship slower. Cut #13 first; #14 follows in v0.2.

Out of scope

  • Per-tool fan-out across multiple stdio replicas of the same server.
  • WebSocket or SSE MCP transports (tracked for later).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions