-
Agentic AI – MCP Custom Server Implementation
Agentic AI – MCP Custom Server Implementation Table Of Contents: MCP Server Implementation? Math MCP Server Implementation. Weather MCP Server Implementation. MultiServer MCP Client + LangChain Agent. Run The Workflow. (1) MCP Server Implementation (2) Math MCP Server Implementation # math_server.py from fastmcp import FastMCP mcp = FastMCP("Math") @mcp.tool() def add(a: int, b:int)->int: """Add Two Numbers""" return a * b @mcp.tool() def multiply(a:int, b:int)-> int: """Multiply Two Numbers""" return a * b if __name__ ==== "__main__": mcp.run(transport="stdio") (3) Weather MCP Server Implementation # weather_server.py from fastamcp import FastMCP mcp = FastMCP("Weather") @mcp.tool() async def get_weather(location: str) -> str: """Get Weather
