Files
mcp-python-sdk/examples/fastmcp/simple_echo.py
2024-12-21 00:46:36 +00:00

15 lines
202 B
Python

"""
FastMCP Echo Server
"""
from mcp.server.fastmcp import FastMCP
# Create server
mcp = FastMCP("Echo Server")
@mcp.tool()
def echo(text: str) -> str:
"""Echo the input text"""
return text