Skip to content

MCP setup

  • 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.

Terminal window
npm run build --workspace=@metrifly/mcp-server
METRIFLY_API_KEY=your_api_key node packages/mcp-server/dist/index.js

Available tools:

  • list_portfolios
  • get_portfolio
  • push_trades
  • get_import_status
  • get_performance
  • get_tax_report

Never commit API keys to this repository or to MCP client configuration that is synced to source control.