solana-mcp-server
Provides read-only access to the Solana blockchain via JSON-RPC, enabling AI agents to check SOL balances, list SPL Token and Token-2022 accounts, summarize transactions, browse recent address activity, and simulate unsigned SOL transfers with logs, compute units, and fees. Supports devnet by default and configurable mainnet or custom RPC endpoints.
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., "@solana-mcp-server what's the SOL balance of 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU?"
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.
Overview
solana-mcp-server is a Model Context Protocol server that lets
MCP clients such as Claude Desktop query the Solana blockchain. An agent can check balances, list
SPL token holdings, read a transaction in compact form, browse recent activity and dry-run a SOL
transfer. The server is read-only by design: it never holds a private key, never signs and never
broadcasts anything, so you can plug it into an agent without handing over a wallet.
Related MCP server: Solana MCP Server
Features
get_balance: native SOL balance in lamports and SOL, computed with exact integer math.get_token_accounts: SPL Token and Token-2022 accounts, with mint, raw amount and decimals.get_transaction: a compact transaction summary (status, fee, signers, programs, SOL and token balance changes, optional logs).recent_activity: latest signatures for an address, with cursor-based pagination.simulate_transfer: builds an unsigned SOL transfer and runssimulateTransaction, returning logs, compute units and fee.Strict input validation with zod: base58 addresses and signatures are checked before any RPC call.
Uses devnet by default; mainnet or any custom RPC is selected with a single environment variable.
Readable error messages for agents instead of stack traces.
Architecture
sequenceDiagram
participant Client as MCP client (e.g. Claude Desktop)
participant Server as solana-mcp-server
participant Zod as zod validation
participant RPC as Solana JSON-RPC (devnet by default)
Client->>Server: tools/call (stdio, JSON-RPC)
Server->>Zod: validate address / signature / amount
alt invalid input
Zod-->>Server: issue list
Server-->>Client: error result with readable message
else valid input
Server->>RPC: read-only request (getBalance, getParsedTransaction, simulateTransaction ...)
RPC-->>Server: response
Server-->>Client: compact JSON summary
end
Note over Server,RPC: No keypair is loaded. Nothing is signed or sent.Quickstart
Requires Node.js 20.18 or newer.
git clone https://github.com/wonghldev/solana-mcp-server.git
cd solana-mcp-server
npm ci
npm run build
npm testTry it interactively with the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsUse it from Claude Desktop: copy the block from
examples/claude_desktop_config.json into your
claude_desktop_config.json, replace the path with the absolute path to dist/index.js and
restart Claude Desktop.
Run it with a local .env file:
cp .env.example .env
npm run start:envConfiguration
All variables are optional. Empty values fall back to the defaults.
Name | Required | Default | Description |
| No |
| JSON-RPC endpoint. Set a mainnet or provider URL to leave devnet. |
| No |
| Commitment for reads: |
| No |
| Timeout for each RPC request, from 1000 to 120000 ms. |
Security Model
Read-only. All tools are annotated with
readOnlyHintand only call read or simulation RPC methods.No keys. The server never loads a keypair, seed phrase or wallet file, and there is no setting to add one.
No signing.
simulate_transferbuilds a transaction with empty signature slots and simulates it without verifying signatures. It cannot be broadcast.Validated input. Addresses, signatures and amounts are validated before they reach the RPC node; SOL amounts use integer lamport math, never floating point.
Minimal logging. Diagnostics go to stderr only. Query strings in the RPC URL, where providers often put API keys, are redacted.
What it does not protect against: an RPC provider can still see the addresses you query, and data returned by a third-party RPC endpoint is trusted as-is.
Project Structure
solana-mcp-server/
├── examples/
│ └── claude_desktop_config.json
├── src/
│ ├── tools/
│ │ ├── getBalance.ts
│ │ ├── getTokenAccounts.ts
│ │ ├── getTransaction.ts
│ │ ├── recentActivity.ts
│ │ └── simulateTransfer.ts
│ ├── index.ts
│ ├── solana.ts
│ └── validation.ts
├── tests/
│ ├── transaction.test.ts
│ └── validation.test.ts
├── .env.example
├── .gitignore
├── LICENSE
├── README.md
├── package-lock.json
├── package.json
├── tsconfig.json
└── vitest.config.tsRoadmap
SOL balance, SPL / Token-2022 accounts, transaction summary, recent activity
Unsigned transfer simulation with fee and compute units
Input validation and unit tests
Token metadata (name, symbol) for known mints
Simulation of SPL token transfers
Streamable HTTP transport in addition to stdio
Response caching and rate limiting for public RPC endpoints
Status
Experimental — devnet only, not audited.
Disclaimer
This is experimental software provided as-is, without warranty. It is not financial advice. Verify any on-chain data independently before relying on it.
License
Available Tools
5 toolsget_balanceGet SOL balanceARead-only
Returns the native SOL balance of a Solana address (in lamports and SOL).
Inputs: address (required).
get_token_accountsGet SPL token accountsBRead-only
Lists SPL Token and Token-2022 accounts owned by an address, with mint, raw amount and decimals.
Inputs: owner (required), includeEmpty.
get_transactionGet transactionARead-only
Fetches a transaction by signature and returns a compact summary: status, fee, signers, programs called, SOL and token balance changes.
Inputs: signature (required), includeLogs.
recent_activityRecent activityARead-only
Returns the most recent transaction signatures that touched an address, newest first.
Inputs: address (required), limit, before.
simulate_transferSimulate SOL transferARead-only
Simulates a native SOL transfer without signing or sending it. Returns whether it would succeed, program logs, compute units and the network fee.
Inputs: to (required), from (required), amountSol (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: balance lookup, token account listing, transaction lookup by signature, recent address activity, and transfer simulation. The closest overlap is between get_transaction and recent_activity, but one is signature-specific and the other lists recent signatures, so selection is clear.
Four of five tools follow a snake_case verb_noun pattern (get_balance, get_token_accounts, get_transaction, simulate_transfer). recent_activity is readable but breaks the verb-first convention slightly.
Five tools is well-scoped for a Solana read/simulate inspection server. Each tool covers a distinct, useful operation without redundant surface area.
The server covers core inspection workflows: SOL balance, token accounts, transaction details, recent activity, and transfer simulation. Minor gaps exist, such as generic account lookup or token-transfer simulation, but the core read-only use cases are covered.
Maintenance
Related MCP Connectors
Dry-run Solana txs before agents sign: exact balance changes, intent match, token traps. 25 free/day
Run all your Solana wallets from your AI: send, swap, split, consolidate and clean up.
Read-only tools for agents: everything a Solana or Robinhood Chain wallet can get back (rent, wrapped SOL, LP fees, dead positions, failed deploys), whether a token is safe, when it unlocks, which protocol upgrades are live, and what a token operation costs. Every answer names the page where the user acts with their own wallet. Nothing here moves funds or holds keys.
Solana address risk grades and token scans for AI agents. Pay-per-call via x402 (USDC on Base).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Solana blockchain network, supporting documentation search, blockchain queries, wallet management, and cryptographic signing operations on Devnet and Testnet.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to read chain data, execute transactions, swap tokens, and manage wallets on Solana through 38 tools across 7 modules. Supports write operations with a private key and includes built-in prompts for common workflows.381MIT
- AlicenseNot gradedqualityCmaintenanceProvides basic Solana RPC methods and prompts for AI models to interact with the Solana blockchain. Enables developers to fetch balances, account info, and transactions through natural language.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query live Solana wallet token holdings, native SOL balances, transaction history, transaction details, and SPL token mint top holders through keyless public endpoints.330 npmMIT