@expertvagabond/solana-mcp-server
v1.0.0
Published
Solana MCP server for wallet management, transaction handling, and program interactions on Solana blockchain
Maintainers
Readme
Solana MCP Server
A Model Context Protocol (MCP) server for Solana blockchain interactions, providing comprehensive wallet management, transaction handling, and program interactions.
📍 Publication Links
- GitHub: https://github.com/ExpertVagabond/solana-mcp-server
- NPM Package: https://www.npmjs.com/package/@ExpertVagabond/solana-mcp-server (pending publication)
- Smithery Platform: https://smithery.ai/search?q=ExpertVagabond (3+ active users)
- Live Demo: https://server.smithery.ai/@ExpertVagabond/solana-mcp-server/mcp
Features
🔐 Wallet Management (5 commands)
- Create new Solana wallets
- Import existing wallets from private keys
- List all managed wallets
- Get wallet balances (SOL and SPL tokens)
- Request SOL airdrops (devnet/testnet only)
💸 SOL Transfers (3 commands)
- Transfer SOL between wallets
- Transfer SOL to multiple addresses
- Get transfer history for wallets
🪙 SPL Token Operations (12 commands)
- Create new SPL tokens with custom decimals
- Transfer SPL tokens between wallets
- Mint additional tokens
- Burn tokens from wallets
- Create associated token accounts
- Get token balances and supply
- Get detailed token information
- Freeze/thaw token accounts
- Close token accounts to recover rent
🏗️ Staking Operations (8 commands)
- Create stake accounts
- Delegate stake to validators
- Deactivate stake accounts
- Withdraw from stake accounts
- Get all stake accounts for a wallet
- Get stake history
- Split stake accounts
- Merge stake accounts
🗳️ Validator Operations (4 commands)
- Get list of active validators
- Get detailed validator information
- Get validator performance metrics
- Get validator commission rates
📊 Account Operations (6 commands)
- Get detailed account information
- Get information for multiple accounts
- Get account owner program
- Get raw account data
- Get rent-exempt minimum
- Get account balance in lamports
🔄 Transaction Operations (8 commands)
- Get transaction details by signature
- Get recent blockhash for transaction building
- Simulate transactions without sending
- Get estimated transaction fees
- Get transaction confirmation status
- Get transaction history for accounts
- Get signatures for addresses
- Wait for transaction confirmation
🌐 Network Operations (6 commands)
- Switch between Solana networks (mainnet, devnet, testnet, localhost)
- Get network information and status
- Get epoch information
- Get slot information
- Get cluster health status
- Get Solana cluster version
📦 Block Operations (4 commands)
- Get block information by slot
- Get latest block information
- Get multiple blocks
- Get current block height
🔧 Program Account Operations (3 commands)
- Get all accounts owned by a program
- Get program data account
- Get count of accounts owned by a program
⚡ Compute Budget Operations (3 commands)
- Set compute unit limit for transactions
- Set compute unit price for transactions
- Get current compute budget limits
🛠️ Utility Operations (5 commands)
- Validate Solana addresses
- Get detailed address information
- Convert lamports to SOL
- Convert SOL to lamports
- Get rent-exempt minimum for data length
Installation
npm install
npm run buildUsage
Start the server
npm startAvailable Commands
Wallet Management
create_wallet- Create a new Solana walletimport_wallet- Import existing wallet from private keylist_wallets- List all managed walletsget_balance- Get SOL balance for a walletget_token_balance- Get SPL token balance
Transactions
transfer_sol- Transfer SOL between walletstransfer_tokens- Transfer SPL tokensairdrop_sol- Request SOL airdrop (devnet/testnet only)
Account Operations
get_account_info- Get detailed account informationget_transaction- Get transaction details by signaturecreate_token_account- Create associated token accountget_token_accounts- List all token accounts for a wallet
Network Operations
switch_network- Switch Solana networkget_network_info- Get current network informationget_recent_blockhash- Get recent blockhash
Supported Networks
- Mainnet: Production Solana network
- Devnet: Development network with free SOL airdrops
- Testnet: Testing network
- Localhost: Local Solana validator
Security Notes
- Private keys are stored in memory only (not persisted)
- For production use, implement secure key storage
- Never share private keys or commit them to version control
Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm run devDeployment
Smithery Deployment
The server is ready for deployment to Smithery:
# Build for production
smithery build src/index.ts
# Run locally for testing
smithery dev src/index.ts
# The server will be available at the provided URLManual Deployment
- Clone the repository
- Install dependencies:
npm install - Build the project:
npm run build - Run the server:
npm start
Testing
# Run basic functionality tests
node test-simple.js
# Run comprehensive tests
node test-comprehensive.js
# Run deployment readiness test
node test-deployment.jsFeatures Implemented
✅ Wallet Management (5 commands)
- Create new Solana wallets
- Import existing wallets from private keys
- List all managed wallets
- Get wallet balances (SOL and SPL tokens)
- Request SOL airdrops (devnet/testnet only)
✅ SOL Transfers (3 commands)
- Transfer SOL between wallets
- Transfer SOL to multiple addresses
- Get transfer history for wallets
✅ SPL Token Operations (12 commands)
- Create new SPL tokens with custom decimals
- Transfer SPL tokens between wallets
- Mint additional tokens
- Burn tokens from wallets
- Create associated token accounts
- Get token balances and supply
- Get detailed token information
- Freeze/thaw token accounts
- Close token accounts to recover rent
✅ Staking Operations (8 commands)
- Create stake accounts
- Delegate stake to validators
- Deactivate stake accounts
- Withdraw from stake accounts
- Get all stake accounts for a wallet
- Get stake history
- Split stake accounts
- Merge stake accounts
✅ Validator Operations (4 commands)
- Get list of active validators
- Get detailed validator information
- Get validator performance metrics
- Get validator commission rates
✅ Account Operations (6 commands)
- Get detailed account information
- Get information for multiple accounts
- Get account owner program
- Get raw account data
- Get rent-exempt minimum
- Get account balance in lamports
✅ Transaction Operations (8 commands)
- Get transaction details by signature
- Get recent blockhash for transaction building
- Simulate transactions without sending
- Get estimated transaction fees
- Get transaction confirmation status
- Get transaction history for accounts
- Get signatures for addresses
- Wait for transaction confirmation
✅ Network Operations (6 commands)
- Switch between Solana networks (mainnet, devnet, testnet, localhost)
- Get network information and status
- Get epoch information
- Get slot information
- Get cluster health status
- Get Solana cluster version
✅ Block Operations (4 commands)
- Get block information by slot
- Get latest block information
- Get multiple blocks
- Get current block height
✅ Program Account Operations (3 commands)
- Get all accounts owned by a program
- Get program data account
- Get count of accounts owned by a program
✅ Compute Budget Operations (3 commands)
- Set compute unit limit for transactions
- Set compute unit price for transactions
- Get current compute budget limits
✅ Utility Operations (5 commands)
- Validate Solana addresses
- Get detailed address information
- Convert lamports to SOL
- Convert SOL to lamports
- Get rent-exempt minimum for data length
✅ Performance Optimizations
- Lazy connection initialization (no startup timeouts)
- Network call timeouts (10s default)
- Comprehensive error handling
- Production-ready deployment
- Total: 50+ Solana commands implemented!
License
MIT
