Skip to content

fix: make dory mcp serve work on macOS and MCP clients#40

Open
yb-sid wants to merge 1 commit into
Augani:mainfrom
yb-sid:fix/macos-mcp-serve-stdio
Open

fix: make dory mcp serve work on macOS and MCP clients#40
yb-sid wants to merge 1 commit into
Augani:mainfrom
yb-sid:fix/macos-mcp-serve-stdio

Conversation

@yb-sid

@yb-sid yb-sid commented Jul 23, 2026

Copy link
Copy Markdown

On macOS, launching the MCP Python server with i.e dory mcp serve, runs python3 /dev/fd/3 … 3<<'PY' which executes an empty script under Apple Python, so dory mcp serve exits with no output.

Write the server to a temporary file before running it so stdin stays free for stdio MCP. Rename tool identifiers from dotted names (dory.engine_status) to underscore names (dory_engine_status) so hosts that only accept [a-zA-Z0-9_-] do not drop every tool.

how I tested

printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"ping"}' \
  | ./scripts/dory mcp serve
# -> {"id":1,"jsonrpc":"2.0","result":{}}

printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"0"}}}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
  | ./scripts/dory mcp serve
# -> 15 tools, all dory_* names

On macOS, launching the embedded MCP Python server with
`python3 /dev/fd/3 … 3<<'PY'` often executes an empty script under
Apple Python, so `dory mcp serve` exits with no output.

Write the server to a temporary file before running it so stdin stays
free for stdio MCP. Rename tool identifiers from dotted names
(dory.engine_status) to underscore names (dory_engine_status) so hosts
that only accept [a-zA-Z0-9_-] do not drop every tool.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant