influxdb-mcp

mludvig/influxdb-mcp

3.2

If you are the rightful owner of influxdb-mcp 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.

The InfluxDB MCP Server provides read-only access to InfluxDB v2 for LLMs, enabling querying of time-series data via Flux queries and schema discovery.

Tools
4
Resources
0
Prompts
0

InfluxDB MCP Server

Model Context Protocol server providing read-only access to InfluxDB v2 for LLMs. Enables querying time-series data via Flux queries and schema discovery.

Installation

Standalone using uv + python

# Clone and install
git clone <repository-url>
cd influxdb-mcp
uv sync

# Run
uv run python -m influxdb_mcp

Using Docker

# Build and run
docker build -t influxdb-mcp .
docker run -d -p 5001:5001 --env-file .env influxdb-mcp

# Or use docker-compose
docker-compose up -d

Configuration

Environment Variables

VariableDescriptionDefaultRequired
InfluxDB Settings
INFLUXDB_TOKENAuth token-Yes
INFLUXDB_ORGOrganization-Yes
INFLUXDB_HOSTInfluxDB hostnamelocalhostNo
INFLUXDB_PORTInfluxDB port8086No
INFLUXDB_USE_SSLUse HTTPSfalseNo
INFLUXDB_VERIFY_SSLVerify SSL certstrueNo
INFLUXDB_TIMEOUTRequest timeout (ms)10000No
MCP Settings
MCP_LISTEN_HOSTServer bind address127.0.0.1No
MCP_LISTEN_PORTServer port5001No
MCP_TRANSPORTTransport protocolstreamable-httpNo

.env Example

# InfluxDB Configuration
INFLUXDB_HOST=influxdb.example.com
INFLUXDB_PORT=8086
INFLUXDB_TOKEN=your-token-here
INFLUXDB_ORG=your-org

# MCP Configuration
MCP_LISTEN_HOST=0.0.0.0
MCP_LISTEN_PORT=8000

Available Tools

  • test_connection - Test InfluxDB connection and return status
  • list_buckets - List all available buckets
  • list_measurements(bucket) - List measurements in a bucket
  • execute_flux_query(query) - Execute custom Flux queries

Available Resources

  • influxdb://buckets - Live bucket list with metadata
  • influxdb://measurements/{bucket} - Live measurements for bucket
  • influxdb://status - Current connection status
  • flux://templates/daily-hourly-average/{bucket}/{measurement}/{field} - Hourly averages
  • flux://templates/recent-data/{bucket}/{measurement}/{field}/{duration} - Recent data
  • flux://templates/threshold-alerts/{bucket}/{measurement}/{field}/{threshold} - Threshold monitoring
  • flux://templates/correlation/{bucket}/{measurement1}/{field1}/{measurement2}/{field2} - Correlation analysis

Server runs on http://127.0.0.1:5001/mcp/ by default.

Author

Developed by Michael Ludvig and his AI assistants.