# Metals MCP Server FastMCP-based metals market data server backed by a Swissquote poller and local candle store. ## Transport - MCP SSE transport mounted at `/mcp` - SSE stream endpoint: `/mcp/sse` - message endpoint handled by FastMCP under `/mcp/messages/` - no legacy `/rpc` compatibility path ## Runtime ```bash source .venv/bin/activate pip install -r requirements.txt ./run.sh ``` Default URL base: `http://127.0.0.1:8515` ## HTTP - `GET /` → health + tool list - `GET /health` → health + cache/store stats ## Tools - `get_price` - `get_candles` - `get_last_candle` - `get_capabilities` ## Notes ### Done - MCP surface mirrors `crypto-mcp` tool names where it makes sense. - `get_price` fetches live Swissquote quotes for metals like `XAU`. - An internal background poller keeps the server self-sufficient. - 5m candles are clock-aligned and persisted in SQLite. ### Planned - Fill out `get_indicator`, `get_market_snapshot`, `get_top_movers`, and `get_regime` with real regime math. - Add retention cleanup for older candles. - Expand the watched pair set only if it proves useful for market orientation. ### Design - The public surface should mirror `crypto-mcp` where practical. - Local default port is `8515`. - Under the hood, the server uses Swissquote polling plus a local candle store. - The repo now contains a working scaffold and the first live price path. ## Verification ```bash ./tests.sh ./run.sh ``` ## Housekeeping - `./killserver.sh` stops stale listeners on the configured port - `./restart.sh` chains kill and run