Skip to main content
Glama

solana-mcp-server

npm version License: MIT Node Tools

功能完整的 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-server

Related 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)

工具

描述

关键参数

create_wallet

创建一个新的 Solana 密钥对(仅在内存中)

--

import_wallet

从 base58 编码的私钥导入

privateKey

list_wallets

列出当前会话中的所有钱包

--

get_balance

获取任意地址的 SOL 余额

address

SPL 代币操作 (10)

工具

描述

关键参数

create_spl_token

创建具有自定义小数位的新 SPL 代币

walletName, decimals

mint_tokens

向任意地址铸造代币

walletName, tokenMint, amount

burn_tokens

从账户中销毁代币

walletName, tokenMint, amount

freeze_account

冻结代币账户

walletName, tokenMint, accountAddress

thaw_account

解冻代币账户

walletName, tokenMint, accountAddress

set_token_authority

更改代币权限(铸造、冻结、所有者、关闭)

walletName, tokenMint, authorityType

get_token_supply

代币的总供应量和元数据

tokenMint

close_token_account

关闭账户并收回租金

walletName, tokenAccount

approve_delegate

批准代币转账的代理人

walletName, tokenAccount, delegate, amount

revoke_delegate

撤销代理人批准

walletName, tokenAccount

转账 (3)

工具

描述

关键参数

transfer_sol

在钱包之间转账 SOL

from, to, amount

transfer_tokens

转账 SPL 代币

from, to, tokenMint, amount

airdrop_sol

请求 SOL 空投(仅限 devnet/testnet)

address, amount

账户查询 (4)

工具

描述

关键参数

get_account_info

详细的账户信息

address

get_transaction

通过签名获取交易详情

signature

create_token_account

创建关联代币账户

walletName, tokenMint

get_token_accounts

列出钱包的所有代币账户

address

代币数据 (1)

工具

描述

关键参数

get_token_balance

特定账户的 SPL 代币余额

address, tokenMint

网络 (3)

工具

描述

关键参数

switch_network

在主网、开发网、测试网、本地主机之间切换

network

get_network_info

当前网络状态和信息

--

get_recent_blockhash

用于构建交易的最近区块哈希

--

为什么选择这个?

  • 完整的 SPL 代币生命周期。 创建、铸造、销毁、冻结、解冻、设置权限、代理、关闭——10 个代币工具涵盖了所有操作。竞争对手通常只支持创建/转账。

  • 生产就绪的基础设施。 延迟连接初始化(无启动超时)、10 秒网络调用超时、全面的错误处理以及 Smithery 部署支持。

  • Anchor 集成。 内置对 @coral-xyz/anchor 的支持,可与 Anchor 程序以及原始 SPL 代币操作进行交互。

网络

网络

端点

mainnet

https://api.mainnet-beta.solana.com

devnet

https://api.devnet.solana.com

testnet

https://api.testnet.solana.com

localhost

http://127.0.0.1:8899

安全性

  • 私钥仅存储在内存中——绝不持久化到磁盘

  • 进程退出时清除密钥

  • 所有输入均通过 Zod 模式进行验证

环境变量

变量

必需

描述

SOLANA_RPC_URL

Solana RPC 端点(默认:主网)

开发

git clone https://github.com/ExpertVagabond/solana-mcp-server.git
cd solana-mcp-server
npm install
npm run build
npm start
npm 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

Install Server
A
license - permissive license
B
quality
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    8,867
    BSD 2-Clause "Simplified"
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to read chain data, execute transactions, swap tokens, and manage wallets on Solana through 38 tools across 7 modules. Supports write operations with a private key and includes built-in prompts for common workflows.
    38
    1
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Appeared in Searches

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExpertVagabond/solana-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server