The Solana MCP Server provides a comprehensive interface to Solana blockchain data through the Model Context Protocol. It allows you to query blockchain information directly using natural language conversations with Claude.
Download the appropriate binary from the Releases page:
solana-mcp-server-linux-amd64
solana-mcp-server-macos-amd64
solana-mcp-server-macos-arm64
solana-mcp-server-windows-amd64.exe
Make the binary executable (Linux/macOS):
chmod +x solana-mcp-server-*
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"
You can build and configure the server from source with this single command:
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; }
The server can be deployed to various environments using provided scripts:
# Local development
./scripts/deploy-local.sh
# Docker container
./scripts/deploy-docker.sh
# Kubernetes
./scripts/deploy-k8s.sh
# AWS Lambda
./scripts/deploy-lambda.sh
# Google Cloud Functions
./scripts/deploy-gcf.sh
# Vercel Edge Functions
./scripts/deploy-vercel.sh
Configure the server using these environment variables:
SOLANA_RPC_URL
: (Optional) Solana RPC endpoint. Defaults to "https://api.mainnet-beta.solana.com"SOLANA_COMMITMENT
: (Optional) Commitment level (processed|confirmed|finalized). Defaults to "confirmed"SOLANA_PROTOCOL_VERSION
: (Optional) MCP protocol version. Defaults to latestgetAccountInfo: Returns account information for a given Pubkey
pubkey
(string) - Base-58 encoded PubkeygetMultipleAccounts: Returns information for multiple Pubkeys
pubkeys
(array of strings) - List of PubkeysgetProgramAccounts: Returns accounts owned by a program
programId
(string) - Program PubkeygetBalance: Returns SOL balance of an account
pubkey
(string) - Account PubkeygetLargestAccounts: Returns 20 largest accounts by balance
filter
(string) - "circulating" or "nonCirculating"getMinimumBalanceForRentExemption: Returns minimum balance for rent exemption
dataSize
(integer) - Size of account data in bytesgetBlock: Returns information about a confirmed block
slot
(integer) - Slot numbergetBlocks: Returns list of confirmed blocks between slots
start_slot
(integer), end_slot
(integer)getBlocksWithLimit: Returns list of confirmed blocks with limit
start_slot
(integer), limit
(integer)getBlockTime: Returns production time of a block
slot
(integer)getBlockHeight: Returns current block height
getBlockCommitment: Returns commitment for a block
slot
(integer)getBlockProduction: Returns block production information
identity
(string), range
(object)getSlot: Returns current processing slot
commitment
(string)getSlotLeaders: Returns slot leaders for a range
startSlot
(integer), limit
(integer)getFirstAvailableBlock: Returns lowest available block
getGenesisHash: Returns genesis hash of the ledger
getHealth: Returns node health status
getVersion: Returns Solana version of the node
getIdentity: Returns node's identity pubkey
getClusterNodes: Returns information about all nodes
getLeaderSchedule: Returns leader schedule for an epoch
slot
(integer), identity
(string)getVoteAccounts: Returns info about voting accounts
getTokenAccountBalance: Returns token balance
accountAddress
(string) - Token accountgetTokenAccountsByDelegate: Returns token accounts by delegate
delegateAddress
(string)getTokenAccountsByOwner: Returns token accounts by owner
ownerAddress
(string)getTokenLargestAccounts: Returns largest accounts of a token
mint
(string) - Token mintgetTokenSupply: Returns total supply of a token
mint
(string) - Token mintgetTransaction: Returns transaction details
signature
(string) - Transaction signaturegetSignaturesForAddress: Returns signatures for an address
address
(string), optional limit
(integer)getSignatureStatuses: Returns statuses of signatures
signatures
(array of strings)getTransactionCount: Returns transaction count
simulateTransaction: Simulates a transaction
transaction
(string) - Encoded transactionsendTransaction: Sends a transaction
transaction
(string) - Signed encoded transactionAfter configuration, you can interact with the Solana blockchain through natural language in Claude. Here are some example queries:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "solana" '{"command":"solana-mcp-server","env":{"SOLANA_RPC_URL":"https://api.mainnet-beta.solana.com"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"solana": {
"command": "solana-mcp-server",
"env": {
"SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"solana": {
"command": "solana-mcp-server",
"env": {
"SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect