zerion-mcp
MCP server that provides live crypto portfolio data, token info, gas prices, swap offers, and Bitcoin balance via Zerion and Blockstream APIs.
README
zerion-mcp
A local MCP (Model Context Protocol) server that gives Claude Desktop and Claude Code live access to your crypto portfolio — powered by the Zerion API for EVM + Solana chains, and Blockstream for Bitcoin.
Once connected, you can ask Claude things like:
- "What's my total portfolio value across Ethereum and Base?"
- "Show my Uniswap LP positions"
- "What's my Bitcoin balance from this xpub?"
- "What are current gas prices on Arbitrum and Optimism?"
- "Get swap offers to trade 1 ETH for USDC"
Prerequisites
- Node.js v18 or higher (
node --versionto check) - npm v8 or higher
- Zerion API key — free tier available at developers.zerion.io
- Git
Installation
1. Clone the repository
git clone https://github.com/rockyale/zerion-mcp.git
cd zerion-mcp
2. Install dependencies
npm install
3. Get your Zerion API key
Sign up for free at developers.zerion.io, go to the Dashboard, and copy your API key.
Connecting to Claude Desktop
macOS
Open the Claude Desktop config file:
open ~/Library/Application\ Support/Claude/
Edit claude_desktop_config.json (create it if it doesn't exist):
{
"mcpServers": {
"zerion": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/zerion-mcp/src/index.ts"],
"env": {
"ZERION_API_KEY": "your_api_key_here"
}
}
}
}
Replace /absolute/path/to/zerion-mcp with the actual path. To find it, run pwd inside the project folder.
Example:
"args": ["tsx", "/Users/yourname/projects/zerion-mcp/src/index.ts"]
Windows
Open the Claude Desktop config file at:
%APPDATA%\Claude\claude_desktop_config.json
You can open it by pressing Win + R, typing %APPDATA%\Claude and hitting Enter.
Edit the file:
{
"mcpServers": {
"zerion": {
"command": "npx",
"args": ["tsx", "C:\\Users\\yourname\\projects\\zerion-mcp\\src\\index.ts"],
"env": {
"ZERION_API_KEY": "your_api_key_here"
}
}
}
}
Note: use double backslashes \\ in Windows paths.
After editing the config
Fully quit Claude Desktop (not just close the window) and reopen it. To confirm your Zerion MCP tools are loaded, click + in chat input and look for Zerion listed there in connectors — if it's showing, you're good to go.
Connecting to Claude Code
Run this once in your terminal:
claude mcp add zerion \
--env ZERION_API_KEY="your_api_key_here" \
-- npx tsx /absolute/path/to/zerion-mcp/src/index.ts
Verify with:
claude mcp list
Available Tools
Wallet
| Tool | Description |
|---|---|
get_wallet_portfolio |
Total portfolio value, breakdown by chain and position type |
get_wallet_fungible_positions |
Token and DeFi protocol positions (supports Uniswap, Aave, etc.) |
get_wallet_transactions |
Full transaction history with decoded action types |
get_wallet_pnl |
Realized and unrealized PnL using FIFO accounting |
get_wallet_nft_positions |
NFTs held by a wallet |
get_wallet_nft_portfolio |
NFT portfolio overview and total value |
get_wallet_balance_chart |
Historical portfolio balance over time |
Wallet Sets (multi-wallet aggregation)
| Tool | Description |
|---|---|
get_wallet_set_portfolio |
Aggregated portfolio across EVM + Solana wallet pair |
get_wallet_set_fungible_positions |
Aggregated token positions across wallet set |
get_wallet_set_pnl |
Aggregated PnL across wallet set |
get_wallet_set_transactions |
Aggregated transaction history across wallet set |
Tokens
| Tool | Description |
|---|---|
search_fungibles |
Search tokens by name, symbol, or contract address |
get_fungible_by_id |
Detailed token info by Zerion ID |
get_fungible_chart |
Token price chart over a time period |
Chains & Gas
| Tool | Description |
|---|---|
get_chains |
All blockchain networks supported by Zerion |
get_gas_prices |
Real-time gas prices across all supported chains |
Swap
| Tool | Description |
|---|---|
get_swap_offers |
Swap/bridge quotes from aggregated providers (1inch, ParaSwap, 0x) with ready-to-sign transaction data |
Bitcoin
| Tool | Description |
|---|---|
get_bitcoin_address_info |
Balance and stats for a single Bitcoin address (legacy, SegWit, native SegWit) |
get_bitcoin_transactions |
Recent transaction history for a Bitcoin address |
get_bitcoin_xpub_balance |
Full HD wallet balance from an xpub/zpub key — derives all child addresses and sums balance (for Ledger and other HD wallets) |
Getting your Bitcoin xpub (Ledger)
If you use Ledger Live with Native SegWit (bc1 addresses):
- Open Ledger Live
- Go to your Bitcoin account
- Click the three dots → Edit account → Advanced
- Copy the xpub key
Paste it into Claude: "Get my Bitcoin balance from this xpub: xpub6..."
External Services
| Service | Used for | Auth required | Docs |
|---|---|---|---|
| Zerion API | All EVM + Solana portfolio data, transactions, DeFi positions, gas prices, swaps | ✅ API key | docs |
| Blockstream.info | Bitcoin address balances and transaction history | ❌ None | docs |
Bitcoin xpub derivation is done locally using:
bip32— HD key derivationbitcoinjs-lib— address generationtiny-secp256k1— elliptic curve cryptography
No private keys are ever required or used. The xpub is a read-only key — it can only derive public addresses.
Project Structure
zerion-mcp/
├── src/
│ ├── index.ts # MCP server entry point, stdio transport
│ ├── tools.ts # Tool definitions and input schemas
│ ├── handlers.ts # Maps tool calls to API requests
│ └── client.ts # Zerion API auth, fetch wrapper, pagination
├── package.json
├── tsconfig.json
└── README.md
Security notes
- Your Zerion API key is passed via environment variable and never hardcoded
- The xpub key is read-only — it cannot sign transactions or move funds
- Never commit your API key to git — add
.envto.gitignoreif you use one - For team use, share the repo without keys and let each developer set
ZERION_API_KEYin their own shell profile
Troubleshooting
Tools not showing up in Claude Desktop
- Make sure you fully quit and reopened Claude Desktop after editing the config
- Check the path in the config points to the correct
src/index.ts - Run
tail -f ~/Library/Logs/Claude/mcp-server-zerion.log(macOS) to see errors
fetch failed on Bitcoin tools
- This can happen if Blockstream rate-limits rapid requests — the server includes a 150ms delay between address queries to avoid this
- If it persists, try again after a few seconds
ZERION_API_KEY not set error
- Make sure the key is set in the
envblock of yourclaude_desktop_config.json - Double-check there are no extra spaces or quotes around the key value
Uniswap / DeFi positions not showing
- Make sure to pass
filter_positions: no_filterwhen asking for positions, otherwise only simple wallet tokens are returned by default
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。