MCP setup
Prerequisites
Section titled “Prerequisites”- Node.js 24 or later.
- A Metrifly partner API key.
- An MCP-compatible client.
The hosted MCP endpoint is available at https://mcp.metrifly.com/mcp. It uses the same API key and portfolio grants as the public API and exposes tools for portfolio reads, trade imports, import status, performance, and tax reports.
Configure remote MCP clients with:
{ "mcpServers": { "metrifly": { "url": "https://mcp.metrifly.com/mcp", "headers": { "Authorization": "ApiKey your_api_key" } } }}For local clients that only support stdio transports, use the npm package with environment variables instead of hard-coded secrets.
{ "mcpServers": { "metrifly": { "command": "npx", "args": ["@metrifly/mcp-server"], "env": { "METRIFLY_API_BASE_URL": "https://api.metrifly.com/v1", "METRIFLY_API_KEY": "your_api_key" } } }}For local workspace development, build the package first and point your MCP client at the compiled entrypoint.
npm run build --workspace=@metrifly/mcp-serverMETRIFLY_API_KEY=your_api_key node packages/mcp-server/dist/index.jsAvailable tools:
list_portfoliosget_portfoliopush_tradesget_import_statusget_performanceget_tax_report
Never commit API keys to this repository or to MCP client configuration that is synced to source control.