Skip to main content

MCP server providing read-only access to InfluxDB v2 database

Project description

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

Variable Description Default Required
InfluxDB Settings
INFLUXDB_TOKEN Auth token - Yes
INFLUXDB_ORG Organization - Yes
INFLUXDB_HOST InfluxDB hostname localhost No
INFLUXDB_PORT InfluxDB port 8086 No
INFLUXDB_USE_SSL Use HTTPS false No
INFLUXDB_VERIFY_SSL Verify SSL certs true No
INFLUXDB_TIMEOUT Request timeout (ms) 10000 No
MCP Settings
MCP_LISTEN_HOST Server bind address 127.0.0.1 No
MCP_LISTEN_PORT Server port 5001 No
MCP_TRANSPORT Transport protocol streamable-http No

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

influxdb_mcp-0.1.0.tar.gz (37.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

influxdb_mcp-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file influxdb_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: influxdb_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 37.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for influxdb_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 447d39c639a987ba95f2921f0372a51b268dfec79b662df13f9f1b60b37eea3c
MD5 dd46240ec460eae85b9c360704a90c71
BLAKE2b-256 34c6185d2de0fbf901a357abd28d7801e6008821a4f694a465d4615bb8755012

See more details on using hashes here.

File details

Details for the file influxdb_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for influxdb_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b650045ea019b66cde263548e82c75cea398c8d520f214f903f432880fffd47
MD5 7079724b9667440468ca7868813445fa
BLAKE2b-256 6952acbda508f634760e7a711184a95f0e652092d55dafe238e7215740d07d75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page