File tree Expand file tree Collapse file tree 4 files changed +730
-807
lines changed Expand file tree Collapse file tree 4 files changed +730
-807
lines changed Original file line number Diff line number Diff line change @@ -4,17 +4,11 @@ version = "0.0.1"
44description = " Math and Weather Local MCP Server Agent"
55authors = [{
name =
" John Doe" ,
email =
" [email protected] " }]
66dependencies = [
7- " langgraph>=0.2.70" ,
8- " langchain-core>=0.3.34" ,
9- " langchain-anthropic>=0.3.9" ,
10- " langgraph-checkpoint-sqlite>=2.0.3" ,
11- " python-dotenv>=1.0.1" ,
12- " uipath-langchain==0.0.124" ,
13- " pydantic>=2.10.6" ,
14- " aiohttp>=3.11.12" ,
15- " typing-extensions>=4.12.2" ,
16- " langchain-mcp-adapters>=0.1.0" ,
17- " ipython>=8.32.0" ,
18- " mcp>=1.4.1" ,
7+ " uipath>=2.1.70" ,
8+ " langchain-anthropic>=0.3.20" ,
9+ " uipath-langchain>=0.0.135" ,
10+ " langchain-mcp-adapters>=0.1.10" ,
11+ " mcp>=1.15.0" ,
1912]
2013requires-python = " >=3.10"
14+
Original file line number Diff line number Diff line change 1+ import logging
2+
13from mcp .server .fastmcp import FastMCP
24
5+ logging .basicConfig (level = logging .INFO )
6+ logger = logging .getLogger (__name__ )
7+
38mcp = FastMCP ("Math" )
49
510@mcp .tool ()
611def add (a : int , b : int ) -> int :
712 """Add two numbers"""
8- return a + b
13+ result = a + b
14+ logger .info (f"Adding { a } and { b } : { result } " )
15+ return result
916
1017@mcp .tool ()
1118def multiply (a : int , b : int ) -> int :
1219 """Multiply two numbers"""
13- return a * b
20+ result = a * b
21+ logger .info (f"Multiplying { a } and { b } : { result } " )
22+ return result
1423
1524if __name__ == "__main__" :
1625 mcp .run (transport = "stdio" )
Original file line number Diff line number Diff line change 1+ import logging
2+
13from mcp .server .fastmcp import FastMCP
24
5+ logging .basicConfig (level = logging .INFO )
6+ logger = logging .getLogger (__name__ )
7+
38mcp = FastMCP ("Weather" )
49
510@mcp .tool ()
611async def get_weather (location : str ) -> str :
712 """Get weather for location."""
13+ logger .info (f"Getting weather for { location } " )
814 return "It's always sunny in New York"
915
1016if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments