Solana Metrics MCP Server
Analyzes Solana blockchain metrics from InfluxDB and generates categorized Grafana dashboards for monitoring consensus, network, banking, accounts, RPC, performance, and MEV metrics.
README
Solana Metrics MCP Server
This MCP server analyzes Solana metrics from InfluxDB and generates Grafana dashboards. It's designed to work with the sol_metrics database and provides intelligent categorization and analysis of blockchain metrics.
Features
- 🔍 Metric Discovery: Lists all available metrics from the sol_metrics InfluxDB database
- 🏷️ Intelligent Categorization: Automatically categorizes metrics into logical groups (Consensus, Network, Banking, Accounts, RPC, Performance, Jito/MEV)
- 📊 Metric Analysis: Provides detailed explanations of what each metric measures and why it's useful
- 📁 Auto-Dashboard Export: Creates and saves importable Grafana dashboard JSON files to
grafana/folder - 🔎 Code Search: Helps locate metric definitions in the Solana Rust codebase
- 🔄 Dual InfluxDB Support: Compatible with both InfluxDB v1 and v2
- 🛠️ VS Code Integration: Works seamlessly as an MCP server in Visual Studio Code
Installation
npm install
npm run build
Configuration
Set the following environment variables to connect to your InfluxDB instance:
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
Dashboard Export
When you generate dashboards using the generate_dashboard tool, the server automatically:
- Saves JSON files to the
grafana/folder in your project directory - Creates timestamped backups for version history
- Provides ready-to-import Grafana dashboard configurations
Generated dashboard files:
consensus-dashboard.json- Epoch rewards, slot confirmation, validator votingnetwork-dashboard.json- Gossip, cluster info, retransmit metricsbanking-dashboard.json- Transaction processing, prioritization feesaccounts-dashboard.json- Account database, cache, hashing metricsrpc-dashboard.json- RPC service and subscription metricsperformance-dashboard.json- CPU, memory, disk usage metricsjito-mev-dashboard.json- Block engine, bundle processing, MEV relayer metrics
Usage with Claude Desktop
Add this server to your Claude Desktop configuration:
{
"mcpServers": {
"solana-metrics": {
"command": "node",
"args": ["/absolute/path/to/solana-metrics-mcp-server/build/index.js"]
}
}
}
Available Tools
1. list_metrics
Lists all available metrics from the sol_metrics database.
2. analyze_metrics
Analyzes and categorizes metrics with detailed explanations.
- Parameters:
category(optional): Filter by category (Consensus, Network, Banking, Accounts, RPC, Performance, Jito/MEV, Other, All)
3. generate_dashboard
Generates a Grafana dashboard JSON for selected metrics.
- Parameters:
category: Category to generate dashboard fordashboard_name: Name for the generated dashboard
4. search_rust_code
Searches for metric definitions in the Solana Rust codebase.
- Parameters:
metric_name: Name of the metric to search for
Metric Categories
The server organizes metrics into the following categories based on Solana's architecture:
- Consensus: Validator voting, slots, epochs, leader schedules
- Network: Cluster topology, gossip, turbine, TPU/TVU, repairs
- Banking: Transaction processing, PoH recording, leader slot utilization
- Accounts: Account database operations, hashing, snapshots
- RPC: API request handling, subscriptions, WebSocket connections
- Performance: System resources, throughput benchmarks
- Jito/MEV: MEV tips, bundle processing, block engine metrics
Development
# Development mode
npm run dev
# Build only
npm run build
# Start server
npm start
Contributing
This server is designed for Solana metrics analysis. For questions or improvements, please refer to the Solana metrics documentation and codebase.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.