Skip to main content
Glama
wcampbellgalaxy

Solana Metrics MCP Server

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

Related MCP server: Corvus

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:

  1. Saves JSON files to the grafana/ folder in your project directory

  2. Creates timestamped backups for version history

  3. Provides ready-to-import Grafana dashboard configurations

Generated dashboard files:

  • consensus-dashboard.json - Epoch rewards, slot confirmation, validator voting

  • network-dashboard.json - Gossip, cluster info, retransmit metrics

  • banking-dashboard.json - Transaction processing, prioritization fees

  • accounts-dashboard.json - Account database, cache, hashing metrics

  • rpc-dashboard.json - RPC service and subscription metrics

  • performance-dashboard.json - CPU, memory, disk usage metrics

  • jito-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 for

    • dashboard_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.

Available Tools

4 tools
analyze_metricsC

Analyze metrics and categorize them with explanations

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter by category (Consensus, Network, Banking, Accounts, RPC, Performance, Jito/MEV, Other)

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'categorize them with explanations', hinting at output behavior, but doesn't disclose critical traits: whether this is a read-only analysis, if it modifies data, what the output format is (e.g., text, structured data), or any performance considerations like latency or rate limits. For a tool with no annotations, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core action and output. It's front-loaded with the main purpose and avoids unnecessary words. However, it could be more structured by explicitly separating analysis from categorization, but given its brevity, it earns a high score for conciseness with minor room for improvement in clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (analysis implies some processing), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'analyze' entails, what the output looks like (e.g., explanations format), or any error conditions. For a tool with one parameter but undefined behavior and output, more detail is needed to make it fully usable by an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'category' fully documented in the schema (including enum values and description). The description adds no additional meaning beyond the schema, such as explaining how categorization interacts with analysis or default behaviors when no category is specified. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Analyze metrics and categorize them with explanations' states a general purpose but lacks specificity about what 'analyze' entails (e.g., statistical analysis, trend detection, anomaly identification). It distinguishes from 'list_metrics' (which likely just lists) and 'generate_dashboard' (which likely creates visualizations), but doesn't clearly differentiate from 'search_rust_code' (unrelated). The verb 'analyze' is somewhat vague without elaboration on the analytical method.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list_metrics' or 'generate_dashboard'. It doesn't mention prerequisites, such as needing metrics data to be available, or exclusions, like when simpler listing might suffice. Usage is implied only by the tool name and general purpose, with no explicit context or comparison to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_dashboardC

Generate a Grafana dashboard JSON for selected metrics

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryYesCategory to generate dashboard for
dashboard_nameYesName for the generated dashboard

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates JSON but doesn't describe what happens after generation (e.g., is it saved, displayed, or returned as output?), whether it requires specific permissions, or any side effects. This is inadequate for a tool that likely creates or outputs data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a generation tool with no annotations and no output schema), the description is incomplete. It doesn't explain what the output looks like (e.g., JSON structure), how the metrics are selected, or any behavioral traits. For a tool that likely produces significant output, this leaves critical gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly (category with enum values and dashboard_name). The description adds no additional meaning beyond implying the parameters influence the dashboard generation, which the schema already covers. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('generate') and resource ('Grafana dashboard JSON'), making the purpose understandable. However, it doesn't distinguish this tool from its siblings (analyze_metrics, list_metrics, search_rust_code), which all deal with different operations on metrics/code rather than dashboard generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when not to use it, or how it relates to sibling tools like analyze_metrics or list_metrics. The agent must infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_metricsB

List all available metrics from the sol_metrics InfluxDB database

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the action ('List all available metrics') but lacks behavioral details such as permissions needed, rate limits, pagination, or what 'available' entails (e.g., filtered by access). For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core action ('List all available metrics') and includes essential context ('from the sol_metrics InfluxDB database'). Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 0 parameters and no output schema, the description is minimally complete for a simple listing tool. However, with no annotations and no output details, it lacks behavioral context (e.g., response format, error handling). It's adequate but has clear gaps, making it a minimum viable description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline of 4 is applied for zero-parameter tools, as there's nothing to compensate for.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all available metrics'), specifying the source ('from the sol_metrics InfluxDB database'). It distinguishes from siblings like 'analyze_metrics' (analysis vs listing) and 'generate_dashboard' (creation vs listing), though not explicitly. However, it doesn't fully differentiate from 'search_rust_code' (different domain), so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to use 'list_metrics' over 'analyze_metrics' or 'search_rust_code', nor does it specify any prerequisites or exclusions. This leaves the agent with minimal context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_rust_codeC

Search for metric definitions in the Solana Rust codebase

ParametersJSON Schema
NameRequiredDescriptionDefault
metric_nameYesName of the metric to search for in the codebase

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool searches for metric definitions but doesn't describe what constitutes a 'metric definition' in this context, how results are returned (e.g., format, pagination), or any limitations (e.g., search scope, performance). This leaves significant gaps for a search operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any redundant or unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of searching a codebase for metric definitions, with no annotations and no output schema, the description is incomplete. It doesn't explain what a 'metric definition' entails in Rust code, how results are structured, or any behavioral nuances, leaving the agent with insufficient context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'metric_name' documented as 'Name of the metric to search for in the codebase'. The description adds no additional meaning beyond this, such as examples of metric names or search behavior details. Baseline 3 is appropriate as the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search for metric definitions') and target resource ('in the Solana Rust codebase'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'analyze_metrics' or 'list_metrics', which might also involve metrics in some way.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'analyze_metrics', 'generate_dashboard', or 'list_metrics'. It doesn't mention prerequisites, exclusions, or specific contexts for usage, leaving the agent to infer based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.1/5.0
Disambiguation4/5

The tools have mostly distinct purposes, but 'analyze_metrics' and 'generate_dashboard' could be confused as both involve processing metrics. 'list_metrics' and 'search_rust_code' are clearly distinct for data retrieval and code search respectively. The overlap is minor and descriptions help differentiate.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case throughout: analyze_metrics, generate_dashboard, list_metrics, search_rust_code. This predictability makes it easy for agents to understand and use the toolset.

Tool Count3/5

With only 4 tools, the server feels thin for a metrics domain that typically involves more operations like filtering, aggregating, or updating metrics. While the tools cover key areas, the count is borderline minimal for comprehensive metrics handling.

Completeness3/5

The toolset covers listing, analyzing, visualizing, and searching metrics, but lacks operations for creating, updating, or deleting metrics, which are common in metrics management. There are notable gaps that agents might need to work around for full lifecycle coverage.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Solana DeFi Intelligence MCP server enabling natural language queries for wallet analytics, DeFi positions, protocol metrics, and token prices.
    8
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides comprehensive analytics and insights for Solana wallets and their DeFi activities, including transaction tracking, DeFi position monitoring, risk profiling, and strategy recommendations.
    29
    7
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    On-chain investigation and analysis tools for Solana blockchain, enabling detection of wash trading, funding source tracing, holder concentration analysis, and MEV/bundle activity identification.
    4
    3

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wcampbellgalaxy/solana-metrics-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server