Solana Agent Kit MCP Server
Interact with the Solana blockchain using the Solana Agent Kit.
Solana Agent Kit MCP Server
A Model Context Protocol (MCP) server that provides onchain tools for Claude AI, allowing it to interact with the Solana blockchain through a standardized interface. This implementation is based on the Solana Agent Kit and enables AI agents to perform blockchain operations seamlessly.
Overview
This MCP server extends Claude's capabilities by providing tools to:
- Interact with Solana blockchain
- Execute transactions
- Query account information
- Manage Solana wallets
The server implements the Model Context Protocol specification to standardize blockchain interactions for AI agents.
Prerequisites
- Node.js (v16 or higher)
- pnpm (recommended), npm, or yarn
- Solana wallet with private key
- Solana RPC URL (mainnet, testnet, or devnet)
Installation
Option 1: Quick Install (Recommended)
# Download the installation script
curl -fsSL https://raw.githubusercontent.com/sendaifun/solana-mcp/main/scripts/install.sh -o solana-mcp-install.sh
# Make it executable and run
chmod +x solana-mcp-install.sh && ./solana-mcp-install.sh --backup
This will start an interactive installation process that will guide you through:
- Setting up Node.js if needed
- Configuring your Solana RPC URL and private key
- Setting up the Claude Desktop integration
Option 2: Install from npm ( recommend for clients like Cursor/Cline)
# Install globally
npm install -g solana-mcp
# Or install locally in your project
npm install solana-mcp
Option 3: Build from Source
- Clone this repository:
git clone https://github.com/sendaifun/solana-mcp
cd solana-mcp
- Install dependencies:
pnpm install
- Build the project:
pnpm run build
Configuration
Environment Setup
Create a .env file with your credentials:
# Solana Configuration
SOLANA_PRIVATE_KEY=your_private_key_here
RPC_URL=your_solana_rpc_url_here
OPENAI_API_KEY=your_openai_api_key # OPTIONAL
Integration with Claude Desktop
To add this MCP server to Claude Desktop, follow these steps:
-
Locate the Claude Desktop Configuration File
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the Configuration Create or edit the configuration file and add the following JSON:
If you installed via npm (Option 1):
{ "mcpServers": { "solana-mcp": { "command": "npx", "args": ["solana-mcp"], "env": { "RPC_URL": "your_solana_rpc_url_here", "SOLANA_PRIVATE_KEY": "your_private_key_here", "OPENAI_API_KEY": "your_openai_api_key" // OPTIONAL }, "disabled": false, "autoApprove": [] } } }If you built from source (Option 2):
{ "mcpServers": { "solana-mcp": { "command": "node", "args": ["/path/to/solana-mcp/build/index.js"], "env": { "RPC_URL": "your_solana_rpc_url_here", "SOLANA_PRIVATE_KEY": "your_private_key_here", "OPENAI_API_KEY": "your_openai_api_key" // OPTIONAL }, "disabled": false, "autoApprove": [] } } } -
Restart Claude Desktop After making these changes, restart Claude Desktop for the configuration to take effect.
Project Structure
solana-agent-kit-mcp/
├── src/
│ ├── index.ts # Main entry point
├── package.json
└── tsconfig.json
Available Tools
The MCP server provides the following Solana blockchain tools:
GET_ASSET- Retrieve information about a Solana asset/tokenDEPLOY_TOKEN- Deploy a new token on SolanaGET_PRICE- Fetch price information for tokensWALLET_ADDRESS- Get the wallet addressBALANCE- Check wallet balanceTRANSFER- Transfer tokens between walletsMINT_NFT- Create and mint new NFTsTRADE- Execute token tradesREQUEST_FUNDS- Request funds (useful for testing/development)RESOLVE_DOMAIN- Resolve Solana domain namesGET_TPS- Get current transactions per second on Solana
Security Considerations
- Keep your private key secure and never share it
- Use environment variables for sensitive information
- Consider using a dedicated wallet for AI agent operations
- Regularly monitor and audit AI agent activities
- Test operations on devnet/testnet before mainnet
Troubleshooting
If you encounter issues:
- Verify your Solana private key is correct
- Check your RPC URL is accessible
- Ensure you're on the intended network (mainnet, testnet, or devnet)
- Check Claude Desktop logs for error messages
- Verify the build was successful
Dependencies
Key dependencies include:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- 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 MIT License.
Related Servers
CData LinkedIn Ads
MCP Server for LinkedIn Ads, powered by the CData JDBC Driver. Requires a separate license and configuration.
Axiom
Query and analyze your Axiom logs, traces, and all other event data in natural language
GAM MCP Server
Administer Google Workspace using the GAM command-line tool.
Whissle AI
Provides speech-to-text, diarization, translation, and text summarization via the Whissle AI API.
Authless Remote MCP Server
An authentication-free, remote MCP server designed for deployment on Cloudflare Workers.
Remote MCP Server on Cloudflare
A remote MCP server designed to run on Cloudflare Workers, featuring OAuth login support.
Binance MCP Server
Provides seamless access to the Binance exchange API. Requires Binance API credentials to be configured.
Gdrive Cloudflare worker
Remote MCP server for Google Drive and Sheets running on Cloudflare Workers with full OAuth 2.0 support.
Pangea MCP proxy
Protect any MCP server from malicious entities and confidential PII using Pangea's AI Guard and Vault.
Replicate
Run AI models for tasks like image generation using the Replicate API.