agentis-dev/Solana-Wallet-MCP
If you are the rightful owner of Solana-Wallet-MCP 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.
Solana Wallet MCP provides real-time Solana blockchain wallet functionality for AI assistants through a Model Context Protocol server.
get_wallet_balance
Get SOL and token balances.
get_wallet_info
Get comprehensive wallet information.
create_wallet
Generate new wallet keypair.
send_sol
Send SOL to another wallet.
send_token
Send SPL tokens.
get_transaction_history
Retrieve transaction history.
get_transaction_status
Check transaction status.
subscribe_wallet_changes
Monitor wallet for changes.
get_recent_activity
Get recent wallet activity.
Solana Wallet MCP
A Model Context Protocol (MCP) server that provides real-time Solana blockchain wallet functionality for AI assistants.
Project Structure
.
āāā src/
ā āāā server.ts # Main MCP server implementation
ā āāā handlers/
ā ā āāā wallet.ts # Wallet operations handlers
ā ā āāā transactions.ts # Transaction handlers
ā ā āāā tokens.ts # Token operations handlers
ā āāā utils/
ā ā āāā solana.ts # Solana connection utilities
ā ā āāā validation.ts # Input validation utilities
ā ā āāā formatting.ts # Response formatting utilities
ā āāā types/
ā ā āāā index.ts # TypeScript type definitions
ā āāā config/
ā āāā constants.ts # Configuration constants
āāā config/
ā āāā networks.json # Solana network configurations
āāā docs/
ā āāā API.md # API documentation
ā āāā SETUP.md # Setup instructions
āāā progress/
ā āāā development.md # Development progress tracking
āāā tests/
ā āāā wallet.test.ts # Wallet functionality tests
ā āāā integration.test.ts # Integration tests
āāā package.json
āāā tsconfig.json
āāā .env.example
āāā .gitignore
Features
- Real-time Wallet Monitoring: Track balance changes and transactions
- Multi-Network Support: Mainnet, Devnet, and Testnet compatibility
- Comprehensive Wallet Operations:
- Balance checking (SOL and SPL tokens)
- Transaction history retrieval
- Send/receive functionality
- Transaction status monitoring
- Security Features:
- Private key management
- Transaction validation
- Rate limiting
- MCP Integration: Full Model Context Protocol compliance
Quick Start
-
Clone and Install
cd solana-wallet-mcp npm install
-
Configure Environment
cp .env.example .env # Edit .env with your configuration
-
Start the MCP Server
npm run dev
MCP Tools Available
Wallet Operations
get_wallet_balance
- Get SOL and token balancesget_wallet_info
- Get comprehensive wallet informationcreate_wallet
- Generate new wallet keypair
Transaction Operations
send_sol
- Send SOL to another walletsend_token
- Send SPL tokensget_transaction_history
- Retrieve transaction historyget_transaction_status
- Check transaction status
Real-time Monitoring
subscribe_wallet_changes
- Monitor wallet for changesget_recent_activity
- Get recent wallet activity
Configuration
Configure your Solana network in config/networks.json
:
{
"mainnet": {
"rpcUrl": "https://api.mainnet-beta.solana.com",
"wsUrl": "wss://api.mainnet-beta.solana.com"
},
"devnet": {
"rpcUrl": "https://api.devnet.solana.com",
"wsUrl": "wss://api.devnet.solana.com"
}
}
Environment Variables
SOLANA_NETWORK=devnet
SOLANA_RPC_URL=https://api.devnet.solana.com
SOLANA_WS_URL=wss://api.devnet.solana.com
MCP_SERVER_PORT=3000
LOG_LEVEL=info
Security Notes
ā ļø Important Security Considerations:
- Never expose private keys in logs or responses
- Use secure key storage mechanisms
- Implement proper rate limiting
- Validate all inputs thoroughly
- Use testnet/devnet for development
Development
# Development mode with hot reload
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Lint code
npm run lint
Browser Support
This is a server-side MCP implementation that works with:
- Any MCP-compatible AI assistant
- Claude Desktop
- Custom MCP clients
About
Solana Wallet MCP provides comprehensive Solana blockchain wallet functionality through the Model Context Protocol, enabling AI assistants to perform real-time wallet operations securely and efficiently.
License
MIT License - see LICENSE file for details.