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 "Install 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-mcpwhat 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: polskidegen-hl-tracker
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.
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose behavioral traits. It fails to mention that the operation is read-only, what happens with invalid addresses, rate limits, or error handling. The listed fields are minimal context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no fluff, efficiently conveying the tool's purpose and output fields.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description lists the key return fields. However, it omits whether there are additional fields or the structure of the response.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does not describe the 'address' parameter's format (e.g., base58) or provide examples, leaving the agent to guess.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the verb 'Get' and resource 'basic on-chain info for an account', and lists specific fields (owner program, lamports, executable flag). This clearly distinguishes the tool from siblings like get_epoch_info or get_transaction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving basic account info but provides no explicit guidance on when to use this tool versus alternatives or any prerequisites/exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_epoch_infoA
Get current Solana network epoch/slot info (epoch, slot, block height, progress).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It explicitly states the tool returns current data, implying a read-only operation. It does not mention destructive behavior or authentication needs, but given the simplicity and lack of parameters, it is sufficiently transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. It efficiently communicates the tool's purpose and the data it returns.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of parameters and output schema, the description is complete. It lists all the key data points (epoch, slot, block height, progress) that the tool returns, providing sufficient context for an AI agent to understand its use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the schema coverage is effectively 100%. The description adds no parameter details because none exist. Baseline for 0 parameters is 4, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves current Solana network epoch/slot info, listing specific data points (epoch, slot, block height, progress). It distinguishes from sibling tools like get_account_info or get_recent_signatures, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is straightforward and implied by the tool's purpose. The description does not explicitly provide when/when-not alternatives, but the context (sibling tools) and no parameters make it clear this is for general network info. A minor lack of explicit guidance prevents a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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}]}.
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | ||
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden. It reveals the return structure ({address, count, signatures}) and fields, implying read-only behavior. However, it does not disclose details like ordering (descending?), default limit behavior, error handling for invalid addresses, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: two sentences plus a clear Args/Returns section. Every sentence provides necessary information with no redundancy. The structure makes it easy for an AI to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no output schema), the description covers the purpose, parameter details, and return format adequately. It is slightly incomplete in not specifying sort order or edge cases, but overall sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no descriptions (0% coverage). The description compensates by explaining that 'address' is a Base58-encoded account/wallet address and 'limit' is the max number (1-100, default 10). This adds essential meaning beyond the schema types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List the most recent transaction signatures touching an account,' which is a specific verb-resource combination. It distinguishes from sibling tools like get_account_info, get_epoch_info, and get_transaction, none of which focus on listing signatures.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives (e.g., get_transaction for a specific transaction). The description does not mention prerequisites, exclusions, or appropriate contexts beyond the basic function.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the return format (dict with lamports and sol) and indicates the address parameter, but does not mention side effects, authentication requirements, rate limits, or error handling. Since no annotations exist, the description carries full burden, but it lacks depth beyond return structure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with no redundant words. It clearly separates the purpose, input arguments, and return value into distinct sections. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential information: what the tool does, the required parameter format, and the return value structure. However, it omits edge cases (e.g., invalid address handling) and does not clarify whether the tool is a read-only operation. Given the tool's simplicity, it is mostly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The parameter 'address' has schema coverage 0%, but the description adds critical context: it must be a Base58-encoded account/wallet address. This goes beyond the schema's type definition and helps the agent construct valid input.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the native SOL balance of a Solana account, using a specific verb and resource. It uniquely distinguishes itself from sibling tools like get_account_info or get_token_holdings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. The agent is left to infer usage from the tool's name and brief description alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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}.
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It reveals non-zero filtering and return structure, but lacks details on error handling, address validation, or read-only nature. Adequate but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: two sentences plus a structured Args/Returns section. No fluff, front-loaded purpose, and well-organized for quick parsing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description covers purpose, parameter, and return format adequately. Lacks edge-case handling (e.g., invalid address) but is largely complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides only type 'string' with 0% coverage. The description adds 'Base58-encoded wallet address', providing format and context that fully compensates for the schema's lack of description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states it lists non-zero SPL token balances for a Solana wallet. This clearly distinguishes it from sibling tools like get_sol_balance (SOL) or get_token_supply (token supply).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like get_sol_balance or get_token_supply. The description implies its use for token holdings but does not contrast with siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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}.
| Name | Required | Description | Default |
|---|---|---|---|
| mint | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the burden. It mentions the external dependency (via Jupiter) and the return format, but omits details about rate limits, caching, or failure behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at three sentences, with a clear purpose upfront and structured Args/Returns sections. It could be more terse but is well-organized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with a single parameter and no output schema, the description adequately covers purpose, parameter, and return shape. It does not discuss potential errors or edge cases, but it is sufficient for basic usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% coverage, but the description adds crucial details: format (Base58-encoded) and examples (USDC/SOL mint). This compensates for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves USD price of an SPL token using a mint address via Jupiter. It is distinct from siblings, which focus on balances, holdings, or transaction data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. Siblings are not mentioned, and there is no mention of prerequisites or limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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}.
| Name | Required | Description | Default |
|---|---|---|---|
| mint | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the return fields (mint, amount raw, decimals, ui_amount) and implies a read-only on-chain query. This adds useful context, though it could mention error handling or permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and well-structured with two sentences plus explicit Args and Returns sections. No unnecessary words; every part adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (one parameter, no output schema), the description is complete: it covers purpose, parameter, and return format. The return field details are crucial and well-provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has zero description coverage, so the description compensates fully by explaining the parameter 'mint: Base58-encoded token mint address.' This adds format and meaning beyond the schema's simple 'Mint' title.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get the total on-chain supply of an SPL token mint,' specifying a precise verb and resource. It distinguishes itself from siblings like get_token_price and get_token_holdings by focusing on supply rather than price or holdings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for supply queries but provides no explicit guidance on when to use this tool versus alternatives like get_token_holdings or get_token_price. No when-not or exclusion criteria are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| signature | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses that the tool returns slot, block_time, fee, error status, and log messages, implying a read-only operation. However, it does not mention side effects, rate limits, or authentication needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences for purpose and parameter, plus a clear Args/Returns format. Every sentence adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no nested objects, the description covers the purpose, input format, and expected return fields. Without an output schema, the return description is adequate. The tool is well-specified given its simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides only the parameter name and type (string) with no description (0% coverage). The description adds that it expects a 'Base58-encoded transaction signature', which compensates for the schema's lack of detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Summarize' and the resource 'Solana transaction', making the purpose explicit. It distinguishes from sibling tools (e.g., get_account_info, get_sol_balance) by focusing on transaction details, though does not explicitly contrast.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description only specifies the input (signature) but does not provide context such as prerequisites, typical use cases, or exclusions relative to siblings like get_recent_signatures.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
8 tool updates
v0.1.0- First observed
get_account_info - First observed
get_epoch_info - First observed
get_recent_signatures - First observed
get_sol_balance - First observed
get_token_holdings - First observed
get_token_price - First observed
get_token_supply - First observed
get_transaction
TDQS
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.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Solana MCP for wallets, trades, markets, PnL, transfers, onchain data, signable swaps and API tools.
Free read-only crypto whale-tracking & market-data MCP tools across 14 chains. No auth.
Solana on-chain intelligence — token scans, wallet profiling, bundle detection, 19 MCP tools.
Full Solana DeFi coverage: launchpads, tokens, trades, and wallets, decoded at scale.
Related MCP Servers
- AlicenseAqualityDmaintenanceSolana DeFi Intelligence MCP server enabling natural language queries for wallet analytics, DeFi positions, protocol metrics, and token prices.81MIT
- AlicenseAqualityDmaintenanceMCP server for Hyperliquid that provides read-only on-chain wallet analytics. Enables natural-language queries about positions, fills, funding, and realized PnL for any public address.818MIT
- 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.291MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sylvainlondon136/onchain-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server