Solana-Wallet-MCP

agentis-dev/Solana-Wallet-MCP

3.2

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.

Tools
  1. get_wallet_balance

    Get SOL and token balances.

  2. get_wallet_info

    Get comprehensive wallet information.

  3. create_wallet

    Generate new wallet keypair.

  4. send_sol

    Send SOL to another wallet.

  5. send_token

    Send SPL tokens.

  6. get_transaction_history

    Retrieve transaction history.

  7. get_transaction_status

    Check transaction status.

  8. subscribe_wallet_changes

    Monitor wallet for changes.

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

  1. Clone and Install

    cd solana-wallet-mcp
    npm install
    
  2. Configure Environment

    cp .env.example .env
    # Edit .env with your configuration
    
  3. Start the MCP Server

    npm run dev
    

MCP Tools Available

Wallet Operations

  • get_wallet_balance - Get SOL and token balances
  • get_wallet_info - Get comprehensive wallet information
  • create_wallet - Generate new wallet keypair

Transaction Operations

  • send_sol - Send SOL to another wallet
  • send_token - Send SPL tokens
  • get_transaction_history - Retrieve transaction history
  • get_transaction_status - Check transaction status

Real-time Monitoring

  • subscribe_wallet_changes - Monitor wallet for changes
  • get_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.