Back to MCP Catalog

InfluxDB MCP Server

DatabasesJavaScript
Query and manage InfluxDB time-series databases
Available Tools

write-data

Write time-series data in line protocol format to an InfluxDB bucket

orgbucketdataprecision

query-data

Execute Flux queries against InfluxDB

orgquery

create-bucket

Create a new bucket in InfluxDB

nameorgIDretentionPeriodSeconds

create-org

Create a new organization in InfluxDB

namedescription

The InfluxDB MCP provides a seamless interface to interact with InfluxDB time-series databases directly from your AI assistant. It enables querying data, writing new time-series points, and managing database objects like buckets and organizations. With this MCP, you can analyze time-series data, create visualizations, and manage your InfluxDB instance without leaving your AI assistant conversation. It supports the full power of Flux query language and InfluxDB's line protocol for data ingestion.

Overview

The InfluxDB MCP server provides a bridge between your AI assistant and InfluxDB instances, allowing you to work with time-series data directly in your conversations. This MCP supports the InfluxDB OSS API v2 and provides access to organization data, buckets, measurements, and query capabilities.

Configuration

Before using the InfluxDB MCP, you'll need to set up the following environment variables:

  • INFLUXDB_TOKEN (required): Your authentication token for the InfluxDB API
  • INFLUXDB_URL (optional): The URL of your InfluxDB instance (defaults to http://localhost:8086)
  • INFLUXDB_ORG (optional): Default organization name for operations that require it

Installation

You can install and run the InfluxDB MCP server in several ways:

Option 1: Run with npx (Recommended)

This is the simplest approach that requires minimal setup:

INFLUXDB_TOKEN=your_token npx influxdb-mcp-server

Option 2: Install Globally

If you prefer a global installation:

# Install globally
npm install -g influxdb-mcp-server

# Run the server
INFLUXDB_TOKEN=your_token influxdb-mcp-server

Option 3: From Source

For development or customization:

# Clone the repository
git clone https://github.com/idoru/influxdb-mcp-server.git
cd influxdb-mcp-server

# Install dependencies
npm install

# Run the server
INFLUXDB_TOKEN=your_token npm start

Integration with AI Assistants

To add this MCP to your AI assistant configuration, add the following to your configuration file:

Using npx (Recommended)

{
  "mcpServers": {
    "influxdb": {
      "command": "npx",
      "args": ["influxdb-mcp-server"],
      "env": {
        "INFLUXDB_TOKEN": "your_token",
        "INFLUXDB_URL": "http://localhost:8086",
        "INFLUXDB_ORG": "your_org"
      }
    }
  }
}

If Installed Locally

{
  "mcpServers": {
    "influxdb": {
      "command": "node",
      "args": ["/path/to/influxdb-mcp-server/src/index.js"],
      "env": {
        "INFLUXDB_TOKEN": "your_token",
        "INFLUXDB_URL": "http://localhost:8086",
        "INFLUXDB_ORG": "your_org"
      }
    }
  }
}

Available Resources

The MCP exposes these resources:

  1. Organizations List: influxdb://orgs - Lists all organizations in your InfluxDB instance
  2. Buckets List: influxdb://buckets - Shows all buckets with their metadata
  3. Bucket Measurements: influxdb://bucket/{bucketName}/measurements - Lists all measurements within a specified bucket
  4. Query Data: influxdb://query/{orgName}/{fluxQuery} - Executes a Flux query and returns results as a resource

Prompt Templates

The MCP includes helpful prompt templates:

  1. flux-query-examples: Provides common Flux query examples to help you get started
  2. line-protocol-guide: Offers a guide to InfluxDB line protocol format for writing data

Related MCPs

Milvus Vector Database
DatabasesPython

Connect to Milvus vector database for semantic search and vector operations

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.