ExpertVagabond/solana-mcp-server
3.2
If you are the rightful owner of solana-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server for Solana blockchain interactions, providing comprehensive wallet management, transaction handling, and program interactions.
Solana MCP Server
A Model Context Protocol (MCP) server for Solana blockchain interactions, providing comprehensive wallet management, transaction handling, and program interactions.
Features
Wallet Management
- Create new Solana wallets
- Import existing wallets from private keys
- List all managed wallets
- Get wallet balances (SOL and SPL tokens)
Transaction Operations
- Transfer SOL between wallets
- Transfer SPL tokens
- Request SOL airdrops (devnet/testnet only)
- Get transaction details by signature
Account Management
- Get detailed account information
- Create associated token accounts
- List all token accounts for a wallet
- Get token balances
Network Operations
- Switch between Solana networks (mainnet, devnet, testnet, localhost)
- Get network information and status
- Get recent blockhash for transaction building
Installation
npm install
npm run build
Usage
Start the server
npm start
Available 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 dev
Deployment
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 URL
Manual 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.js
Features Implemented
✅ Wallet Management
- Create new Solana wallets
- Import existing wallets from private keys
- List all managed wallets
- Get wallet balances (SOL and SPL tokens)
✅ Transaction Operations
- Transfer SOL between wallets
- Transfer SPL tokens
- Request SOL airdrops (devnet/testnet only)
- Get transaction details by signature
✅ Account Management
- Get detailed account information
- Create associated token accounts
- List all token accounts for a wallet
- Get token balances
✅ Network Operations
- Switch between Solana networks (mainnet, devnet, testnet, localhost)
- Get network information and status
- Get recent blockhash for transaction building
✅ Performance Optimizations
- Lazy connection initialization (no startup timeouts)
- Network call timeouts (10s default)
- Comprehensive error handling
- Production-ready deployment
License
MIT