feat: Initial commit
This commit is contained in:
21
tests/fixtures/echo_server.py
vendored
Normal file
21
tests/fixtures/echo_server.py
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Simple MCP server used for testing: string tools."""
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
mcp = FastMCP("echo")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def echo(message: str) -> str:
|
||||
"""Return the message unchanged."""
|
||||
return message
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def reverse(text: str) -> str:
|
||||
"""Return the text reversed."""
|
||||
return text[::-1]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.run("stdio")
|
||||
Reference in New Issue
Block a user