Files
copilotkit__copilotkit/examples/showcases/multi-agent-canvas/agent/math_server.py
2026-03-12 13:06:02 -07:00

17 lines
323 B
Python

# math_server.py
from mcp.server.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")