Solana MCP 服务器
一个模型上下文协议 (MCP) 服务器,可通过 Cline 提供对 Solana 区块链数据的全面访问。该服务器实现了丰富的 Solana RPC 方法,方便用户直接通过自然语言对话查询区块链信息。
特征
该服务器提供了 21 种跨不同类别的基本 Solana RPC 方法:
账户及余额操作
get_sol_balance
:获取地址的 SOL 余额get_token_balance
:获取 SPL 代币余额get_account_info
:获取账户信息get_largest_accounts
:获取网络上最大的账户
区块和交易信息
get_slot
:获取当前插槽get_block
:获取区块信息get_block_time
:获取区块生产时间get_transaction
:获取交易详情get_recent_blockhash
:获取最近的区块哈希
代币操作
get_token_accounts_by_owner
:按所有者获取代币账户get_token_accounts_by_delegate
:获取委托的代币账户get_token_supply
:获取代币供应信息
系统信息
get_epoch_info
:获取当前纪元信息get_version
:获取节点版本get_health
:获取节点健康状态get_supply
:获取当前供应量get_inflation_rate
:获取通货膨胀率get_cluster_nodes
:获取集群节点信息get_minimum_balance_for_rent_exemption
:获取最低免租余额
质押与治理
get_vote_accounts
:获取投票账户get_leader_schedule
:获取领导者时间表
在 Cline 中设置
将以下配置添加到您的 Cline MCP 设置文件(macOS 上为
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
):
重新启动 Cline 以加载新的 MCP 服务器。
使用示例
配置完成后,您可以通过 Cline 中的自然语言与 Solana 区块链进行交互。以下是一些示例查询:
“地址 Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr 的 SOL 余额是多少?”
“显示当前插槽号”
“获取最新区块的信息”
“目前的通货膨胀率是多少?”
“显示该地址拥有的代币账户...”
环境变量
SOLANA_RPC_URL
:(可选)要使用的 Solana RPC 端点。如果未指定,则默认为“ https://api.mainnet-beta.solana.com ”。
发展
先决条件
Rust 和 Cargo
Solana CLI 工具(可选,用于测试)
建筑
跑步
执照
MIT 许可证
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
mcp 服务器允许执行与 solana 第一版相关的实际操作,并添加了有关 RPC 方法及其调用方式的知识
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server to run commands.Last updated -1403195MIT License
- AsecurityAlicenseAqualityA server that enables interaction with the Solana blockchain, providing access to over 40 Solana RPC methods including getting balances, transaction details, block information, and sending transactions.Last updated -443MIT License
- AsecurityFlicenseAqualityA server that provides simple RPC endpoints for common Solana blockchain operations, allowing users to check balances, get account information, and transfer SOL between accounts.Last updated -51
- -securityAlicense-qualityA simple MCP server implementation that provides AI models with basic Solana RPC methods and helpful development prompts.Last updated -37MIT License