""" Simple FastMCP Test Server for MCPTesta Testing This minimal server provides tools, resources, and prompts for testing MCPTesta functionality. """ from fastmcp import FastMCP mcp = FastMCP("MCPTesta Test Server") @mcp.tool() def echo(message: str) -> str: """Echo back the provided message""" return message @mcp.tool() def add(a: int, b: int) -> int: """Add two numbers together""" return a + b @mcp.tool() def greet(name: str = "World") -> str: """Generate a greeting message""" return f"Hello, {name}!" @mcp.resource("config://server") def get_server_config() -> str: """Server configuration resource""" return '{"name": "test-server", "version": "1.0.0"}' @mcp.prompt() def greeting_prompt(name: str = "User") -> str: """A simple greeting prompt""" return f"Please greet {name} warmly." def main(): """Run the test server""" mcp.run() if __name__ == "__main__": main()