solana mcp
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.
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.
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.
This MCP server extends Claude's capabilities by providing tools to:
The server implements the Model Context Protocol specification to standardize blockchain interactions for AI agents.
# 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
# Install globally
npm install -g solana-mcp
# Or install locally in your project
npm install solana-mcp
Clone this repository:
git clone https://github.com/sendaifun/solana-mcp
cd solana-mcp
Install dependencies:
pnpm install
Build the project:
pnpm run build
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
To add this MCP server to Claude Desktop, follow these steps:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%Claudeclaude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
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": []
}
}
}
solana-agent-kit-mcp/
├── src/
│ ├── index.ts # Main entry point
├── package.json
└── tsconfig.json
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 SolanaIf you encounter issues:
Key dependencies include: * @solana/web3.js * @modelcontextprotocol/sdk * solana-agent-kit
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License.