Solana MCP Wallet Agent API

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.

Category
Visit Server

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

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:

  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.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured