Get the FREE Ultimate OpenClaw Setup Guide →

solana

A Model Context Protocol server for interacting with the Solana blockchain, powered by the Solana Agent Kit (https://github.com/sendaifun/solana-agent-kit)

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio sendaifun-solana-mcp npx solana-mcp \
  --env RPC_URL="your_solana_rpc_url_here" \
  --env OPENAI_API_KEY="your_openai_api_key" \
  --env SOLANA_PRIVATE_KEY="your_private_key_here"

How to use

This MCP server exposes a set of Solana blockchain tools that Claude AI can invoke through a standardized MCP interface. It enables AI agents to query wallet information, check balances, transfer tokens, deploy tokens and NFTs, resolve domains, fetch prices, and even inspect network performance. The server is built on top of the Solana Agent Kit and integrates with Claude via the Model Context Protocol to provide safe, structured access to Solana operations. Use the MCP configuration in Claude Desktop to add the server, ensuring you provide the Solana RPC URL and wallet private key as environment variables. Optional OpenAI API key can be supplied if you want to enable model-assisted features or logging enhancements.

Once configured, you can call available tools such as GET_ASSET, DEPLOY_TOKEN, GET_PRICE, WALLET_ADDRESS, BALANCE, TRANSFER, MINT_NFT, TRADE, REQUEST_FUNDS, RESOLVE_DOMAIN, and GET_TPS. Each tool maps to a Solana action (e.g., BALANCE returns the wallet balance, TRANSFER moves SOL or tokens to another address, and MINT_NFT creates a new tokenized NFT). The server uses the SOLANA_PRIVATE_KEY to sign transactions and RPC_URL to communicate with the Solana cluster. Ensure you test operations on devnet/testnet before touching mainnet.

To avoid exposing sensitive credentials, keep the config in Claude Desktop secured and rely on environment variables passed to the MCP process as shown in the integration steps.

How to install

Prerequisites:

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

Option A: 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

Option B: 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 C: 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

Additional notes

Tips and considerations:

  • Store SOLANA_PRIVATE_KEY and RPC_URL as environment variables and do not commit them to version control.
  • If you use Claude Desktop, you can either run via npx (installed with npm) or point to a built index.js when you build from source.
  • For test transactions, use the devnet or testnet before operating on mainnet.
  • OpenAI_API_KEY is optional but can be used to enable enhanced capabilities or logging tied to OpenAI services.
  • Regularly update dependencies and monitor Solana network status to avoid transient failures.
  • Ensure the Claude Desktop configuration uses the appropriate command and arguments matching your installation method (npx vs node path).
  • If you encounter issues, verify RPC URL accessibility, wallet key validity, and network selection (mainnet/testnet/devnet).

Related MCP Servers

Sponsor this space

Reach thousands of developers