Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

solana-mcp-server

MCP.Pizza Chef: openSVM

The Solana MCP Server is a Model Context Protocol server that provides extensive access to Solana blockchain data by implementing a wide range of Solana RPC methods. It allows developers and applications to query blockchain information seamlessly through natural language conversations, integrating Solana data into AI workflows. The server supports multiple platforms with pre-built binaries for Linux, macOS (Intel and Apple Silicon), and Windows, making installation straightforward. By bridging Solana's RPC interface with MCP, it facilitates real-time, structured blockchain data retrieval for AI agents and copilots, enhancing blockchain interaction and automation.

Use This MCP server To

Query Solana blockchain data via natural language Integrate Solana RPC methods into AI workflows Enable real-time blockchain data access for agents Automate Solana data retrieval in applications Support multi-platform Solana MCP server deployment

README

Solana MCP Server

A Model Context Protocol (MCP) server that provides comprehensive access to Solana blockchain data through Cline. This server implements a wide range of Solana RPC methods, making it easy to query blockchain information directly through natural language conversations.

Installation

Using Pre-built Binaries

  1. Go to the Releases page
  2. Download the appropriate binary for your system:
    • Linux: solana-mcp-server-linux-amd64
    • macOS Intel: solana-mcp-server-macos-amd64
    • macOS Apple Silicon: solana-mcp-server-macos-arm64
    • Windows: solana-mcp-server-windows-amd64.exe
  3. Make the binary executable (Linux/macOS):
    chmod +x solana-mcp-server-*
  4. Configure Claude Desktop:
    CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/claude"
    mkdir -p "$CONFIG_DIR"
    echo "{\"mcpServers\":{\"solana\":{\"command\":\"$PWD/solana-mcp-server-*\",\"env\":{\"SOLANA_RPC_URL\":\"https://api.mainnet-beta.solana.com\"}}}}" > "$CONFIG_DIR/config.json"

Building from Source

TEMP_DIR=$(mktemp -d) && cd "$TEMP_DIR" && git clone https://github.com/opensvm/solana-mcp-server.git . && cargo build --release && CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/claude" && mkdir -p "$CONFIG_DIR" && echo "{\"mcpServers\":{\"solana\":{\"command\":\"$PWD/target/release/solana-mcp-server\",\"env\":{\"SOLANA_RPC_URL\":\"https://api.mainnet-beta.solana.com\"}}}}" > "$CONFIG_DIR/config.json" || { rm -rf "$TEMP_DIR"; exit 1; }

Available RPC Methods

Account Methods

  • getAccountInfo: Returns all information associated with the account of provided Pubkey

    • Input: pubkey (string) - Pubkey of account to query, as base-58 encoded string
    • Returns: Account data, balance, owner, and other metadata
  • getMultipleAccounts: Returns account information for a list of Pubkeys

    • Input: pubkeys (array of strings) - List of Pubkeys to query
    • Returns: Array of account information
  • getProgramAccounts: Returns all accounts owned by the provided program Pubkey

    • Input: programId (string) - Program Pubkey to query
    • Returns: Array of owned accounts with their data
  • getBalance: Returns the SOL balance of an account

    • Input: pubkey (string) - Account Pubkey to query
    • Returns: Balance in lamports (1 SOL = 1,000,000,000 lamports)
  • getLargestAccounts: Returns the 20 largest accounts by lamport balance

    • Input: None
    • Returns: Array of accounts with their balances

Block Methods

  • getBlock: Returns identity and transaction information about a confirmed block

    • Input: slot (integer) - Slot number to query
    • Returns: Block data including hash, parent, and transactions
  • getBlocks: Returns a list of confirmed blocks between two slots

    • Input: start_slot (integer), end_slot (integer)
    • Returns: Array of block slots
  • getBlocksWithLimit: Returns a list of confirmed blocks starting at given slot

    • Input: start_slot (integer), limit (integer)
    • Returns: Array of block slots up to limit
  • getBlockTime: Returns estimated production time of a block

    • Input: slot (integer)
    • Returns: Unix timestamp (seconds since epoch)
  • getBlockHeight: Returns current block height

    • Input: None
    • Returns: Current block height
  • getBlockCommitment: Returns commitment for particular block

    • Input: slot (integer)
    • Returns: Block commitment information
  • getBlockProduction: Returns recent block production information

    • Input: None
    • Returns: Block production stats

System Methods

  • getHealth: Returns current health status of the node

    • Input: None
    • Returns: "ok" if healthy, error otherwise
  • getVersion: Returns current Solana version running on the node

    • Input: None
    • Returns: Version info including feature set
  • getIdentity: Returns identity pubkey for the current node

    • Input: None
    • Returns: Node identity pubkey
  • getClusterNodes: Returns information about all cluster nodes

    • Input: None
    • Returns: Array of node information
  • getVoteAccounts: Returns account info and stake for all voting accounts

    • Input: None
    • Returns: Current and delinquent vote accounts

Epoch and Inflation Methods

  • getEpochInfo: Returns information about the current epoch

    • Input: None
    • Returns: Epoch info including slot and block height
  • getEpochSchedule: Returns epoch schedule information

    • Input: None
    • Returns: Epoch schedule parameters
  • getInflationGovernor: Returns current inflation governor

    • Input: None
    • Returns: Inflation parameters
  • getInflationRate: Returns specific inflation values for current epoch

    • Input: None
    • Returns: Inflation rates
  • getInflationReward: Returns inflation reward for list of addresses

    • Input: addresses (array of strings), optional epoch (integer)
    • Returns: Array of inflation rewards

Token Methods

  • getTokenAccountBalance: Returns token balance of an SPL Token account

    • Input: accountAddress (string) - Token account to query
    • Returns: Token amount with decimals
  • getTokenAccountsByDelegate: Returns all token accounts by approved delegate

    • Input: delegateAddress (string)
    • Returns: Array of token accounts
  • getTokenAccountsByOwner: Returns all token accounts by token owner

    • Input: ownerAddress (string)
    • Returns: Array of token accounts
  • getTokenLargestAccounts: Returns 20 largest accounts of a token type

    • Input: mint (string) - Token mint to query
    • Returns: Array of largest token accounts
  • getTokenSupply: Returns total supply of an SPL Token type

    • Input: mint (string) - Token mint to query
    • Returns: Total supply with decimals

Transaction Methods

  • getTransaction: Returns transaction details for confirmed transaction

    • Input: signature (string) - Transaction signature
    • Returns: Transaction info and status
  • getSignaturesForAddress: Returns signatures for address's transactions

    • Input: address (string), optional limit (integer)
    • Returns: Array of transaction signatures
  • getSignatureStatuses: Returns statuses of a list of signatures

    • Input: signatures (array of strings)
    • Returns: Array of transaction statuses
  • getTransactionCount: Returns current Transaction count from ledger

    • Input: None
    • Returns: Transaction count
  • simulateTransaction: Simulate sending a transaction

    • Input: transaction (string) - Encoded transaction
    • Returns: Simulation results
  • sendTransaction: Send a transaction

    • Input: transaction (string) - Signed encoded transaction
    • Returns: Transaction signature

Other Methods

  • getFeeForMessage: Get the fee for a message

    • Input: message (string) - Encoded message
    • Returns: Fee in lamports
  • getLatestBlockhash: Returns the latest blockhash

    • Input: None
    • Returns: Blockhash and last valid slot
  • isBlockhashValid: Returns whether a blockhash is still valid

    • Input: blockhash (string)
    • Returns: Validity status
  • getStakeMinimumDelegation: Returns stake minimum delegation

    • Input: None
    • Returns: Minimum stake delegation in lamports
  • getSupply: Returns information about current supply

    • Input: None
    • Returns: Supply info including total and circulating
  • requestAirdrop: Request an airdrop of lamports to a Pubkey

    • Input: pubkey (string), lamports (integer)
    • Returns: Transaction signature

Usage Examples

Once configured, you can interact with the Solana blockchain through natural language in Cline. Here are some example queries:

  • "What's the SOL balance of address Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr?"
  • "Show me the current slot number"
  • "Get information about the latest block"
  • "What's the current inflation rate?"
  • "Show me the token accounts owned by address ..."

Environment Variables

Development

Prerequisites

  • Rust and Cargo
  • Solana CLI tools (optional, for testing)

Building

cargo build

Running

cargo run

License

MIT License

solana-mcp-server FAQ

How do I install the Solana MCP Server?
Download the appropriate pre-built binary from the GitHub Releases page, make it executable if on Linux/macOS, and configure your MCP host to use it.
Which operating systems are supported by the Solana MCP Server?
It supports Linux, macOS (Intel and Apple Silicon), and Windows with dedicated binaries for each platform.
How does the Solana MCP Server interact with Solana blockchain?
It implements Solana RPC methods, allowing querying of blockchain data through the MCP protocol.
Can I use the Solana MCP Server with different LLM providers?
Yes, it works with any MCP-compatible host, enabling integration with models like OpenAI GPT-4, Anthropic Claude, and Google Gemini.
Is the Solana MCP Server configurable for different Solana RPC endpoints?
Yes, you can set the SOLANA_RPC_URL environment variable to point to your preferred Solana RPC node.
Does the server support real-time updates from the Solana blockchain?
It primarily provides RPC method access; real-time subscriptions depend on the Solana RPC capabilities and client implementation.
How do I update the Solana MCP Server?
Download the latest binary from the GitHub Releases page and replace the existing executable.
Is there documentation available for the Solana MCP Server?
Yes, the GitHub repository includes installation instructions and usage details.