Navigation
Solana MCP Server: Secure Private Keys & Decentralized Mastery 🌱 - MCP Implementation

Solana MCP Server: Secure Private Keys & Decentralized Mastery 🌱

Unleash full control over your Solana assets with this MCP server—securely interact using your private keys, mastering decentralized power 🌱.

Developer Tools
4.7(21 reviews)
31 saves
14 comments

Users create an average of 15 projects per month with this tool

About Solana MCP Server

What is Solana MCP Server: Secure Private Keys & Decentralized Mastery 🌱?

The Solana MCP Server is a self-hosted middleware that enables secure, direct interactions with the Solana blockchain using your private keys. Designed for developers and power users, it prioritizes privacy by keeping keys offline while providing granular control over wallet actions like transfers, balance checks, and slot monitoring. This decentralized tool empowers users to bypass third-party APIs while maintaining full ownership of their assets.

How to Use Solana MCP Server: Secure Private Keys & Decentralized Mastery 🌱?

Installation & Setup

  1. Clone the repo: git clone https://github.com/Grandbusta/solana-mcp.git
  2. Install dependencies: npm install
  3. Build the project: npm run build
  4. Create a secure `keypair.json` file storing your private key (never expose this file!)

Integration with Cursor

Link the server in Cursor MCP settings using the command:

/path/to/solana-mcp/run.sh /path/to/your/keypair.json
Adjust the RPC endpoint in `run.sh` if switching between devnet/mainnet.

Solana MCP Server Features

Key Features of Solana MCP Server: Secure Private Keys & Decentralized Mastery 🌱?

  • Real-time blockchain awareness: Query the latest validated slot instantly
  • Complete wallet visibility: Retrieve address, SOL balance, and USD valuation in one call
  • Secure transactions: Executable transfers with full transaction metadata verification
  • Compliance-ready: Auditable logs showing pre/post balances and transaction statuses

Use Cases of Solana MCP Server: Secure Private Keys & Decentralized Mastery 🌱?

IDEAL FOR:

  • Automating devnet testing with private keys isolated from production environments
  • Building custom dApp interfaces requiring direct blockchain interaction
  • Enterprise-grade wallet management with strict security protocols
  • Academic research requiring unfiltered access to on-chain data

Solana MCP Server FAQ

FAQ from Solana MCP Server: Secure Private Keys & Decentralized Mastery 🌱?

Why host this myself instead of using a hosted API?
Keeps your private keys offline and eliminates third-party dependency risks.
Is the wallet balance USD value accurate?
Uses Solana's native price feeds - no external exchange APIs involved.
Can I use this with mainnet?
Yes, but ensure you update the RPC endpoint and only use testnet keys until ready.
What happens if my keypair file is compromised?
Like any wallet, private keys are liabilities - enforce strict file permissions and backups.
Can I contribute improvements?
Definitely! Check the GitHub repo for open issues.

Content

Solana MCP Server 🌱

A MCP server to interact with the Solana blockchain with your own private key.

📖 Table of Contents

  • ✨Features
  • ⚙️Setup
  • Integration with Cursor
  • 🛠️Available Tools
  • 🔖License

✨ Features

  • Get latest slot
  • Get wallet address
  • Get wallet balance
  • Transfer SOL

⚙️ 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 you want and copy your private key into it. Check the example-keypair.json file for an example.

NB: RPC endpoint is set to api.devnet.solana.com by default. If you want to use a different endpoint, you can set it in the run.sh file.

Integration with Cursor

To integrate with Cursor, follow these steps:

  1. In the Cursor settings, go to MCP
  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

1. get-latest-slot

Returns the latest slot number:

368202671

2. get-wallet-address

Returns the wallet address:

5GTuMBag1M8tfe736kcV1vcAE734Zf1SRta8pmWf82TJ

3. get-wallet-balance

Returns the wallet balance in SOL, Lamports, and USD:

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

4. transfer

Transfers SOL to a recipient address:

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

🧑‍💻 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

🔖 License

WTFPL License

Related MCP Servers & Clients