Skip to content

Feature request: InfluxDB datasource #176

Open
@hitoshyamamoto

Description

@hitoshyamamoto

It would be extremely helpful if mcp-grafana could query an InfluxDB datasource—whether it’s a self-hosted node on EC2 or an InfluxDB Cloud bucket. Right now we have to write extra glue code just to perform a simple aggregation like min, max, and mean temperature across multiple sensors over the last 30 days.

Proposed approach

  • New tool: query_influxdb
    • Inputs
      • datasource_uid – Grafana UID of the InfluxDB datasource
      • query – raw query text
      • start, end – RFC 3339 or epoch timestamps; omit both for an instant query
      • dialect – one of sql (default), flux, or influxql
    • Behaviour
      1. Build a payload for Grafana’s /api/ds/query, mapping query into rawSql, queryText, or the InfluxQL field according to dialect.
      2. Forward the request unchanged.
      3. Return the response JSON exactly as received (same pattern as query_prometheus and query_loki_logs).

Motivation

  • Removes boilerplate for both self-hosted and cloud InfluxDB users.
  • Keeps the tool signature consistent with existing datasource helpers.
  • Supports all three InfluxDB query languages without breaking older setups.

Please let me know if this aligns with the roadmap. I'll be happy to contribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions