关于 SolanaViz MCP Server
SolanaViz MCP Server 让 Claude 通过自然语言查询、分析和可视化 Solana 链上数据,面向需要查看代币、钱包和市场信息的用户。它还提供价格预测与安全风险分析;交易执行不受支持。
主要功能
- 01查询代币与钱包数据
- 02获取历史价格和热门代币
- 03生成代币价格预测
- 04评估代币与协议安全风险
- 05生成多种文本图表
适用场景
- 01分析钱包持仓
- 02查看代币价格与市场趋势
- 03检查代币安全风险
- 04可视化资产分配或实体关系
MCP 相关
该 MCP 服务向 Claude 等 MCP 客户端提供 Solana 数据查询、预测、安全分析和文本可视化工具。服务为只读,不支持执行交易。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
SolanaViz MCP 服务
一个模型上下文协议(MCP)服务,可让 Claude 通过自然语言对话访问、分析和可视化 Solana 区块链数据。
功能
- 数据分析:获取并分析 Solana 区块链数据、代币和钱包信息
- 可视化:生成基于文本的可视化内容,便于探索数据
- 价格预测:通过 AI 预测代币价格
- 安全分析:评估代币和协议的安全风险
- 多钱包支持:分析任意 Solana 钱包,包括你自己的钱包
前提条件
- Node.js 18+
- npm 或 pnpm
- Claude Desktop(用于使用 MCP 服务)
- API 密钥:
- BirdEye
- CoinGecko
- Allora
- Helius(Solana RPC 提供商)
安装
- 克隆代码仓库:
git clone https://github.com/yourusername/GOATsolana-mcp.git
cd GOATsolana-mcp
- 安装依赖项:
npm install
# or
pnpm install
- 构建项目:
npm run build
# or
pnpm build
配置
- 在根目录中创建
.env文件,并添加以下环境变量(或从.env.example复制):
BIRDEYE_API_KEY=your_birdeye_api_key
COINGECKO_API_KEY=your_coingecko_api_key
ALLORA_API_KEY=your_allora_api_key
HELIUS_RPC_URL=your_helius_rpc_url
DEFAULT_WALLET_ADDRESS=optional_default_wallet_address
- 创建
claude_desktop_config.json文件,将 MCP 服务配置为供 Claude Desktop 使用。该文件应位于 Claude Desktop 应用程序数据目录中:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
添加以下内容,并将 /path/to/GOATsolana-mcp 替换为项目的绝对路径:
{
"mcpServers": {
"solana-viz-mcp": {
"command": "node",
"args": ["--input-type=module", "/path/to/GOATsolana-mcp/build/index.js"],
"env": {
"BIRDEYE_API_KEY": "your_birdeye_api_key",
"COINGECKO_API_KEY": "your_coingecko_api_key",
"ALLORA_API_KEY": "your_allora_api_key",
"HELIUS_RPC_URL": "your_helius_rpc_url",
"DEFAULT_WALLET_ADDRESS": "optional_default_wallet_address"
}
}
}
}
重要:
--input-type=module标志对于 Node.js 正确加载 ES 模块至关重要。若没有此标志,Claude Desktop 将出现“Cannot find module”错误,即使文件确实存在。
- 直接启动服务(用于测试):
npm start
- 更改配置后,请完全重启 Claude Desktop。
重要说明
模块加载
本项目使用 ES 模块(import/export),而不是 CommonJS(require/module.exports)。Claude Desktop 配置中包含 --input-type=module 标志,这对于 Node.js 正确加载模块至关重要。
模拟实现
当前实现对部分 GOAT SDK 插件使用了模拟实现。这是因为插件 API 与代码中预期的接口不匹配。未来的更新中,这些模拟实现将替换为适配器,以连接真实实现。
可用工具
配置工具
set_wallet:设置或更改用于分析的当前钱包地址
数据获取工具
get_token_data:获取全面的代币信息和指标get_wallet_tokens:分析钱包地址中的代币持仓get_price_history:获取代币的历史价格数据get_token_pairs:分析各 DEX 上的交易对get_trending_tokens:识别 Solana 上当前的热门代币
预测工具
get_price_prediction:通过 AI 预测代币价格
安全工具
get_token_security:评估代币和协议的安全风险
可视化工具
generate_sankey_diagram:可视化实体(代币、协议、钱包)之间的流动generate_treemap:用嵌套矩形可视化层级数据generate_heatmap:可视化各类别的数据强度generate_network_graph:可视化实体之间的关系和连接generate_radar_chart:比较多个实体的多项变量generate_bubble_chart:可视化三维数据(x、y、大小)generate_temporal_heatmap:可视化各时间段的数据模式generate_donut_chart:可视化部分与整体的关系
使用示例
以下是使用 Claude 操作 SolanaViz MCP 的一些示例:
设置钱包并分析持仓
Please set my wallet address to FtG3emhAqBC8Rr9vdCqTJHxaNNuQVt7B7HvujJrQEj7Y and analyze what tokens I'm holding.
获取代币信息并进行安全分析
Can you tell me more about the BONK token? Is it secure to invest in?
分析市场趋势
What are the trending tokens on Solana right now? Can you show me their price performance?
可视化投资组合分配
Analyze my wallet and visualize my portfolio allocation as a donut chart.
获取价格预测
What's your price prediction for SOL token in the next 24 hours?
示例输出
以下是通过 Claude 使用不同工具时可能看到的输出示例:
数据获取示例
代币数据
当你询问 BONK 这类代币时:
The BONK token (address: DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263) has the following details:
📊 Market Data:
• Current Price: $0.00002981
• Market Cap: $294,152,890
• 24h Volume: $26,843,751
• 24h Change: +7.3%
• All-time High: $0.00003241 (Jan 05, 2024)
💰 Token Economics:
• Total Supply: 99,508,123,523,595
• Circulating Supply: 56,123,876,231,175
• Holders: 842,391 addresses
• Top 10 Holders Control: 47.2% of supply
🔍 Security Analysis:
• Rugpull Risk: Low
• Contract Audit: Passed (Certik)
• Liquidity Score: 9.2/10
• Community Trust: High
• Risk Assessment: Medium
钱包代币分析
当你要求分析钱包持仓时:
Wallet FtG3emhAqBC8Rr9vdCqTJHxaNNuQVt7B7HvujJrQEj7Y contains the following tokens:
1. SOL
• Amount: 12.45 SOL
• Value: $1,431.75
• % of Portfolio: 68.2%
2. BONK
• Amount: 13,521,340.93 BONK
• Value: $402.87
• % of Portfolio: 19.2%
3. JTO
• Amount: 38.72 JTO
• Value: $264.15
• % of Portfolio: 12.6%
Total Portfolio Value: $2,098.77
价格历史数据
当你请求价格历史数据时:
Price history for SOL over the last 30 days:
Date | Price (USD) | 24h Volume | Market Cap
------------|-------------|-------------|-------------
2025-03-15 | $115.32 | $1.42B | $49.73B
2025-03-08 | $109.78 | $1.27B | $47.38B
2025-03-01 | $103.65 | $1.15B | $44.73B
2025-02-22 | $114.21 | $1.33B | $49.27B
2025-02-15 | $95.83 | $0.98B | $41.35B
The token has shown an overall upward trend with a 20.3% increase over the past 30 days, despite some volatility in the middle of the period.
安全分析
当你询问代币安全性时:
Security Analysis for BONK token (DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263):
✅ Contract Analysis:
• No backdoor functions detected
• No proxy implementation risks
• No excessive owner privileges
• No unusual fee mechanisms
⚖️ Liquidity Analysis:
• Total Liquidity: $18.52M across 5 DEXes
• Largest Pool: Raydium SOL/BONK with $7.82M
• Liquidity Concentration Score: 8.4/10 (Well distributed)
🔍 Ownership Structure:
• Creator Ownership: 12% (vested over 3 years)
• DAO Treasury: 18%
• Community Allocation: 70%
⚠️ Risk Factors:
• Meme token volatility
• Significant social media influence on price
• High correlation with overall market sentiment
🔐 Overall Security Score: 8.2/10 (Low Risk)
可视化示例
环形图
当你要求可视化投资组合分配时:
Portfolio Allocation for FtG3emhAqBC8Rr9vdCqTJHxaNNuQVt7B7HvujJrQEj7Y
╭───────────────────────────╮
/ SOL 68.2% \
/ ████████████████ \
| ████████████████ |
| ████████████████ |
| BONK ████████████████ JTO |
| 19.2% ███ ████████████████ ███ |
\ ███ ████████████████ ███ /
\ ███ ███/
╰───███───────────────────███╯
12.6%
Total Portfolio Value: $2,098.77
热力图
当你要求可视化代币在不同时间段内的表现时:
Token Performance Heatmap (% Change)
| 24h | 7d | 30d | 90d |
-----------+--------+--------+--------+--------|
SOL | +3.2% | +12.5% | +20.3% | +65.7% |
BONK | +7.3% | -3.8% | +41.2% | +18.5% |
JTO | -1.5% | +5.7% | +9.2% | +32.1% |
PYTH | +2.7% | +8.2% | +15.7% | +27.5% |
RENDER | +0.5% | -2.3% | +11.3% | +42.8% |
Legend: █ >30% █ 10-30% █ 0-10% █ -10-0% █ <-10%
网络图
当你可视化代币关系时:
Network Graph: Solana DeFi Token Relationships
┌────────┐
│ SOL │
└────────┘
│
┌──────────────┼──────────────┐
│ │ │
┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼─────┐
│ BONK │ │ USDC │ │ JTO │
└─────┬─────┘ └─────┬─────┘ └─────┬─────┘
│ │ │
┌───▼───┐ ┌───▼───┐ ┌───▼───┐
│ wBTC │ │ ETH │ │ PYTH │
└───────┘ └───────┘ └───────┘
Legend:
- Node size represents market cap
- Edge thickness represents liquidity between tokens
桑基图
当你可视化代币流向时:
Sankey Diagram: Token Flow Between Major Wallets (Last 7 Days)
Exchange Wallets DeFi Protocols
┌───────────────────┐ ┌─────────────────────┐
│ │ 12,500 SOL │ │
│ Binance ├───────────────────► Marinade Finance │
│ │ │ │
└───────────────────┘ └─────────────────────┘
│
┌───────────────────┐ │ 9,300 SOL
│ │ 7,800 SOL ┌───────▼─────────────┐
│ Coinbase ├────────────────────► │
│ │ │ Orca Pools │
└───────────────────┘ │ │
└─────────────────────┘
┌───────────────────┐ ▲
│ │ 15,200 SOL │
│ Kraken ├────────────────────────────┘
│ │
└───────────────────┘
获取 API 密钥
以下是获取所需 API 密钥的方法:
- BirdEye API 密钥:在 birdeye.so 注册
- CoinGecko API 密钥:在 coingecko.com/en/api 注册
- Allora API 密钥:在 allora.ai 注册
- Helius RPC URL:在 helius.dev 注册
项目结构
项目结构如下:
src/:MCP 服务的源代码index.ts:服务的主入口点tools/:各种功能对应的工具实现utils/:实用函数和辅助工具types/:TypeScript 类型定义
build/:编译后的 JavaScript 代码(运行npm run build后生成).env:API 密钥的环境变量claude_desktop_config.json:Claude Desktop 的配置文件
限制
- 免费套餐的 API 密钥有速率限制,可能会影响功能
- 部分工具在没有高级 API 访问权限时,功能可能受限
- 当前实现对部分 API 使用了模拟插件
- 不支持执行交易——出于安全考虑,该服务为只读模式
故障排除
找不到模块错误
如果你在 Claude Desktop 中遇到“找不到模块”错误,请确保:
claude_desktop_config.json中index.js文件的路径正确args数组中包含--input-type=module标志- 已使用
npm run build重新构建项目 - 已完全重启 Claude Desktop
API 密钥问题
如果工具出现 API 错误:
- 确认
.env和claude_desktop_config.json中都已正确设置 API 密钥 - 检查 API 免费套餐是否存在速率限制
- 确保大小写正确(尤其是 BirdEye API 密钥)
许可证
MIT
致谢
本项目使用以下内容构建:
- Crossmint 提供的 GOAT SDK
- Anthropic 提供的 Model Context Protocol
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。