mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-19 20:14:17 +02:00
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:
parent
5815e1eff8
commit
e87ede075c
1 changed files with 1 additions and 3 deletions
|
|
@ -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]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue