fix: stop suppressing server stderr in fastmcp call (#3283)

Server subprocess stderr was being sent to /dev/null, which silently
discarded print(..., file=sys.stderr) and logging output from tools.
This commit is contained in:
Jeremiah Lowin 2026-02-23 15:07:31 -05:00 committed by GitHub
commit e87ede075c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,6 @@
import difflib
import json
import os
import shlex
import sys
from pathlib import Path
@ -100,7 +99,6 @@ def resolve_server_spec(
return StdioTransport(
command="fastmcp",
args=["run", str(resolved_path), "--no-banner"],
log_file=Path(os.devnull),
)
# .js — pass through for Client's infer_transport
return spec
@ -125,7 +123,7 @@ def _build_stdio_from_command(command_str: str) -> StdioTransport:
console.print("[bold red]Error:[/bold red] Empty --command")
sys.exit(1)
return StdioTransport(command=parts[0], args=parts[1:], log_file=Path(os.devnull))
return StdioTransport(command=parts[0], args=parts[1:])
def _resolve_json_spec(path: Path) -> str | dict[str, Any]: