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.
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.