Spaces:
Sleeping
Sleeping
Download examples/echo.py from purecipher/xsecuremcp: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/spaces/purecipher/xsecuremcp/resolve/main/examples/echo.py
- Command line
-
hf download hf://spaces/purecipher/xsecuremcp/examples/echo.py
-
curl -L -o echo.py https://huggingface.co/spaces/purecipher/xsecuremcp/resolve/main/examples/echo.py
474 Bytes
| """ | |
| FastMCP Echo Server | |
| """ | |
| from fastmcp import FastMCP | |
| # Create server | |
| mcp = FastMCP("Echo Server") | |
| def echo_tool(text: str) -> str: | |
| """Echo the input text""" | |
| return text | |
| def echo_resource() -> str: | |
| return "Echo!" | |
| def echo_template(text: str) -> str: | |
| """Echo the input text""" | |
| return f"Echo: {text}" | |
| def echo_prompt(text: str) -> str: | |
| return text | |