Solana Blockchain MCP server

Enables secure interaction with the Solana blockchain for checking wallet balances, retrieving blockchain information, and executing token transfers through RPC endpoints and keypair-based authentication.
Back to servers
Setup instructions
Provider
Grandbusta
Release date
Mar 20, 2025
Language
TypeScript
Stats
10 stars

Solana MCP Server is a tool that allows you to interact with the Solana blockchain using your own private key. It provides a Model Context Protocol (MCP) server that enables simple blockchain operations like checking balances and transferring SOL.

Installation Options

Installing via Smithery

To install Solana MCP for Claude Desktop automatically:

npx -y @smithery/cli install @Grandbusta/solana-mcp --client claude

Manual Setup

  1. Clone the repository:
git clone https://github.com/Grandbusta/solana-mcp.git
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Create a keypair file: Create a file named keypair.json anywhere on your system and copy your private key into it. You can reference the example-keypair.json file as a template.

Note: The RPC endpoint is set to api.devnet.solana.com by default. To use a different endpoint, modify the run.sh file.

Integration with Cursor

To integrate with Cursor:

  1. In Cursor settings, navigate to MCP section
  2. Click "Add new MCP server"
  3. Enter the following information:
    • Name: Solana MCP
    • Type: command
    • Command: /path/to/your/solana-mcp/run.sh /path/to/your/keypair.json

Example command:

/Users/username/projects/solana-mcp/run.sh /Users/username/Documents/keypair.json

Available Tools

Get Latest Slot

Returns the latest slot number on the Solana blockchain:

368202671

Get Wallet Address

Returns your wallet address:

5GTuMBag1M8tfe736kcV1vcAE734Zf1SRta8pmWf82TJ

Get Wallet Balance

Returns your wallet balance in multiple formats (Lamports, SOL, and USD):

{
  "lamportsBalance": "4179966000",
  "solanaBalnce": 4.179966,
  "usdBalance": "553.0513"
}

Transfer SOL

Transfers SOL to a recipient address and returns transaction details:

{
  "blockTime": "1742316463",
  "meta": {
    "computeUnitsConsumed": "150",
    "err": null,
    "fee": "5000",
    "innerInstructions": [],
    "loadedAddresses": {
      "readonly": [],
      "writable": []
    },
    "logMessages": [
      "Program 11111111111111111111111111111111 invoke [1]",
      "Program 11111111111111111111111111111111 success"
    ],
    "postBalances": [
      "4179966000",
      "819999000",
      "1"
    ],
    "postTokenBalances": [],
    "preBalances": [
      "4399970000",
      "600000000",
      "1"
    ],
    "preTokenBalances": [],
    "rewards": [],
    "status": {
      "Ok": null
    }
  },
  "slot": "368211978",
  "transaction": {
    "message": {
      "accountKeys": [
        "6qhddtBoEHqTc3VM35a3rb3aLUe6vDQfmLigo2G4r5s1",
        "5GTuMBag1M8tfe736kcV1vcAE734Zf1SRta8pmWf82TJ",
        "11111111111111111111111111111111"
      ],
      "addressTableLookups": [],
      "header": {
        "numReadonlySignedAccounts": 0,
        "numReadonlyUnsignedAccounts": 1,
        "numRequiredSignatures": 1
      },
      "instructions": [
        {
          "accounts": [
            0,
            1
          ],
          "data": "3Bxs452Q9hdvHuwd",
          "programIdIndex": 2,
          "stackHeight": null
        }
      ],
      "recentBlockhash": "BLqtPS9BHPp9CRFTrVAsrxFMWC98VTUAQ3vi12bSquLo"
    },
    "signatures": [
      "3bLyqbPn26ofkaxSAVqadQnHqXu9hyoryixmKCn69nunKg2cSryDVAWnfCcYPcGtjSmXcMHfrzc3bw25zFTabXvs"
    ]
  },
  "version": "0"
}

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "solana-mcp" '{"command":"/path/to/your/solana-mcp/run.sh","args":["/path/to/your/keypair.json"]}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

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

{
    "mcpServers": {
        "solana-mcp": {
            "command": "/path/to/your/solana-mcp/run.sh",
            "args": [
                "/path/to/your/keypair.json"
            ]
        }
    }
}

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your 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 this to your configuration file:

{
    "mcpServers": {
        "solana-mcp": {
            "command": "/path/to/your/solana-mcp/run.sh",
            "args": [
                "/path/to/your/keypair.json"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

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