By grafanaCreated 12 days ago
starstarstarstarstar

Search dashboards, investigate incidents, and query datasources in Grafana.

Visit Project
Share this MCP:
X (Formerly Twitter)RedditblueskyThreads by Instagram

Category

Official MCP Server

Tags

GrafanaMonitoringDashboardDatasourceAlertingIncident Management

What is Grafana MCP Server?

Grafana MCP Server is a Model Context Protocol (MCP) server for Grafana that provides access to your Grafana instance and its ecosystem. It allows users to search dashboards, query datasources, investigate incidents, and more through a standardized protocol.

How to use Grafana MCP Server?

  1. Create a Grafana service account with the necessary permissions and generate an API key.
  2. Install the MCP server using one of the following methods:
    • Docker image
    • Download a pre-built binary
    • Build from source
  3. Configure the server in your client application (like Claude Desktop or VSCode) with appropriate environment variables.
  4. Use the available tools and commands to interact with Grafana.
  5. Optionally, enable debug mode for troubleshooting or configure TLS for secure connections.

Key features of Grafana MCP Server

  • Dashboard Management: Search, retrieve, update, and create dashboards
  • Datasource Interaction: List and fetch information about datasources (Prometheus, Loki)
  • Query Execution: Run PromQL, LogQL, and Pyroscope queries
  • Incident Management: Search, create, update, and resolve incidents
  • Sift Investigations: Create and manage investigations for log and trace analysis
  • Alerting: List and fetch alert rules and statuses
  • OnCall Management: View schedules, shifts, and teams in Grafana OnCall
  • Admin Tools: List teams and users
  • Configuration Options: Disable specific tool categories to optimize context window usage

Use cases of Grafana MCP Server

  1. Automating dashboard management and monitoring workflows
  2. Building custom incident response systems
  3. Creating advanced log and trace analysis tools
  4. Developing Grafana integration into AI assistants
  5. Securely connecting to Grafana instances behind mTLS

FAQ from Grafana MCP Server

  • What is the default transport mode?

    The Docker image defaults to SSE mode, but CLI/binary use defaults to STDIO mode.

  • **How do I override the default transport mode? **

    Use the -t flag with Docker (e.g., -t stdio) or specify the transport mode directly in the command-line.

  • What datasources are supported?

    Currently, Prometheus, Loki, and Pyroscope datasources are supported, with more coming in future updates.

  • How do I configure TLS for secure connections?

    Use the TLS configuration flags (--tls-cert-file, --tls-key-file, etc.) when starting the server.

  • What should I do if I encounter authentication issues?

    Ensure your Grafana service account has the correct permissions and that the API key is properly set in the environment variables.