Solana MCP Wallet Agent API
A complete Express API for Solana blockchain wallet operations. This API provides functionality for managing Solana wallets, transferring SOL, and working with SPL tokens.
Features
- 🔐 Wallet Management: Create and manage Solana wallets
- 💰 SOL Transfers: Transfer SOL between wallets
- 🪙 Token Management: Create, mint, and transfer SPL tokens
- 📚 API Documentation: Interactive Swagger documentation
- 🔄 Error Handling: Robust error handling system
- 🧪 Development Ready: Easy to set up and use
Prerequisites
- Node.js (v16+)
- npm or yarn
- [Optional] Solana CLI tools for additional testing
Installation
- Clone the repository:
- Install dependencies:
- Create a
.env
file in the root directory with the following contents:
Development
Start the development server:
The server will start at http://localhost:3000
with hot-reloading enabled.
Build and Production
Build the project:
Start the production server:
API Documentation
Once the server is running, access the Swagger documentation at:
The documentation provides a complete overview of all available endpoints with request/response examples.
API Endpoints
Wallet Endpoints
Method | Endpoint | Description |
---|---|---|
POST | /api/wallet | Create a new wallet |
GET | /api/wallet/:publicKey | Get wallet information |
POST | /api/wallet/transfer | Transfer SOL to another wallet |
Token Endpoints
Method | Endpoint | Description |
---|---|---|
POST | /api/wallet/token | Create a new SPL token |
POST | /api/wallet/token/mint | Mint tokens to an address |
POST | /api/wallet/token/transfer | Transfer tokens to another wallet |
Security Considerations
- IMPORTANT: This project uses environment variables for keys. In a production environment, you should use proper key management services.
- Never expose your private keys in client-side code.
- For production, consider implementing additional authentication and authorization mechanisms.
Solana Integrations
This API interacts with the Solana blockchain to:
- Create and manage wallets
- Transfer SOL between wallets
- Create new SPL tokens
- Mint tokens to addresses
- Transfer tokens between wallets
Error Handling
The API includes comprehensive error handling with the following features:
- Detailed error messages in development mode
- Sanitized error messages in production
- Proper HTTP status codes
- Operational vs programming error distinction
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the ISC License - see the LICENSE file for details.
Support
For support, please create an issue in the repository or contact the repository maintainers.
This server cannot be installed
Solana ブロックチェーンの完全なウォレット管理機能を提供し、ユーザーがウォレットを作成したり、SOL を転送したり、RESTful API を介して SPL トークンを操作したりできるようにします。
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that provides Claude with comprehensive access to Solana blockchain data via the Helius API, enabling operations like checking wallet balances, retrieving blockchain information, and interacting with tokens and NFTs.Last updated -381513MIT License
- AsecurityAlicenseAqualityA server that enables interaction with the Solana blockchain, providing access to over 40 Solana RPC methods including getting balances, transaction details, block information, and sending transactions.Last updated -443MIT License
- AsecurityFlicenseAqualityA server that provides simple RPC endpoints for common Solana blockchain operations, allowing users to check balances, get account information, and transfer SOL between accounts.Last updated -51
- -securityAlicense-qualityA Model Context Protocol server that enables Claude AI to interact with the Solana blockchain through a standardized interface, providing tools for transactions, account queries, and wallet management.Last updated -18120Apache 2.0