onchain-mcp
Provides live, read-only access to Solana on-chain data, including native SOL balances, SPL token holdings, token prices (via Jupiter), transaction summaries, account info, token supply, recent signatures, and epoch information.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@onchain-mcp what is the USDC price?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
onchain-mcp
A Model Context Protocol (MCP) server that gives any MCP client — Claude Desktop, Claude Code, Cursor, etc. — live, read-only access to Solana on-chain data. Ask natural-language questions like "what SPL tokens does this wallet hold?" or "what's the USD price of this mint?" and the model answers from real Solana mainnet RPC + Jupiter, no API key required.
Tools
Tool | What it does |
| Native SOL balance of an account |
| Non-zero SPL token balances of a wallet |
| USD price of a token mint (via Jupiter) |
| Parsed transaction summary (slot, fee, logs, success) |
| Owner program, lamports, executable flag |
| Total on-chain supply of a token mint |
| Recent transaction signatures for an account |
| Current epoch / slot / block height / progress |
All endpoints are public. Point at a private RPC by setting SOLANA_RPC_URL
(and optionally JUPITER_PRICE_API).
Related MCP server: Hermes Blockchain Oracle
Run
# Run the server over stdio (what an MCP client launches):
uv run --with "mcp>=1.2" --with httpx onchain_mcp.pyUse with Claude Desktop / Claude Code
Add to your MCP config (claude_desktop_config.json or .mcp.json):
{
"mcpServers": {
"onchain": {
"command": "uv",
"args": ["run", "--with", "mcp>=1.2", "--with", "httpx",
"/absolute/path/to/onchain-mcp/onchain_mcp.py"]
}
}
}Then ask, e.g.: "Using the onchain tools, what's the USDC price and how much
SOL does <address> hold?"
Test
Live smoke tests against mainnet (asserts USDC ≈ $1, the SPL Token program is executable, balance/holdings shapes):
uv run --python 3.12 --with "mcp>=1.2" --with httpx \
--with pytest --with pytest-asyncio pytest test_onchain_mcp.py -qNotes
Read-only: the server never signs or sends transactions — it only queries public chain state, so it is safe to expose to an LLM.
Default RPC is
api.mainnet-beta.solana.com(rate-limited); use a dedicated RPC for heavy use.
License
MIT
Available Tools
8 toolsget_account_infoA
Get basic on-chain info for an account: owner program, lamports, executable flag.
Inputs: address (required).
get_epoch_infoA
Get current Solana network epoch/slot info (epoch, slot, block height, progress).
Inputs: no named parameters.
get_recent_signaturesA
List the most recent transaction signatures touching an account.
Args: address: Base58-encoded account/wallet address. limit: Max number of signatures (1-100, default 10).
Returns {address, count, signatures: [{signature, slot, block_time, succeeded}]}.
Inputs: address (required), limit.
get_sol_balanceA
Get the native SOL balance of a Solana account.
Args: address: Base58-encoded account/wallet address.
Returns a dict with the raw lamports and human-readable sol.
Inputs: address (required).
get_token_holdingsA
List the non-zero SPL token balances held by a Solana wallet.
Args: address: Base58-encoded wallet address.
Returns a dict with a tokens list of {mint, amount, decimals, ui_amount}.
Inputs: address (required).
get_token_priceB
Get the USD price of an SPL token by its mint address (via Jupiter).
Args: mint: Base58-encoded token mint (e.g. the USDC or SOL mint).
Returns {mint, price_usd, found}.
Inputs: mint (required).
get_token_supplyA
Get the total on-chain supply of an SPL token mint.
Args: mint: Base58-encoded token mint address.
Returns {mint, amount (raw), decimals, ui_amount}.
Inputs: mint (required).
get_transactionA
Summarize a Solana transaction by its signature.
Args: signature: Base58-encoded transaction signature.
Returns slot, block_time, fee, error status, and log messages.
Inputs: signature (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have distinct purposes, but get_account_info and get_sol_balance overlap because the former already returns lamports, which is the SOL balance. This could cause confusion for agents.
All tools follow a consistent 'get_noun' pattern in snake_case, making it easy to predict tool names and understand their actions.
With 8 read-only tools covering key Solana on-chain data (accounts, tokens, transactions, network info), the count is well-scoped and not excessive.
Covers essential read operations, but missing tools for querying program accounts or arbitrary account data, leaving minor gaps for advanced use cases.
Maintenance
Related MCP Connectors
Read EVM and Solana chains for balances, tokens, eth_call, logs, receipts, gas, blocks and ENS.
Solana MCP for wallets, trades, markets, PnL, transfers, onchain data, signable swaps and API tools.
Read-only XRPL and Solana data for agents: fees, slippage, readiness. Free /mcp; x402 /mcp/pro.
Free read-only crypto whale-tracking & market-data MCP tools across 14 chains. No auth.
Related MCP Servers
- AlicenseAqualityDmaintenanceSolana DeFi Intelligence MCP server enabling natural language queries for wallet analytics, DeFi positions, protocol metrics, and token prices.81MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects Hermes Agent to the Solana blockchain, enabling natural language queries for wallets, tokens, NFTs, transactions, whale movements, and network health.6MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for interacting with the Solana blockchain. Provides tools to query balances, transactions, tokens, and network stats.45 npm1MIT
- AlicenseAqualityDmaintenanceA read-only Solana MCP server that lets AI assistants query SOL prices, wallet balances, SPL token holdings, and recent transactions on the Solana mainnet via natural language over stdio.423 npmMIT