From 04ed17d59e031531c50198d5a765bbe8719cc077 Mon Sep 17 00:00:00 2001 From: Pavan Kumar <66913595+ascender1729@users.noreply.github.com> Date: Thu, 17 Apr 2025 16:34:32 +0000 Subject: [PATCH] chore: configure MCP servers to run in parallel with proper networking --- .replit | 4 ++-- examples/mcp_example/calc_server.py | 2 +- examples/mcp_example/math_server.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.replit b/.replit index e3a29fb7..18e64dfc 100644 --- a/.replit +++ b/.replit @@ -66,11 +66,11 @@ mode = "sequential" [[workflows.workflow.tasks]] task = "shell.exec" -args = "python examples/mcp_example/math_server.py & " +args = "python examples/mcp_example/math_server.py" [[workflows.workflow.tasks]] task = "shell.exec" -args = "python examples/mcp_example/calc_server.py &" +args = "python examples/mcp_example/calc_server.py" [[workflows.workflow.tasks]] task = "shell.exec" diff --git a/examples/mcp_example/calc_server.py b/examples/mcp_example/calc_server.py index 9cb006d4..00e74add 100644 --- a/examples/mcp_example/calc_server.py +++ b/examples/mcp_example/calc_server.py @@ -33,4 +33,4 @@ def break_even_point(fixed_costs: float, price_per_unit: float, cost_per_unit: f if __name__ == "__main__": print("Starting Business Calculator Server on port 6275...") - mcp.run(transport="sse") + mcp.run(host="0.0.0.0", port=6275, transport="sse") diff --git a/examples/mcp_example/math_server.py b/examples/mcp_example/math_server.py index 4957b3ea..458c87bb 100644 --- a/examples/mcp_example/math_server.py +++ b/examples/mcp_example/math_server.py @@ -36,4 +36,4 @@ def calculate_percentage(part: float, whole: float) -> float: if __name__ == "__main__": print("Starting Math Server on port 6274...") - mcp.run(transport="sse") + mcp.run(host="0.0.0.0", port=6274, transport="sse")