Solana MCP Server
solana-mcp-server
功能完整的 Solana 区块链 MCP 服务器。 提供 25 种工具,涵盖钱包管理、SPL 代币操作、DeFi、质押和网络查询。基于 @solana/web3.js 和 @solana/spl-token 构建,并支持 Anchor。
这是目前维护最活跃的 Solana MCP。它涵盖了竞争对手所忽略的完整 SPL 代币生命周期(创建、铸造、销毁、冻结、解冻、授权、权限管理)。
安装
npx solana-mcp-server或全局安装:
npm install -g solana-mcp-server
solana-mcp-serverRelated MCP server: SolanaBot
配置
添加到您的 MCP 配置文件(claude_desktop_config.json 或 ~/.mcp.json):
{
"mcpServers": {
"solana": {
"command": "npx",
"args": ["-y", "solana-mcp-server"],
"env": {
"SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com"
}
}
}
}工具 (25)
钱包管理 (4)
工具 | 描述 | 关键参数 |
| 创建一个新的 Solana 密钥对(仅在内存中) | -- |
| 从 base58 编码的私钥导入 |
|
| 列出当前会话中的所有钱包 | -- |
| 获取任意地址的 SOL 余额 |
|
SPL 代币操作 (10)
工具 | 描述 | 关键参数 |
| 创建具有自定义小数位的新 SPL 代币 |
|
| 向任意地址铸造代币 |
|
| 从账户中销毁代币 |
|
| 冻结代币账户 |
|
| 解冻代币账户 |
|
| 更改代币权限(铸造、冻结、所有者、关闭) |
|
| 代币的总供应量和元数据 |
|
| 关闭账户并收回租金 |
|
| 批准代币转账的代理人 |
|
| 撤销代理人批准 |
|
转账 (3)
工具 | 描述 | 关键参数 |
| 在钱包之间转账 SOL |
|
| 转账 SPL 代币 |
|
| 请求 SOL 空投(仅限 devnet/testnet) |
|
账户查询 (4)
工具 | 描述 | 关键参数 |
| 详细的账户信息 |
|
| 通过签名获取交易详情 |
|
| 创建关联代币账户 |
|
| 列出钱包的所有代币账户 |
|
代币数据 (1)
工具 | 描述 | 关键参数 |
| 特定账户的 SPL 代币余额 |
|
网络 (3)
工具 | 描述 | 关键参数 |
| 在主网、开发网、测试网、本地主机之间切换 |
|
| 当前网络状态和信息 | -- |
| 用于构建交易的最近区块哈希 | -- |
为什么选择这个?
完整的 SPL 代币生命周期。 创建、铸造、销毁、冻结、解冻、设置权限、代理、关闭——10 个代币工具涵盖了所有操作。竞争对手通常只支持创建/转账。
生产就绪的基础设施。 延迟连接初始化(无启动超时)、10 秒网络调用超时、全面的错误处理以及 Smithery 部署支持。
Anchor 集成。 内置对
@coral-xyz/anchor的支持,可与 Anchor 程序以及原始 SPL 代币操作进行交互。
网络
网络 | 端点 |
|
|
|
|
|
|
|
|
安全性
私钥仅存储在内存中——绝不持久化到磁盘
进程退出时清除密钥
所有输入均通过 Zod 模式进行验证
环境变量
变量 | 必需 | 描述 |
| 否 | Solana RPC 端点(默认:主网) |
开发
git clone https://github.com/ExpertVagabond/solana-mcp-server.git
cd solana-mcp-server
npm install
npm run build
npm startnpm test # Basic functionality tests
npm run type-check # TypeScript type checking
npm run lint # ESLint
npm run quality # Full quality check (lint + types + tests)许可证
MIT -- Purple Squirrel Media
Available Tools
25 toolsairdrop_solA
Request SOL airdrop for testing (devnet/testnet only)
Inputs: walletName (required), amount.
approve_delegateC
Approve a delegate to transfer tokens on your behalf
Inputs: amount (required), tokenMint (required), walletName (required), delegateAddress (required).
burn_tokensC
Burn tokens from a wallet
Inputs: amount (required), tokenMint (required), walletName (required).
close_token_accountC
Close a token account and reclaim rent
Inputs: tokenMint (required), walletName (required), destinationAddress (required).
create_spl_tokenC
Create a new SPL token with specified decimals
Inputs: walletName (required), decimals, freezeAuthority.
create_token_accountC
Create associated token account for SPL tokens
Inputs: tokenMint (required), walletName (required).
create_walletC
Create a new Solana wallet
Inputs: name (required).
freeze_accountB
Freeze a token account to prevent transfers
Inputs: tokenMint (required), walletName (required), accountAddress (required).
get_account_infoC
Get detailed account information
Inputs: address (required).
get_balanceC
Get SOL balance for a wallet
Inputs: walletName (required).
get_network_infoC
Get current network information
Inputs: no named parameters.
get_recent_blockhashB
Get recent blockhash for transaction building
Inputs: no named parameters.
get_token_accountsC
Get all token accounts for a wallet
Inputs: walletName (required).
get_token_balanceC
Get SPL token balance for a wallet
Inputs: tokenMint (required), walletName (required).
get_token_supplyC
Get the total supply of a token
Inputs: tokenMint (required).
get_transactionC
Get transaction details by signature
Inputs: signature (required).
import_walletC
Import an existing wallet from private key or mnemonic
Inputs: name (required), privateKey (required).
list_walletsB
List all created/imported wallets
Inputs: no named parameters.
mint_tokensC
Mint tokens to a specific account
Inputs: amount (required), tokenMint (required), walletName (required), destinationAddress (required).
revoke_delegateB
Revoke a delegate's authority to transfer tokens
Inputs: tokenMint (required), walletName (required).
set_token_authorityC
Set or change authority for a token mint or account
Inputs: tokenMint (required), walletName (required), authorityType (required), newAuthority.
switch_networkC
Switch Solana network
Inputs: network (required).
thaw_accountC
Thaw a frozen token account to allow transfers
Inputs: tokenMint (required), walletName (required), accountAddress (required).
transfer_solC
Transfer SOL between wallets
Inputs: amount (required), toAddress (required), fromWallet (required).
transfer_tokensC
Transfer SPL tokens between wallets
Inputs: amount (required), toAddress (required), tokenMint (required), fromWallet (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
Most tools have distinct purposes, but some overlap exists, such as get_balance and get_token_balance, which could cause confusion if not carefully described. However, the descriptions generally clarify the differences, and tools like freeze_account and thaw_account are clearly complementary.
All tool names follow a consistent verb_noun pattern using snake_case, such as create_wallet, transfer_sol, and get_account_info. This uniformity makes the tool set predictable and easy to navigate.
With 25 tools, the count is borderline high for a focused server, potentially overwhelming for agents. While it covers many Solana operations, it might benefit from consolidation or better scoping to reduce complexity.
The tool set provides comprehensive coverage for Solana operations, including wallet management, token handling, transactions, and network interactions. It supports full CRUD/lifecycle actions, such as create, transfer, and burn tokens, with no obvious gaps.
Maintenance
Related MCP Connectors
Run all your Solana wallets from your AI: send, swap, split, consolidate and clean up.
Solana MCP for wallets, trades, markets, PnL, transfers, onchain data, signable swaps and API tools.
Solana tools over MCP: Jupiter swaps, SPL tokens, Metaplex NFTs, SNS domains, network stats.
Solana MCP developer toolkit: wallets, trades, markets, PnL, transfers, onchain, swaps & API tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Solana blockchain network, supporting documentation search, blockchain queries, wallet management, and cryptographic signing operations on Devnet and Testnet.MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with the Solana blockchain through Claude Desktop, allowing users to check SOL balances, transfer SOL between accounts, and request airdrops using the Model Context Protocol.ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Solana blockchain, manage accounts and tokens, and develop and deploy smart contracts end-to-end.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Solana blockchain through MCP, supporting wallet queries, token swaps via Jupiter, token transfers, and market data.MIT