Get the FREE Ultimate OpenClaw Setup Guide →

solana

MCP server from 0xrinegade/solana-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio 0xrinegade-solana-mcp-server cargo run \
  --env SOLANA_RPC_URL="https://api.mainnet-beta.solana.com"

How to use

The Solana MCP Server exposes a wide range of Solana RPC methods through the Model Context Protocol (MCP), allowing you to query blockchain data via natural language conversations. It includes account and balance operations (e.g., get_sol_balance, get_token_balance, get_account_info), block and transaction information (e.g., get_slot, get_block, get_transaction), token-related queries (e.g., get_token_accounts_by_owner, get_token_supply), system information (e.g., get_epoch_info, get_version, get_health), and staking/governance endpoints (e.g., get_vote_accounts, get_leader_schedule). Once configured, you can ask the assistant questions like “What is the SOL balance of address X?” or “Show me the current block slot,” and the server will fetch the requested data from the Solana RPC endpoint. The server uses a Solana RPC URL (defaulting to the mainnet-beta endpoint if not overridden) and provides the results in a structured format suitable for downstream tools and chats. Be mindful that the available methods depend on the underlying Solana RPC capabilities and the server’s implementation.

To use it effectively, ensure your MCP client is pointing to the configured MCP server (solana) and that the SOLANA_RPC_URL environment variable is set to a reachable Solana RPC endpoint. You can query balance, block information, token accounts, and system metrics through natural language prompts, and the MCP layer will map them to the appropriate RPC calls behind the scenes.

How to install

Prerequisites:

  • Rust and Cargo installed on your system
  • Access to a Solana RPC endpoint (or use the default mainnet-beta URL provided in the config)
  • A terminal with appropriate permissions to run the server

Installation steps:

  1. Ensure Rust is installed. If not, install viarustup: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

  2. Clone the Solana MCP Server repository to your machine: git clone https://github.com/0xrinegade-solana-mcp-server.git cd solana-mcp-server

  3. Build the server in release or run mode: cargo build

    or for a faster development cycle

    cargo run

  4. Prepare configuration for MCP integration:

    • Create or modify the Cline MCP settings file to include: { "mcpServers": { "solana": { "command": "cargo", "args": ["run"], "cwd": "/path/to/solana-mcp-server", "env": { "SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com" } } } }
  5. Start the server and verify connectivity by issuing a sample query via the MCP client or CLI.

Note: If you change the Solana RPC URL, update the SOLANA_RPC_URL environment variable accordingly.

Additional notes

Tips and common considerations:

  • The SOLANA_RPC_URL environment variable controls which Solana RPC endpoint the MCP server uses. Set it to a reliable endpoint (mainnet-beta by default) to ensure stable results.
  • Some RPC endpoints may impose rate limits. If you experience timeouts, consider using a different endpoint or enabling batching in your MCP client if supported.
  • Ensure network access from the host running the MCP server to the chosen RPC endpoint.
  • Logging can help diagnose issues with RPC calls; enable verbose logging in your environment if available.
  • The server exposes 21 Solana RPC methods across multiple categories; you can extend or customize available methods by adjusting the underlying server implementation.
  • When upgrading the server or dependencies, re-build with cargo build to ensure all changes are compiled.

Related MCP Servers

Sponsor this space

Reach thousands of developers