Setup Guide

Prerequisites

  • Node.js (v16 or higher)
  • pnpm (recommended), npm, or yarn
  • Solana wallet with private key
  • Solana RPC URL (mainnet, testnet, or devnet)

Installation Options

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 (recommended 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 the 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:

  1. 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
  2. Add the Configuration

    Create or edit the configuration file and add the following JSON:

    {
      "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": []
        }
      }
    }
  3. Restart Claude Desktop

    After making these changes, restart Claude Desktop for the configuration to take effect.

Available Tools

The MCP server provides the following Solana blockchain tools:

  • GET_ASSET - Retrieve information about a Solana asset/token
  • DEPLOY_TOKEN - Deploy a new token on Solana
  • GET_PRICE - Fetch price information for tokens
  • WALLET_ADDRESS - Get the wallet address
  • BALANCE - Check wallet balance
  • TRANSFER - Transfer tokens between wallets
  • MINT_NFT - Create and mint new NFTs
  • TRADE - Execute token trades
  • REQUEST_FUNDS - Request funds (useful for testing/development)
  • RESOLVE_DOMAIN - Resolve Solana domain names
  • GET_TPS - Get current transactions per second on Solana