Solana Agent MCP server

Enables blockchain interactions on Solana by providing a comprehensive server for asset retrieval, token deployment, wallet management, transfers, NFT minting, and domain resolution.
Back to servers
Provider
SendAI
Release date
Mar 07, 2025
Language
TypeScript
Package
Stats
1.2K downloads
80 stars

Solana Agent Kit MCP Server provides onchain tools for Claude AI to interact with the Solana blockchain. It enables AI agents to perform operations like executing transactions, querying account information, and managing wallets through a standardized Model Context Protocol interface.

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

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 interactive installation process 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 from npm

# Install globally
npm install -g solana-mcp

# Or install locally in your project
npm install solana-mcp

Build from Source

  1. Clone the repository:
git clone https://github.com/sendaifun/solana-mcp
cd solana-mcp
  1. Install dependencies:
pnpm install
  1. 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

  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

    If you installed via npm:

    {
      "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:

    {
      "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": []
        }
      }
    }
    
  3. Restart Claude Desktop for the configuration to take effect.

Available Tools

The MCP server provides these 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

Troubleshooting

If you encounter issues:

  1. Verify your Solana private key is correct
  2. Check your RPC URL is accessible
  3. Ensure you're on the intended network (mainnet, testnet, or devnet)
  4. Check Claude Desktop logs for error messages
  5. Verify the build was successful

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

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later