Skip to content

[BUG] openfang mcp stdio server does not respond to JSON-RPC initialize request #399

@houko

Description

@houko

Description

openfang mcp starts but never responds to any JSON-RPC messages over stdio. Both manual testing and MCP clients (mcporter) time out waiting for a response.

Environment

  • OS: macOS (Darwin arm64, Apple Silicon)
  • OpenFang version: 0.3.26
  • Daemon status: Running (confirmed via openfang status)
  • Installation method: curl -fsSL https://openfang.sh/install | sh

Steps to Reproduce

  1. Install OpenFang and run openfang setup --quick
  2. Start daemon: openfang start
  3. Confirm daemon is running: openfang status → shows running, 2 agents active
  4. Send a valid MCP initialize request via stdio:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}}}\n' | openfang mcp
  1. No output is produced. The process hangs until stdin closes, then exits silently.

Expected Behavior

openfang mcp should respond with a JSON-RPC initialize result, e.g.:

{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"serverInfo":{"name":"openfang","version":"0.3.26"}}}

Actual Behavior

  • No output on stdout
  • No error on stderr
  • Process hangs indefinitely (stdin kept open) or exits silently (stdin closed)
  • Tested with mcporter MCP client: times out after 30s and 60s
  • The HTTP REST API (/api/health, /api/agents, /api/hands, etc.) works perfectly on port 4200

Workaround

I wrote a lightweight Node.js MCP bridge that wraps the OpenFang HTTP REST API as a standard MCP stdio server. This works fine, confirming the daemon itself is healthy — only the openfang mcp stdio transport is affected.

Additional Context

  • openfang mcp --help shows no additional options beyond --config
  • The daemon is fully functional via HTTP API during the test
  • Tested on a clean install with default config (Gemini provider)

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