这是一个通过 Cline 提供全面访问 Solana 区块链数据的 Model Context Protocol (MCP) 服务器。该服务器实现了广泛的 Solana RPC 方法,使得可以通过自然语言对话直接查询区块链信息变得容易。
<a href="https://glama.ai/mcp/servers/bp6d6p1sp3"><img width="380" height="200" src="https://gips1.baidu.com/it/u=1061246238,554810163&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Solana MCP 服务器" /></a>
服务器提供了不同类别中的 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: 获取领导者计划~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):{
"mcpServers": {
"solana": {
"command": "cargo",
"args": ["run"],
"cwd": "/path/to/solana-mcp-server",
"env": {
"SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com" // 或您首选的 RPC 终点
}
}
}
}
配置完成后,您可以在 Cline 中通过自然语言与 Solana 区块链进行交互。这里有一些示例查询:
SOLANA_RPC_URL: (可选)要使用的 Solana RPC 终点。如果未指定,默认为 "https://api.mainnet-beta.solana.com"。cargo build
cargo run
MIT 许可证