How to give Claude access to Solana data with MCP
Claude cannot see the chain on its own. Ask it what is in a wallet and it guesses or asks you to paste an explorer page. The Model Context Protocol (MCP) fixes that: you run a small server that gives Claude tools, and Claude calls them when it needs data. Here is how to do it for Solana in about a minute, without handing Claude a private key.
What you are installing
solana-readonly-mcp is an MCP server that speaks to any Solana RPC endpoint and exposes nine read-only tools. It has no dependencies, holds no keys and refuses every RPC method that is not a read. Claude starts it as a child process and talks JSON-RPC to it over stdin and stdout. You need Node.js 20 or newer.
| Tool | What it answers |
|---|---|
get_balance | SOL balance of any address |
get_token_accounts | Every token a wallet holds (Token Program and Token-2022) |
get_account_info | Owner program, lamports, data size, parsed data |
get_transaction | Status, error, fee, signers, programs, SOL and token balance changes |
get_signatures | Recent signatures for an address, pageable |
get_token_supply_and_authorities | Supply, decimals, mint and freeze authority, Token-2022 extensions |
get_largest_token_holders | The 20 largest token accounts of a mint, with share of supply |
get_priority_fees | Recent priority fees as min / median / p75 / p90 / max |
get_slot_and_health | Slot, epoch progress, node version, health |
Claude Code: one command
claude mcp add solana -- npx -y github:blixvip/solana-readonly-mcp
With your own RPC endpoint:
claude mcp add solana -e SOLANA_RPC_URL="https://mainnet.helius-rpc.com/?api-key=YOUR_KEY" -- npx -y github:blixvip/solana-readonly-mcp
Check it is connected:
claude mcp list
It should show solana with a check mark. Inside a session, /mcp lists the server and its tools. By default claude mcp add registers the server for the current project only; add -s user to have it in every project.
Claude Desktop: one JSON block
Open Settings → Developer → Edit Config. That opens claude_desktop_config.json. Add:
{
"mcpServers": {
"solana": {
"command": "npx",
"args": [
"-y",
"github:blixvip/solana-readonly-mcp"
],
"env": {
"SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com"
}
}
}
}
If the file already has an mcpServers object, add the solana entry inside it. Restart Claude Desktop fully (quit from the tray or menu bar, not just the window).
Windows: "spawn npx ENOENT"
On Windows, npx is a .cmd script and some clients cannot start it directly. Run it through cmd:
{
"mcpServers": {
"solana": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"github:blixvip/solana-readonly-mcp"
],
"env": {
"SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com"
}
}
}
}
Use your own RPC endpoint
The default is the Solana Foundation's free public endpoint, https://api.mainnet-beta.solana.com. It is rate limited and refuses getTokenLargestAccounts, so get_largest_token_holders fails there. The free plans of Helius, QuickNode, Alchemy and Triton serve everything; put the URL with its key in SOLANA_RPC_URL. Devnet works too: https://api.devnet.solana.com. The server never prints the URL, only its host.
What to ask
| You ask | Claude calls |
|---|---|
| "How much SOL is in JUP6Lkb...?" | get_balance |
| "What tokens does this wallet hold?" | get_token_accounts |
| "Why did this transaction fail? 5eJQVYWM..." | get_transaction |
| "Can the dev of this mint still mint more or freeze accounts?" | get_token_supply_and_authorities |
| "What priority fee are swaps through this pool paying?" | get_priority_fees |
| "Is my RPC healthy?" | get_slot_and_health |
Because every tool carries readOnlyHint: true, Claude can mark them as safe to run without asking you each time.
Test it without Claude
If something does not work, check the server by hand. This sends the same two messages Claude sends first:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"me","version":"0"}}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_slot_and_health","arguments":{}}}' \
| npx -y github:blixvip/solana-readonly-mcp
You get one JSON line per message on stdout. The second one holds the slot, epoch and node health. If this works and Claude still does not see the tools, the problem is the config file path or JSON syntax, not the server.
Why not a server that can trade?
Most Solana MCP servers are built to sign: their setup asks for a private key in an environment variable. For looking things up you do not need that, and a model with a key can be talked into spending it. A read-only server cannot send anything, whatever the prompt says. When you need to trade, do it yourself.
Limits to know
- Priority fees are floors. The RPC reports the lowest fee that landed per block, so zeros are normal. For a real estimate see solana-priority-fee.
- Largest holders are token accounts, not wallets. Pools and bonding curves show up as big holders. sol-holders groups by wallet.
- stdio only. It runs on your machine. There is no hosted HTTP version of this server yet.