solana-mainnet-wallet-agent
v0.1.0
Published
Safety-first CLI and MCP tools for Solana mainnet-beta wallet operations.
Readme
Solana Mainnet Wallet Agent
Safety-first CLI and MCP server for Solana mainnet-beta wallet operations: address, balance, SPL tokens, transaction status, and guarded SOL transfers.
This software moves REAL SOL on mainnet. You are solely responsible for your funds. This is not financial advice.
Security warning
- Operates on Solana mainnet-beta with real SOL
- Do not use wallets that hold significant funds
- Prefer a fresh wallet created via
solana-wallet setup - Private keys are stored locally at
~/.config/solana-mainnet-wallet-agent/wallet.json(mode600) - The CLI never prints private keys or seed phrases
sendrequires typingCONFIRMbefore broadcast- MCP exposes
prepare_solana_transferonly (preview) — no automatic send tool
Install
npm install -g solana-mainnet-wallet-agentRequires Node.js 20+.
Local development:
git clone <your-repo-url>
cd solana-mainnet-wallet-agent
npm install
npm run build
npm linkQuick start
solana-wallet setup
solana-wallet address
solana-wallet balanceSend SOL (manual confirmation required)
solana-wallet send --to <RECIPIENT> --amount 0.01You will see a preview, then must type CONFIRM exactly to broadcast.
Check a transaction
solana-wallet tx --signature <SIGNATURE>SPL tokens
solana-wallet tokensCLI commands
| Command | Description |
|---------|-------------|
| setup | Create fresh wallet or import Solana CLI JSON |
| address | Public address + QR code |
| balance | SOL balance on mainnet-beta |
| send --to <addr> --amount <sol> | Send SOL (requires CONFIRM) |
| tx --signature <sig> | Status + Explorer link |
| tokens | List SPL token accounts |
| mcp | MCP server on stdio |
Configuration
| Path | Purpose |
|------|---------|
| ~/.config/solana-mainnet-wallet-agent/config.json | RPC URL, metadata |
| ~/.config/solana-mainnet-wallet-agent/wallet.json | Keypair (Solana CLI byte array format) |
Default RPC: https://api.mainnet-beta.solana.com
Override RPC:
export SOLANA_RPC_URL=https://your-mainnet-rpc.example.comOr set rpcUrl in config.json during setup.
MCP server
solana-wallet mcpTools
| Tool | Broadcasts? | Description |
|------|-------------|-------------|
| get_solana_address | No | Wallet public key |
| get_solana_balance | No | SOL balance |
| get_solana_transaction_status | No | Tx status by signature |
| prepare_solana_transfer | No | Preview + unsigned tx base64 only |
There is no MCP tool that sends SOL. Users must use the CLI send command with CONFIRM.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"solana-mainnet-wallet-agent": {
"command": "solana-wallet",
"args": ["mcp"]
}
}
}See claude_desktop_config.example.json in this repo.
npm scripts
| Script | Purpose |
|--------|---------|
| npm run build | Compile to dist/ |
| npm start | MCP stdio (dist/index.js) |
| npm run dev | CLI from source |
| npm run publish:public | npm publish --access public |
Publish
npm login
npm run pack:check
npm publish --access publicDisclaimer
This project is provided as-is without warranty. Cryptocurrency transactions are irreversible. The authors are not responsible for lost funds, incorrect addresses, RPC failures, or misuse. Not financial advice. Always verify addresses and amounts before sending on mainnet.
