Get the FREE Ultimate OpenClaw Setup Guide →

CryptoPortfolioMCPServer

Read-only cryptocurrency portfolio management MCP server for Binance, Coinbase, and Kraken

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio lev-corrupted-cryptoportfoliomcpserver python -m src.server \
  --env MOCK_MODE="false" \
  --env KRAKEN_API_KEY="your_kraken_api_key" \
  --env BINANCE_API_KEY="your_binance_api_key" \
  --env COINBASE_API_KEY="your_coinbase_api_key" \
  --env KRAKEN_API_SECRET="your_kraken_secret" \
  --env BINANCE_API_SECRET="your_binance_secret" \
  --env COINBASE_API_SECRET="your_coinbase_secret" \
  --env PRICE_CACHE_DURATION="30" \
  --env BALANCE_CACHE_DURATION="60"

How to use

CryptoPortfolioMCPServer provides read-only access to your cryptocurrency holdings across Binance, Coinbase, and Kraken through the MCP (Model Context Protocol). The server aggregates balances, values, and market data, and offers analytic tools for portfolio performance, risk metrics, and market intelligence. Clients such as Claude Desktop or any MCP-compatible frontend can query the server to fetch real-time prices, diversification scores, risk assessments, and alerts without executing trades. To get started, ensure your environment variables are set with read-only API keys for each exchange, then run the server. Once running, you can invoke tools like get_total_portfolio_value, get_portfolio_allocation, get_biggest_movers, get_diversification_score, and check_arbitrage_opportunities to build dashboards or natural language queries that summarize your portfolio.

How to install

Prerequisites:

  • Python 3.10 or higher
  • Internet access
  • Read-only API keys for Binance, Coinbase, and Kraken
  • Git

Installation steps:

  1. Clone the repository and navigate into it:
git clone https://github.com/lev-corrupted/CryptoPortfolioMCPServer.git
cd CryptoPortfolioMCPServer
  1. Create and activate a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # on macOS/Linux
venv\Scripts\activate     # on Windows
  1. Install dependencies:
pip install -r requirements.txt
  1. Copy example environment file and populate credentials:
cp .env.example .env
# Edit .env with your actual keys if you prefer environment-based configuration
  1. Test the configuration (optional):
python test_config.py
  1. Run the MCP server (according to the configured mcp_config):
python -m src.server

Notes:

  • The server runs in read-only mode; no trading actions are performed.
  • External dependencies are installed via requirements.txt; ensure network access during installation.
  • If you use Claude Desktop, configure the Claude MCP integration as shown in the Claude Desktop configuration section of the README.

Additional notes

Tips and common issues:

  • Ensure all exchange API keys have read-only permissions to avoid accidental trading permissions.
  • Keep your .env or environment variables secure and never commit them to version control.
  • If you run into authentication errors, double-check that API keys are valid and not restricted by IP or permission scope.
  • The server caches prices and balances (30s and 60s by default) for performance; adjust via environment variables if needed.
  • Logs are typically found under logs/crypto_mcp.log; review for diagnostics if the server fails to initialize.
  • When using Claude Desktop, you can phrase queries in natural language, for example: "What is my total portfolio value?", "Show me my portfolio allocation", or "Are there any arbitrage opportunities?"

Related MCP Servers

Sponsor this space

Reach thousands of developers