Onchain
FreeNot checkedProvides read-only access to Solana on-chain data, enabling natural language queries for wallet balances, token holdings, prices, transactions, and more via MCP
About
Provides read-only access to Solana on-chain data, enabling natural language queries for wallet balances, token holdings, prices, transactions, and more via MCP-compatible clients.
README
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 |
|---|---|
get_sol_balance(address) |
Native SOL balance of an account |
get_token_holdings(address) |
Non-zero SPL token balances of a wallet |
get_token_price(mint) |
USD price of a token mint (via Jupiter) |
get_transaction(signature) |
Parsed transaction summary (slot, fee, logs, success) |
get_account_info(address) |
Owner program, lamports, executable flag |
get_token_supply(mint) |
Total on-chain supply of a token mint |
get_recent_signatures(address) |
Recent transaction signatures for an account |
get_epoch_info() |
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).
Run
# Run the server over stdio (what an MCP client launches):
uv run --with "mcp>=1.2" --with httpx onchain_mcp.py
Use 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 -q
Notes
- 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
Install Onchain in Claude Desktop, Claude Code & Cursor
unyly install onchain-mcpInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add onchain-mcp -- uvx --from git+https://github.com/sylvainlondon136/onchain-mcp onchain-mcpFAQ
Is Onchain MCP free?
Yes, Onchain MCP is free — one-click install via Unyly at no cost.
Does Onchain need an API key?
No, Onchain runs without API keys or environment variables.
Is Onchain hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Onchain in Claude Desktop, Claude Code or Cursor?
Open Onchain on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Onchain with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
