Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions mcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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")