Solana MCP Server
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Uses dotenv for environment variable management to securely store configuration like private keys and API endpoints.
Can use Alchemy as an RPC endpoint provider for connecting to the Solana blockchain.
Supports integration with OpenAI models (like ChatGPT) as AI agents that can perform DeFi operations on Solana through the MCP server.
Solana MCP (Model Context Protocol)
A powerful Model Context Protocol (MCP) server for AI agents to interact with the Solana blockchain and DeFi protocols.
š Overview
Solana MCP provides a standardized interface for AI agents (like Claude, ChatGPT, etc.) to perform DeFi operations on the Solana blockchain. It bridges the gap between artificial intelligence and decentralized finance, allowing AI systems to:
- Query wallet balances and token holdings
- Transfer SOL and SPL tokens
- Execute token swaps
- Fetch real-time price data
- Perform advanced DeFi operations
Built on top of the Solana Agent Kit and the Model Context Protocol (MCP), this tool provides a secure, efficient, and standardized interface for automated DeFi operations.
š Prerequisites
- Node.js v22.x or later
- npm or yarn package manager
- Solana wallet (keypair)
- RPC endpoint for Solana (e.g., Helius, Alchemy, or your own node)
š§ Installation
- Clone this repository:
- Install dependencies:
- Create a
.env
file in the root directory with the following variables:
ā ļø Security Warning: Never commit your
.env
file or expose your private key. Add.env
to your.gitignore
file.
- Build the project:
š Usage
Start the MCP server:
When successfully started, you should see:
š¬ Available Actions
The following DeFi actions are available through the MCP server:
Action | Description |
---|---|
get_wallet | Get the current wallet address |
check_balance | Check SOL balance of the wallet |
transfer_sol | Transfer SOL to another wallet |
list_tokens | List all tokens in the wallet |
fetch_price | Fetch current price of a token |
trade_tokens | Execute a trade between tokens |
get_tps | Get current Solana network TPS |
swap_tokens | Swap tokens via liquidity pools |
š Integration with AI Models
This MCP server is designed to be used with AI models that support the Model Context Protocol. The server uses standard input/output for communication, making it compatible with various AI integration frameworks.
Example of using with Claude:
š Security Considerations
- Always review transactions before they are executed
- Consider implementing transaction limits
- Secure your private key with proper key management practices
- Use a dedicated wallet with limited funds for testing
- Monitor for any suspicious activities
š ļø Advanced Configuration
For more advanced configurations, you can modify the following files:
src/index.ts
: Main entry point.env
: Environment configuration
š Resources
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- 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
This server cannot be installed
A Model Context Protocol server enabling AI agents to interact with the Solana blockchain for DeFi operations like checking balances, transferring tokens, executing swaps, and fetching price data.
- š Overview
- š Prerequisites
- š§ Installation
- š Usage
- š¬ Available Actions
- š Integration with AI Models
- š Security Considerations
- š ļø Advanced Configuration
- š Resources
- š License
- š¤ Contributing