grafana/mcp-grafana
mcp-grafana is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.
If you are the rightful owner of mcp-grafana and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server for Grafana providing access to your Grafana instance and its ecosystem.
Try mcp-grafana with chat:
Has a README
Github repo has a README.md.
Has a License
Github repo has license info.
Server can be inspected
View server inspector
Server schema can be extracted
Can get at lease one tool info from the README or server.
Online hosted on MCPHub
Can be automatically deployed by MCPHub.
Has social accounts
Do not have any social accounts.
Claimed by the author or certified by MCPHub
If you are the author, claim authorship
AI Evaluation ReportTotal Score: 8/10
The agent demonstrates strong capabilities in executing tasks related to Grafana, such as querying logs and metrics, listing datasources, and retrieving Sift investigations. It effectively handles errors and provides detailed explanations and troubleshooting steps when operations do not yield expected results. The agent's responses are generally accurate and informative, showcasing its ability to utilize available tools effectively. However, it occasionally encounters issues related to system configurations, such as organization settings or missing datasources, which impact the completion of certain tasks. Despite these external limitations, the agent's performance is commendable, with room for improvement in transparency and completeness by including specific query details and time ranges.
Test case 1
Score: 8/10Execute a LogQL query against the 'grafanacloud-mcpreviewer-logs' data source to retrieve the most recent 10 log entries, including their timestamp, log level, and message content.It appears that there are currently no log entries matching the criteria in the 'grafanacloud-mcpreviewer-logs' data source. The query I executed aimed to retrieve logs with any log level, but it returned no results.
If you have specific criteria for the logs or wish to explore a different time range or log level, please let me know, and I can refine the query accordingly.
Test case 2
Score: 10/10Perform the operation of listing all available datasources in the Grafana instance and retrieving detailed information about each, including their names, UIDs, and types.The following datasources are available in the Grafana instance:
- Name: grafanacloud-infinity
- UID: grafanacloud-infinity
- Type: yesoreyeram-infinity-datasource
- Name: grafanacloud-k6
- UID: grafanacloud-k6
- Type: k6-datasource
- Name: grafanacloud-mcpreviewer-alert-state-history
- UID: grafanacloud-alert-state-history
- Type: loki
- Name: grafanacloud-mcpreviewer-cardinality-management
- UID: grafanacloud-cardinality-management
- Type: grafanacloud-cardinality-datasource
- Name: grafanacloud-mcpreviewer-graphite
- UID: grafanacloud-graphite
- Type: graphite
- Name: grafanacloud-mcpreviewer-logs
- UID: grafanacloud-logs
- Type: loki
- Name: grafanacloud-mcpreviewer-ngalertmanager
- UID: grafanacloud-ngalertmanager
- Type: alertmanager
- Name: grafanacloud-mcpreviewer-profiles
- UID: grafanacloud-profiles
- Type: grafana-pyroscope-datasource
- Name: grafanacloud-mcpreviewer-prom
- UID: grafanacloud-prom
- Type: prometheus (Default)
- Name: grafanacloud-mcpreviewer-traces
- UID: grafanacloud-traces
- Type: tempo
- Name: grafanacloud-mcpreviewer-usage-insights
- UID: grafanacloud-usage-insights
- Type: loki
- Name: grafanacloud-ml-metrics
- UID: grafanacloud-ml-metrics
- Type: prometheus
- Name: grafanacloud-usage
- UID: grafanacloud-usage
- Type: prometheus These datasources can be utilized for various metrics and log retrieval operations within the Grafana platform.
- Name: grafanacloud-infinity
Test case 3
Score: 7/10Execute a PromQL query against the 'grafanacloud-mcpreviewer-prom' data source to retrieve the current CPU usage metrics across all monitored services over the last hour.It appears that the PromQL query returned no results for the CPU usage metrics across all monitored services over the last hour. This could be due to a few reasons:
- No Data Collected: There may not be any CPU usage metrics being collected for the services during the specified time frame.
- Incorrect Query: The query might not be targeting the right metric or may need adjustment based on how the metrics are structured in the Prometheus data source.
- Configuration Issues: There might be issues with the Prometheus data source configuration or the services themselves might not be reporting metrics.
Next Steps
Here are a few suggestions to troubleshoot this issue:
- Verify Metrics: Check if the
container_cpu_usage_seconds_total
metric exists in your Prometheus data source. You may want to run a simpler query likecontainer_cpu_usage_seconds_total
without any aggregations and filters to see if data is available. - Check Time Range: Ensure that the services you are monitoring are actively reporting metrics within the last hour.
- Adjust Query: If you have access to the Prometheus console, you can try different queries or use a different metric to see if data is being captured.
If you would like me to run a different query or perform another task, please let me know!
Test case 4
Score: 6/10Create a new event in Grafana with the title 'Performance Degradation Investigation', severity 'warning', and tags 'performance', 'investigation'. Then retrieve the details of this newly created event by its ID.To create a new event in Grafana and then retrieve its details, I will first create the event with the specified parameters and then fetch the details using the event ID. Let's proceed with these steps.
Step 1: Create the Event
I'll create a new Grafana incident with the following details:
- Title: Performance Degradation Investigation
- Severity: Warning
- Tags: Performance, Investigation
Step 2: Retrieve the Event Details
After creating the event, I'll retrieve its details using the event ID.
Let's start by creating the event. It seems that there was an error while trying to create the incident in Grafana. The error message indicates a foreign key constraint failure, which could be related to organization settings or other configurations in the Grafana instance.
Next Steps
- Error Analysis: The error suggests that there might be an issue with the organization ID (
orgID
) associated with the Grafana setup. - Retrying Incident Creation: Before retrying, it might be beneficial to check if there are any existing incidents or configurations that could be causing this issue.
Let me first list the existing incidents to see if any relevant information can be found. It appears that there was another error while trying to list the existing incidents. The error indicates that the organization could not be found, which may further confirm that there is a configuration issue with the Grafana instance regarding organization settings.
Options Moving Forward
- Check Organization Settings: Ensure that the Grafana instance has the correct organization settings configured. This may require administrative access to the Grafana dashboard.
- Create Incident with Default Settings: If there's a way to create the incident without specifying organizational constraints, that could be tried.
- Consult Documentation or Support: It may be helpful to consult Grafana's documentation or support channels for issues related to organization and incidents.
If you have access to the Grafana dashboard, checking the organization settings might be the quickest way to resolve this issue. Would you like any specific steps or assistance with that?
Test case 5
Score: 8/10Perform the operation of retrieving the list of all Sift investigations in the Grafana instance, including their unique IDs, titles, and creation timestamps.The following Sift investigations were retrieved:
- Investigation ID: 944f1427-cc6e-4060-89f3-db632d18dd20
- Title: Slow Request Investigation
- Created: 2025-07-25T01:45:20.759Z
- Investigation ID: 4d465657-44b9-4a87-b81a-e76314c58004
- Title: Slow Request Investigation
- Created: 2025-07-25T01:45:13.693Z
- Investigation ID: 009ccd44-4042-4ffa-8798-23da7749759d
- Title: Error Pattern Investigation
- Created: 2025-07-25T01:45:05.168Z
- Investigation ID: 010f3676-ca4e-4a5e-a3dd-3f8c8b81c90e
- Title: Error Pattern Investigation
- Created: 2025-07-25T01:44:57.68Z
- Investigation ID: b9792826-6a67-47ef-b0bb-0ff9b0559ed9
- Title: Error Pattern Investigation
- Created: 2025-07-25T01:44:50.064Z
- Investigation ID: 3411d728-19a2-4d5a-a7b2-825dc596c4b9
- Title: Investigate Slow Requests
- Created: 2025-07-24T09:17:28.943Z
- Investigation ID: ba8ed64d-fa94-4c33-ac3d-65a112ce345f
- Title: Investigate Slow Requests
- Created: 2025-07-24T09:17:20.526Z
- Investigation ID: 863ae499-2663-4949-b239-28cbdcc4e35e
- Title: Error Pattern Analysis
- Created: 2025-07-24T09:17:09.146Z
- Investigation ID: 050fdf1d-b862-4310-ad37-779d68db34b9
- Title: Error Pattern Analysis
- Created: 2025-07-24T09:17:00.168Z
- Investigation ID: 505e91f2-3eec-4b27-a2eb-42dcdf2d3cfb
- Title: Error Pattern Analysis
- Created: 2025-07-24T09:16:43.223Z All investigations failed due to the absence of the required datasources. Please ensure that the datasources are configured properly and that the necessary labels exist in the datasources.
- Investigation ID: 944f1427-cc6e-4060-89f3-db632d18dd20