CoinMarketCap Portfolio MCP Server
Transforms Claude AI into a personal crypto portfolio analyst, enabling wallet analysis, AI-powered recommendations, and portfolio tracking across 8+ blockchains through natural conversation.
README
CoinMarketCap Portfolio MCP Server 🚀
Transform Claude AI into your personal crypto portfolio analyst.
Analyze wallets, get AI-powered recommendations, and track portfolios across 8+ blockchains—all through natural conversation with Claude.
🎯 What This Does
- 💼 Portfolio Analysis - Analyze any crypto wallet with one command
- 📊 Market Data - Get real-time prices and trends for 1000+ tokens
- 🤖 AI Recommendations - Get personalized investment advice from Claude
- 🌐 Multi-Chain - Supports Ethereum, Base, Solana, Polygon, Arbitrum, Optimism, Avalanche, BNB
🏗️ Architecture

How it works:
- You ask Claude to analyze a wallet
- Claude calls the MCP server
- Server fetches data from Moralis & CoinMarketCap
- Claude provides insights with charts and recommendations
📸 Example Output

Claude analyzes your wallet and provides:
- ✅ Total portfolio value
- ✅ Asset allocation breakdown
- ✅ Risk assessment with alerts
- ✅ Rebalancing recommendations
- ✅ Visual charts and graphs
🚀 Quick Start (5 Minutes)
Prerequisites
- Python 3.12+
- Claude Desktop
- Moralis API Key (free - 40k requests/day)
Step 1: Clone & Install
# Clone repository
git clone https://github.com/vibhudixit123/coinmarketcap_mcp.git
cd coinmarketcap_mcp
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Step 2: Configure API Key
# Copy environment template
cp .env.example .env
# Add your Moralis API key
nano .env
Add this line:
MORALIS_API_KEY=your_api_key_here
Get your free API key at moralis.io → Dashboard → Web3 APIs
Step 3: Test the Server
python -m src.server
You should see:
============================================================
CoinMarketCap MCP Server (Multi-Chain + Portfolio Edition)
Supported Chains: ethereum, base, polygon, arbitrum...
Total Tools: 12 (8 market + 4 portfolio)
============================================================
Moralis client initialized ✅
Press Ctrl+C if it works. Now configure Claude Desktop!
🖥️ Configure Claude Desktop
Step 1: Find Your Paths
# Get your Python path
which python3
# Example output: /Users/yourname/coinmarketcap_mcp/venv/bin/python3
# Get your project path
pwd
# Example output: /Users/yourname/coinmarketcap_mcp
Step 2: Edit Claude Desktop Config
On Mac:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows:
notepad %APPDATA%\Claude\claude_desktop_config.json
Step 3: Add This Configuration
{
"mcpServers": {
"coinmarketcap-portfolio": {
"command": "/Users/yourname/coinmarketcap_mcp/venv/bin/python3",
"args": ["-m", "src.server"],
"cwd": "/Users/yourname/coinmarketcap_mcp",
"env": {
"PYTHONPATH": "/Users/yourname/coinmarketcap_mcp",
"MORALIS_API_KEY": "your_moralis_api_key_here"
}
}
}
}
Replace:
/Users/yourname/...with YOUR paths from Step 1your_moralis_api_key_herewith YOUR Moralis API key
Step 4: Restart Claude Desktop
- Quit Claude Desktop completely (Cmd+Q on Mac, close on Windows)
- Open Claude Desktop
- Look for 🔨 hammer icon at the bottom
✅ If you see the hammer icon, it worked!
💬 Try It Out
Ask Claude:
"What blockchain networks do you support?"
"What's the price of ETH?"
"Analyze wallet 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb on Ethereum"
"Give me investment recommendations for my portfolio"
🛠️ Available Tools
Market Data (8 tools)
get_token_info- Get token detailslist_tokens- Top tokens on any chaincompare_tokens- Compare multiple tokenssearch_token_across_chains- Find token everywhere
Portfolio Analysis (4 tools)
analyze_wallet- Complete portfolio breakdownget_portfolio_recommendations- AI investment advicecompare_portfolio_to_market- Benchmark performanceget_portfolio_summary- Quick overview
🐳 Docker
If you prefer Docker:
# Build
docker build -t coinmarketcap-mcp .
# Run
docker run -e MORALIS_API_KEY=your_key coinmarketcap-mcp
# Or use docker-compose
docker-compose up
🌐 Host it as a remote MCP server (multi-user)
You can run this as a public, hosted MCP server that anyone can connect to.
It runs the MCP Streamable HTTP transport at /mcp and is multi-user by
design: the server stores no Moralis key. Each user supplies their own
Moralis API key on every request via the X-Moralis-Key header — so you never
pay for their usage and there's nothing to abuse.
The market-data tools use a public CoinMarketCap endpoint and need no key. Only the 4 portfolio tools need a Moralis key, taken from the caller's header.
Run the HTTP transport locally
MCP_TRANSPORT=http PORT=8000 python -m src.server
# Health check: curl http://localhost:8000/health
# MCP endpoint: http://localhost:8000/mcp
Deploy to Render (free tier)
- Push this repo to GitHub.
- In Render: New → Blueprint, select the repo. The included
render.yamlbuilds the Dockerfile and setsMCP_TRANSPORT=http. (NoMORALIS_API_KEYis set on the server — that's intentional.) - Deploy. Your server is live at
https://<your-app>.onrender.com/mcp.
Any Docker host (Railway, Fly.io, a VPS) works too — just set MCP_TRANSPORT=http
and expose the port. Render injects PORT automatically.
How users connect (with their own key)
Clients that support remote MCP servers with custom headers (e.g. Cursor, Cline):
{
"mcpServers": {
"coinmarketcap": {
"url": "https://<your-app>.onrender.com/mcp",
"headers": { "X-Moralis-Key": "THEIR_OWN_MORALIS_KEY" }
}
}
}
For Claude Desktop, connect through the mcp-remote bridge:
{
"mcpServers": {
"coinmarketcap": {
"command": "npx",
"args": [
"mcp-remote", "https://<your-app>.onrender.com/mcp",
"--header", "X-Moralis-Key:THEIR_OWN_MORALIS_KEY"
]
}
}
}
Each user gets their own free Moralis key at moralis.io.
🐛 Troubleshooting
"Module not found" error
Add PYTHONPATH to your Claude config:
"env": {
"PYTHONPATH": "/full/path/to/coinmarketcap_mcp"
}
No hammer icon in Claude Desktop
- Check config file location is correct
- Verify Python path:
which python3 - Test server manually:
python -m src.server - View logs:
tail -f ~/Library/Logs/Claude/mcp*.log
"MORALIS_API_KEY not found"
Make sure the key is in both:
.envfile in project directory- Claude Desktop config JSON
📦 What You Get
✅ 12 AI Tools for Claude to use
✅ 8 Blockchain Networks supported
✅ Real-time Data from Moralis & CoinMarketCap
✅ Portfolio Analysis with risk assessment
✅ AI Recommendations for rebalancing
✅ Visual Dashboards with charts
✅ Docker Support for easy deployment
🤝 Contributing
Pull requests welcome! For major changes, please open an issue first.
📄 License
MIT License - see LICENSE file
🙏 Credits
- Moralis - Blockchain API
- CoinMarketCap - Market data
- Anthropic - Claude AI & MCP
<div align="center">
Built by Vibhu Dixit
⭐ Star this repo if you find it useful!
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。