Back to MCP directory
publicPublicdnsLocal runtime

mcp-sol

一个为Solana区块链客户端提供模型上下文协议(MCP)服务的服务器项目

article

README

🚀 Solana 客户端的 MCP 上下文模型协议服务器

Solana 客户端的 MCP 上下文模型协议服务器为相关应用提供了便捷的服务,可通过 Smithery 自动安装,还能与 Claude Desktop 配合使用,满足多样化的使用需求。

🚀 快速开始

要通过 Smithery 自动安装 mcp-solana 以供 Claude Desktop 使用,可执行以下命令:

npx -y @smithery/cli install @tywenk/mcp-solana --client claude

📦 安装指南

服务器安装步骤

git clone git@github.com:tywenk/mcp-s.git
cd mcp-sol
uv sync
mcp install src/server.py

配置 Claude 桌面端

确保 Claude 桌面端的 JSON 配置文件位于 /Users/{user}/Library/Application Support/Claude(Mac 上),大致如下所示。注意 uv 二进制文件和路径都是绝对的。

{
  "globalShortcut": "Alt+Space",
  "mcpServers": {
    "Solana Client": {
      "command": "/Users/tywen/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/tywen/Developer/mcp-sol",
        "run",
        "--with",
        "mcp",
        "mcp",
        "run",
        "/Users/tywen/Developer/mcp-sol/src/server.py"
      ]
    }
  }
}

💻 使用示例

工具列表

get_balance
get_transaction
get_block
get_block_height
get_block_time
get_blocks
get_cluster_nodes
get_epoch_info
get_epoch_schedule
get_genesis_hash
get_identity
get_inflation_governor
get_inflation_rate
get_largest_accounts
get_latest_blockhash
get_minimum_balance_for_rent_exemption
get_program_accounts
get_recent_performance_samples
get_signature_statuses
get_slot
get_slot_leader
get_supply
get_token_account_balance
get_token_largest_accounts
get_transaction_count
get_version
get_vote_accounts
is_connected
get_block_commitment
confirm_transaction
get_account_info
get_fee_for_message
get_first_available_block
get_inflation_reward
get_leader_schedule
get_minimum_ledger_slot
get_multiple_accounts
get_signatures_for_address
get_token_accounts_by_delegate
get_token_accounts_by_owner
get_token_supply
request_airdrop
send_transaction
validator_exit
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client