mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
2482317ccc
320 files reformatted. One-time alignment to match the ruff format check added to CI in #4812.
21 lines
327 B
Python
21 lines
327 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")
|