Solana MCP Wallet Agent API

by MindLayer25
MIT License

Integrations

  • Manages environment variables for configuration including port settings, environment type, Solana RPC URL, and wallet private keys.

  • Serves as the foundation for this API server, providing HTTP routing and middleware capabilities for all wallet operations.

  • Provides version control for the project, supporting the contribution workflow outlined in the README.

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

  1. Clone the repository:
git clone https://github.com/MindLayer25/Wallet-MCP-Agent.git cd Wallet-MCP-Agent
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with the following contents:
PORT=3000 NODE_ENV=development # Solana connection (devnet by default) SOLANA_RPC_URL=https://api.devnet.solana.com # For your wallet - get this from Solana keygen or a wallet export (JSON format) WALLET_PRIVATE_KEY=

Development

Start the development server:

npm run dev

The server will start at http://localhost:3000 with hot-reloading enabled.

Build and Production

Build the project:

npm run build

Start the production server:

npm start

API Documentation

Once the server is running, access the Swagger documentation at:

http://localhost:3000/api-docs

The documentation provides a complete overview of all available endpoints with request/response examples.

API Endpoints

Wallet Endpoints

MethodEndpointDescription
POST/api/walletCreate a new wallet
GET/api/wallet/:publicKeyGet wallet information
POST/api/wallet/transferTransfer SOL to another wallet

Token Endpoints

MethodEndpointDescription
POST/api/wallet/tokenCreate a new SPL token
POST/api/wallet/token/mintMint tokens to an address
POST/api/wallet/token/transferTransfer 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:

  1. Create and manage wallets
  2. Transfer SOL between wallets
  3. Create new SPL tokens
  4. Mint tokens to addresses
  5. 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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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.

-
security - not tested
A
license - permissive license
-
quality - not tested

Provides complete wallet management functionality for Solana blockchain, enabling users to create wallets, transfer SOL, and work with SPL tokens through a RESTful API.

  1. Features
    1. Prerequisites
      1. Installation
        1. Development
          1. Build and Production
            1. API Documentation
              1. API Endpoints
                1. Wallet Endpoints
                2. Token Endpoints
              2. Security Considerations
                1. Solana Integrations
                  1. Error Handling
                    1. Contributing
                      1. License
                        1. Support

                          Related MCP Servers

                          • -
                            security
                            A
                            license
                            -
                            quality
                            A 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 -
                            119
                            8
                            TypeScript
                            MIT License
                            • Apple
                            • Linux
                          • -
                            security
                            A
                            license
                            -
                            quality
                            A 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 -
                            Python
                            MIT License
                            • Apple
                          • A
                            security
                            F
                            license
                            A
                            quality
                            A 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 -
                            5
                            TypeScript
                          • -
                            security
                            A
                            license
                            -
                            quality
                            A 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 -
                            59
                            72
                            Apache 2.0
                            • Linux
                            • Apple

                          View all related MCP servers

                          ID: 6p1b2c9qb6