Solana MCP Wallet Agent API
Provides complete wallet management functionality for Solana blockchain, enabling users to create wallets, transfer SOL, and work with SPL tokens through a RESTful API.
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
- Clone the repository:
git clone https://github.com/MindLayer25/Wallet-MCP-Agent.git
cd Wallet-MCP-Agent
- Install dependencies:
npm install
- Create a
.envfile 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
| 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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.