mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 14:54:24 +01:00
Update all FastMCP examples to use mcp.server.fastmcp instead of fastmcp. Add tests to verify example servers work correctly. Changes: - Update import paths in all example files - Create test_examples.py to verify functionality - Fix test assertions to match actual response format
16 lines
203 B
Python
16 lines
203 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
|