home / mcp / solana model context protocol mcp server

Solana Model Context Protocol MCP Server

Solana MCP Server

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "omaidf-solana-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-p",
        "8000:8000",
        "--env-file",
        ".env",
        "solana-mcp-server"
      ],
      "env": {
        "HOST": "0.0.0.0",
        "PORT": "8000",
        "DEBUG": "False",
        "RELOAD": "False",
        "ENV_FILE": ".env",
        "LOG_LEVEL": "INFO",
        "CORS_ORIGINS": "*"
      }
    }
  }
}

You can run and interact with a Solana MCP Server to process real-time blockchain data, access a RESTful API, and receive live updates via WebSocket. This guide shows practical steps to install, run, and use the server with a client that can query token data, whale activity, account details, and token accounts with pricing.

How to use

Start the MCP server in development or production mode and connect your MCP client to the running service. Use the REST endpoints to fetch token information, whale activity, and detailed account data. Subscribe to real-time updates via WebSocket for ongoing Solana data streams. Typical usage patterns include querying token markets for pricing and supply data, detecting large holders, and obtaining enriched pricing for token accounts.

Key endpoints you will use include endpoints that provide token details, whale detection results, enhanced account analysis, and token accounts with pricing. Your MCP client should issue requests to these endpoints, handle responses, and maintain a WebSocket connection for live updates when applicable.

How to install

Prerequisites you need before installation:

  • Python 3.8+ is required
  • pip is available in your Python environment
  • Docker is optional but recommended for containerized runs

Step-by-step installation commands you should run in your shell:

# 1) Create and navigate to a project directory
mkdir solana-mcp
cd solana-mcp

# 2) Set up a Python environment (optional but recommended)
python -m venv venv
source venv/bin/activate

# 3) Install dependencies
pip install -r requirements.txt

# 4) Prepare environment configuration
cp .env.example .env
# Edit .env to include your Solana RPC node details

Additional sections

Configuration and runtime options let you choose how to run the server. You can run in development mode with a direct Python command, or in production mode with an ASGI server. You can also run a containerized instance using Docker.

Run options to start the server include the following commands.

# Development mode
python main.py

# Production mode
uvicorn main:app --host 0.0.0.0 --port 8000

# Docker mode (start container using the same environment configuration)
docker run -p 8000:8000 --env-file .env solana-mcp-server

Available tools

tokenInfo

Fetch detailed information about a token including price, market cap, and supply data.

whales

Identify large holders of specified tokens using configurable thresholds.

accountAnalysis

Return detailed parsed account information with additional context.

tokenAccountsPricing

Retrieve token accounts for an address with enriched pricing and valuation data.