Something went wrong. Try again.
mirror of github.com/PrefectHQ/fastmcp
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031"""FastMCP Echo Server"""
from fastmcp import FastMCP
# Create servermcp = FastMCP("Echo Server")
@mcp.tooldef echo_tool(text: str) -> str: """Echo the input text""" return text
@mcp.resource("echo://static")def echo_resource() -> str: return "Echo!"
@mcp.resource("echo://{text}")def echo_template(text: str) -> str: """Echo the input text""" return f"Echo: {text}"
@mcp.prompt("echo")def echo_prompt(text: str) -> str: return text