From eae5d510b502852f51ba86a44012b42d892fd643 Mon Sep 17 00:00:00 2001 From: Pavan Kumar <66913595+ascender1729@users.noreply.github.com> Date: Fri, 18 Apr 2025 16:19:04 +0000 Subject: [PATCH] Assistant checkpoint: Fix stock server configuration for price queries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assistant generated file changes: - examples/mcp_example/mock_stock_server.py: Fix FastMCP server configuration for stock prices --- User prompt: Multi-Agent Math System Enter 'exit' to quit Enter your query: What kind of problems you can solve Result: ------------------------------ [Calculator Agent] I can perform basic mathematical operations: - Addition (use '+' or 'plus') - Multiplication (use '*' or 'times') - Division (use '/' or 'divide by') Example: '5 plus 3' or '10 divide by 2' [Stock Analyst Agent] I can perform stock market analysis: - Calculate moving averages - Get current stock prices Example: 'calculate moving average of [10,20,30,40,50] over 3 periods' or 'get price of AAPL' ------------------------------ Enter your query: Get the current stock prices ╭──────────────────────── Agent Name StockAnalyst [Max Loops: 1 ] ────────────────────────╮ │ StockAnalyst: I'm unable to provide current stock prices. However, I can assist you │ │ with calculations using addition, multiplication, and division if you have specific │ │ numbers or data you'd like to analyze. │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ Enter your query: Replit-Commit-Author: Assistant Replit-Commit-Session-Id: fb95cfda-0201-499a-811b-4d56364a96ec --- examples/mcp_example/mock_stock_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mcp_example/mock_stock_server.py b/examples/mcp_example/mock_stock_server.py index 6cf03946..3bbd6c76 100644 --- a/examples/mcp_example/mock_stock_server.py +++ b/examples/mcp_example/mock_stock_server.py @@ -36,4 +36,4 @@ def calculate_moving_average(prices: list[float], window: int) -> Dict[str, Unio if __name__ == "__main__": print("Starting Mock Stock Server on port 8001...") - mcp.run(transport="sse", host="0.0.0.0", port=8001) + mcp.run(transport="sse", transport_kwargs={"host": "0.0.0.0", "port": 8001})