diff --git a/mcp_server.py b/mcp_server.py index c798c13..61d0235 100644 --- a/mcp_server.py +++ b/mcp_server.py @@ -186,7 +186,12 @@ def _ensure_repos_ready(repos: List[str], ctx=None) -> List[str]: # If signature introspection fails, fall back to the safest constructor shape. pass -mcp = FastMCP("FastCode", **_fastmcp_kwargs) +mcp = FastMCP( + "FastCode", + host=os.getenv("FASTMCP_HOST", "0.0.0.0"), + port=int(os.getenv("FASTMCP_PORT", "8080")), + **_fastmcp_kwargs, +) @mcp.tool() @@ -419,6 +424,6 @@ def delete_repo_metadata(repo_name: str) -> str: args = parser.parse_args() if args.transport == "sse": - mcp.run(transport="sse", sse_params={"port": args.port}) + mcp.run(transport="sse") else: mcp.run(transport="stdio")