Home / MCP / Solana Agent Kit MCP Server

Solana Agent Kit MCP Server

Provides onchain Solana tools for Claude AI, enabling wallet management, asset queries, transactions, and NFT operations via MCP.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "solana_mcp": {
            "command": "npx",
            "args": [
                "solana-mcp"
            ],
            "env": {
                "SOLANA_PRIVATE_KEY": "your_private_key_here",
                "RPC_URL": "your_solana_rpc_url_here",
                "OPENAI_API_KEY": "your_openai_api_key"
            }
        }
    }
}

You run a Solana MCP Server that exposes onchain Solana tools to Claude AI, letting your AI agents interact with the Solana blockchain through a standardized interface. It supports wallet management, account queries, token operations, NFT minting, transfers, and more, all accessible via MCP clients.

How to use

Use an MCP client to connect to the Solana MCP Server and issue structured tool calls. You can perform transactions, query account information, manage wallets, resolve domains, and fetch token prices. The server exposes a set of Solana tools that you can invoke through the MCP interface, enabling AI agents to operate on Solana as if calling local functions.

How to install

Complete installation by choosing one of the supported methods. Ensure you have Node.js 16 or higher, a Solana wallet private key, and a Solana RPC URL.

# Option 1: Quick Install (interactive)
curl -fsSL https://raw.githubusercontent.com/sendaifun/solana-mcp/main/scripts/install.sh -o solana-mcp-install.sh

chmod +x solana-mcp-install.sh && ./solana-mcp-install.sh --backup

How to install

Option 2 installs the MCP client locally or globally via npm. Choose this if you want to run the MCP from your project or as a global tool.

# Install globally
npm install -g solana-mcp

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

How to install

Option 3 builds from source if you prefer compiling from repository sources and running the built index.

# Build from source
git clone https://github.com/sendaifun/solana-mcp
cd solana-mcp

# Install dependencies
pnpm install

# Build the project
pnpm run build

Configuration

Create a configuration file with your credentials and optional OpenAI key. The server reads SOLANA_PRIVATE_KEY, RPC_URL, and OPENAI_API_KEY when provided.

# Solana Configuration
SOLANA_PRIVATE_KEY=your_private_key_here
RPC_URL=your_solana_rpc_url_here
OPENAI_API_KEY=your_openai_api_key # OPTIONAL

Additional configuration for Claude Desktop integration

Add the MCP server to Claude Desktop by editing the configuration file in your user profile. Use the provided command and arguments depending on your installation method.

{
  "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": []
    }
  }
}

Additional configuration for built-from-source setup

{
  "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": []
    }
  }
}

Restart Claude Desktop

Apply changes by restarting Claude Desktop so the MCP server configuration takes effect.

Project structure

The MCP server source is organized to expose the main entry point, build artifacts, and dependencies.

Security considerations

Keep your private key secure and never share it. Use environment variables for sensitive information. Consider a dedicated wallet for AI agent operations and monitor activity regularly. Test operations on devnet/testnet before mainnet.

Troubleshooting

If you run into issues, verify your private key and RPC URL, ensure you’re targeting the intended Solana network, check Claude Desktop logs for errors, and confirm the build finished successfully.

Dependencies

Key dependencies include the Solana Web3 library, MCP SDK, and the Solana Agent Kit core package.

Notes

This server exposes a set of Solana tools for AI agents, including wallet management, asset queries, token operations, NFT minting, and domain resolution.

Available 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 for testing or development

RESOLVE_DOMAIN

Resolve Solana domain names

GET_TPS

Get current transactions per second on Solana