Get the FREE Ultimate OpenClaw Setup Guide →

solana

solana mcp sever to enable solana rpc methods

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

How to use

This Solana MCP Server provides programmatic access to a broad set of Solana RPC methods via the Model Context Protocol (MCP) interface exposed through Cline. The server exposes methods grouped by function, including 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 operations (e.g., get_token_accounts_by_owner, get_token_supply), system information (e.g., get_epoch_info, get_version, get_health, get_supply, get_inflation_rate, get_cluster_nodes, get_minimum_balance_for_rent_exemption), and staking/governance endpoints (e.g., get_vote_accounts, get_leader_schedule). You can query these methods in natural language via Cline to retrieve on-chain data, monitor network status, and retrieve specific account, block, or token information without writing raw RPC calls.

To use the server, ensure the MCP is configured in your Cline settings, then interact with it through natural language prompts or structured queries that map to the supported RPC methods. For example, you can ask for an address SOL balance, request the current slot, fetch details about the latest block, or inspect token accounts owned by a particular address. The server will translate your query into the appropriate Solana RPC call and return the response in a structured, readable format.

How to install

Prerequisites:

  • Rust toolchain with Cargo installed on your machine
  • Optional: Solana CLI tools for testing (not required for the MCP to run)

Step-by-step installation:

  1. Install Rust and Cargo (if not already installed):
# On macOS / Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Restart your shell or source your profile, then verify:
rustc --version
cargo --version
  1. Clone or download the Solana MCP Server repository and navigate to its directory.
  2. Build the project:
cargo build
  1. Run the MCP server:
cargo run
  1. Configure Cline to point at the running MCP server using the provided settings snippet (adjust the path accordingly in your environment).

Optional testing tips:

  • Ensure SOLANA_RPC_URL is reachable and your network firewall allows outbound connections to the chosen RPC endpoint.
  • You can test against the mainnet RPC endpoint or a local/test RPC if you run one.

Additional notes

Environment variables:

Configuration tips:

  • Ensure the cwd path in your MCP settings correctly points to the solana-mcp-server project directory where Cargo.toml resides.
  • The MCP server relies on the standard Solana RPC interface; for high-demand workloads, consider pointing SOLANA_RPC_URL to a reliable endpoint or a self-hosted Solana RPC node.

Common issues:

  • If you see connection errors, verify network access to the RPC URL and that the RPC endpoint is up.
  • Build failures may indicate a Rust toolchain mismatch; ensure you’re using a supported Rust version compatible with the project as specified by the repository.

Related MCP Servers

Sponsor this space

Reach thousands of developers