from fastmcp import FastMCP
import pyth_tools
mcp = FastMCP(
name="Pyth Network MCP Server",
instructions="""This MCP server provides tools for the Pyth Network Hermes API.
Available tools:
- get_price_feeds: Search and filter price feeds by symbol or asset type
- get_latest_price_updates: Get the latest price updates for specific price feed IDs
- get_price_updates_at_time: Get historical price updates at a specific timestamp
- get_publisher_stake_caps: Get the latest publisher stake caps data
- get_twap_latest: Get time-weighted average prices with a custom time window
""",
)
# Register Pyth Network tools
mcp.tool(pyth_tools.get_price_feeds)
mcp.tool(pyth_tools.get_latest_price_updates)
mcp.tool(pyth_tools.get_price_updates_at_time)
mcp.tool(pyth_tools.get_publisher_stake_caps)
mcp.tool(pyth_tools.get_twap_latest)
if __name__ == "__main__":
# Run with SSE transport for HTTP access
mcp.run(transport="sse")