Get the FREE Ultimate OpenClaw Setup Guide →

solana-metrics

MCP server for analyzing Solana blockchain metrics from InfluxDB and auto-generating Grafana dashboards. Built for AI-native validator monitoring.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio wcampbellgalaxy-solana-metrics-mcp-server node /absolute/path/to/solana-metrics-mcp-server/build/index.js \
  --env INFLUX_ORG="InfluxDB organization name (for v2) or placeholder for v1" \
  --env INFLUX_URL="URL to your InfluxDB instance (e.g., http://localhost:8086)" \
  --env INFLUX_TOKEN="Token for the InfluxDB user with read/write access" \
  --env INFLUX_BUCKET="sol_metrics" \
  --env INFLUX_VERSION=""v1" or "v2""

How to use

This Solana Metrics MCP Server connects to an InfluxDB instance containing the sol_metrics database and automatically generates Grafana dashboards for Solana metrics. It exposes tools to discover available metrics, analyze and categorize them, and generate importable Grafana dashboard JSON files into a grafana/ folder. It also provides a code search capability to locate metric definitions in the Solana Rust codebase. To use it, ensure the InfluxDB connection details are correctly configured via environment variables, start the MCP server, and invoke the built-in tools (list_metrics, analyze_metrics, generate_dashboard, search_rust_code) to explore, categorize, and export dashboards for various Solana subsystems like Consensus, Network, Banking, Accounts, RPC, Performance, and Jito/MEV.

How to install

Prerequisites:

  • Node.js (LTS) installed on your system
  • npm installed
  • Access to a running InfluxDB instance with the sol_metrics database

Steps:

  1. Clone the repository: git clone <repository-url> cd solana-metrics-mcp-server

  2. Install dependencies: npm install

  3. Build the server (if a build step exists): npm run build

  4. Configure environment variables (example): export INFLUX_URL="http://your-influxdb-server:8086" export INFLUX_TOKEN="your_token" export INFLUX_ORG="your_org" export INFLUX_BUCKET="sol_metrics" export INFLUX_VERSION="v1" # or "v2" for InfluxDB v2

  5. Start the server: npm start

    or run directly if you prefer using the built index.js

    node build/index.js

Additional notes

Environment variables are required to connect to InfluxDB. If you’re using InfluxDB v2, ensure INFLUX_VERSION is set to v2 and INFLUX_ORG is correctly specified. The server will export Grafana dashboard JSON files into the grafana/ folder and create timestamped backups for version history. If dashboards fail to generate, check that the sol_metrics bucket exists and that the InfluxDB credentials have sufficient permissions. The available tools (list_metrics, analyze_metrics, generate_dashboard, search_rust_code) can be invoked via the server's CLI or integrated in your workflow. For Claude Desktop or other integrations, point to the built index.js as shown in the documentation.

Related MCP Servers

Sponsor this space

Reach thousands of developers