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-serverwhat'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
This server cannot be deployed
Maintenance
Related MCP Connectors
Dry-run Solana txs before agents sign: exact balance changes, intent match, token traps. 25 free/day
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).
Provide AI agents and automation tools with contextual access to blockchain data including balance…
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 gradedqualityDmaintenanceProvides 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
- AlicenseAqualityDmaintenanceProvides 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.8MIT