fromfastmcpimportFastMCPmcp=FastMCP("Demo")@mcp.tool()defadd(a:int,b:int)->int:"""Add two numbers"""returna+b# Add a dynamic greeting resource
@mcp.resource("greeting://{name}")defget_greeting(name:str)->str:"""Get a personalized greeting"""returnf"Hello, {name}!"if__name__=="__main__":mcp.run()