Skip to main content
Glama
InfluxDB MCP Server

InfluxDB MCP Server

by Quorralyne

InfluxDB MCP Server

Official Model Context Protocol (MCP) server for InfluxDB integration. Provides tools, resources, and prompts for interacting with InfluxDB v3 (Core/Enterprise/Cloud Dedicated) via MCP clients.


Prerequisites

  • InfluxDB Instance: URL and token (Core/Enterprise) or Cluster ID and tokens (Cloud Dedicated)

  • Node.js: v18 or newer (for npm/npx usage)

  • npm: v9 or newer (for npm/npx usage)

  • Docker: (for Docker-based setup)


Related MCP server: InfluxDB OSS API MCP Server

Available Tools

Tool Name

Description

Availability

get_help

Get help and troubleshooting guidance for InfluxDB operations

All versions

write_line_protocol

Write data using InfluxDB line protocol

All versions

create_database

Create a new database (with Cloud Dedicated config options)

All versions

update_database

Update database configuration (maxTables, retention, etc.)

Cloud Dedicated only

delete_database

Delete a database by name (irreversible)

All versions

execute_query

Run a SQL query against a database (supports multiple formats)

All versions

get_measurements

List all measurements (tables) in a database

All versions

get_measurement_schema

Get schema (columns/types) for a measurement/table

All versions

create_admin_token

Create a new admin token (full permissions)

Core/Enterprise only

list_admin_tokens

List all admin tokens (with optional filtering)

Core/Enterprise only

create_resource_token

Create a resource token for specific DBs and permissions

Core/Enterprise only

list_resource_tokens

List all resource tokens (with filtering and ordering)

Core/Enterprise only

delete_token

Delete a token by name

Core/Enterprise only

regenerate_operator_token

Regenerate the operator token (dangerous/irreversible)

Core/Enterprise only

cloud_list_database_tokens

List all database tokens for Cloud-Dedicated cluster

Cloud Dedicated only

cloud_get_database_token

Get details of a specific database token by ID

Cloud Dedicated only

cloud_create_database_token

Create a new database token for Cloud-Dedicated cluster

Cloud Dedicated only

cloud_update_database_token

Update an existing database token

Cloud Dedicated only

cloud_delete_database_token

Delete a database token from Cloud-Dedicated cluster

Cloud Dedicated only

list_databases

List all available databases in the instance

All versions

health_check

Check InfluxDB connection and health status

All versions


Available Resources

Resource Name

Description

influx-config

Read-only access to InfluxDB configuration

influx-status

Real-time connection and health status

influx-databases

List of all databases in the instance


Setup & Integration Guide

1. Environment Variables

For Core/Enterprise InfluxDB:

You must provide:

  • INFLUX_DB_INSTANCE_URL (e.g. http://localhost:8181/)

  • INFLUX_DB_TOKEN

  • INFLUX_DB_PRODUCT_TYPE (core or enterprise)

Example .env:

INFLUX_DB_INSTANCE_URL=http://localhost:8181/
INFLUX_DB_TOKEN=your_influxdb_token_here
INFLUX_DB_PRODUCT_TYPE=core

For Cloud Dedicated InfluxDB:

You must provide INFLUX_DB_PRODUCT_TYPE=cloud-dedicated and INFLUX_DB_CLUSTER_ID, plus one of these token combinations:

Option 1: Database Token Only (Query/Write operations only):

INFLUX_DB_PRODUCT_TYPE=cloud-dedicated
INFLUX_DB_CLUSTER_ID=your_cluster_id_here
INFLUX_DB_TOKEN=your_database_token_here

Option 2: Management Token Only (Database management only):

INFLUX_DB_PRODUCT_TYPE=cloud-dedicated
INFLUX_DB_CLUSTER_ID=your_cluster_id_here
INFLUX_DB_ACCOUNT_ID=your_account_id_here
INFLUX_DB_MANAGEMENT_TOKEN=your_management_token_here

Option 3: Both Tokens (Full functionality):

INFLUX_DB_PRODUCT_TYPE=cloud-dedicated
INFLUX_DB_CLUSTER_ID=your_cluster_id_here
INFLUX_DB_ACCOUNT_ID=your_account_id_here
INFLUX_DB_TOKEN=your_database_token_here
INFLUX_DB_MANAGEMENT_TOKEN=your_management_token_here

See env.cloud-dedicated.example for detailed configuration options and comments.


2. Integration with MCP Clients

A. Local (npm install & run)

  1. Install dependencies:

    npm install
  2. Build the server:

    npm run build
  3. Configure your MCP client to use the built server. Example (see example-local.mcp.json):

    {
      "mcpServers": {
        "influxdb": {
          "command": "node",
          "args": ["/path/to/influx-mcp-standalone/build/index.js"],
          "env": {
            "INFLUX_DB_INSTANCE_URL": "http://localhost:8181/",
            "INFLUX_DB_TOKEN": "<YOUR_INFLUXDB_TOKEN>",
            "INFLUX_DB_PRODUCT_TYPE": "core"
          }
        }
      }
    }

B. Local (npx, no install/build required)

  1. Run directly with npx (after publishing to npm, won't work yet):

    {
      "mcpServers": {
        "influxdb": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-influxdb"],
          "env": {
            "INFLUX_DB_INSTANCE_URL": "http://localhost:8181/",
            "INFLUX_DB_TOKEN": "<YOUR_INFLUXDB_TOKEN>",
            "INFLUX_DB_PRODUCT_TYPE": "core"
          }
        }
      }
    }

C. Docker

Before running the Docker integration, you must build the Docker image:

# Option 1: Use docker compose (recommended)
docker compose build
# Option 2: Use npm script
npm run docker:build

a) Docker with remote InfluxDB instance (see example-docker.mcp.json):

{
  "mcpServers": {
    "influxdb": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "INFLUX_DB_INSTANCE_URL",
        "-e",
        "INFLUX_DB_TOKEN",
        "-e",
        "INFLUX_DB_PRODUCT_TYPE",
        "mcp/influxdb"
      ],
      "env": {
        "INFLUX_DB_INSTANCE_URL": "http://remote-influxdb-host:8181/",
        "INFLUX_DB_TOKEN": "<YOUR_INFLUXDB_TOKEN>",
        "INFLUX_DB_PRODUCT_TYPE": "core"
      }
    }
  }
}

b) Docker with InfluxDB running in Docker on the same machine (see example-docker.mcp.json):

Use host.docker.internal as the InfluxDB URL so the MCP server container can reach the InfluxDB container:

{
  "mcpServers": {
    "influxdb": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--add-host=host.docker.internal:host-gateway",
        "-e",
        "INFLUX_DB_INSTANCE_URL",
        "-e",
        "INFLUX_DB_TOKEN",
        "-e",
        "INFLUX_DB_PRODUCT_TYPE",
        "influxdb-mcp-server"
      ],
      "env": {
        "INFLUX_DB_INSTANCE_URL": "http://host.docker.internal:8181/",
        "INFLUX_DB_TOKEN": "<YOUR_INFLUXDB_TOKEN>",
        "INFLUX_DB_PRODUCT_TYPE": "enterprise"
      }
    }
  }
}

Example Usage

  • Use your MCP client to call tools, resources, or prompts as described above.

  • See the example-*.mcp.json files for ready-to-use configuration templates:

    • example-local.mcp.json - Local development setup

    • example-npx.mcp.json - NPX-based setup

    • example-docker.mcp.json - Docker-based setup

    • example-cloud-dedicated.mcp.json - Cloud Dedicated with all variables

  • See the env.example and env.cloud-dedicated.example files for environment variable templates.


Support & Troubleshooting

  • Use the get_help tool for built-in help and troubleshooting.

  • For connection issues, check your environment variables and InfluxDB instance status.

  • For advanced configuration, see the comments in the example .env and MCP config files.


License

MIT

Available Tools

21 tools
cloud_create_database_tokenA

Create a new database token for InfluxDB Cloud-Dedicated cluster. Specify exact permissions per database or create a no-access token.

Permissions format: [{"database": "db_name", "action": "read|write"}, ...] Examples: • No access: omit permissions field or use [] • Read-only on 'analytics': [{"database": "analytics", "action": "read"}] • Mixed permissions: [{"database": "logs", "action": "read"}, {"database": "metrics", "action": "write"}] • Full access: [{"database": "", "action": "read"}, {"database": "", "action": "write"}]

Inputs: description (required), permissions.

cloud_delete_database_tokenB

Delete a database token from InfluxDB Cloud-Dedicated cluster. This action cannot be undone.

Inputs: token_id (required).

cloud_get_database_tokenB

Get details of a specific database token by ID for InfluxDB Cloud-Dedicated cluster.

Inputs: token_id (required).

cloud_list_database_tokensA

List all database tokens for InfluxDB Cloud-Dedicated cluster. Returns token information including permissions and creation dates.

Inputs: no named parameters.

cloud_update_database_tokenA

Update an existing database token for InfluxDB Cloud-Dedicated cluster. Can update description and/or permissions with precise control.

Permissions format: [{"database": "db_name", "action": "read|write"}, ...] Note: Permissions completely replace existing ones - include all desired permissions. Examples: • No access: use [] • Read-only on 'analytics': [{"database": "analytics", "action": "read"}] • Mixed permissions: [{"database": "logs", "action": "read"}, {"database": "metrics", "action": "write"}] • Full access: [{"database": "", "action": "read"}, {"database": "", "action": "write"}]

Inputs: token_id (required), description, permissions.

create_admin_tokenA

Create a new InfluxDB named admin token with full administrative permissions (Core/Enterprise only). Named admin tokens can manage databases, users, and resource tokens, but cannot manage other admin tokens.

Inputs: name.

create_databaseB

Create a new database in InfluxDB. Database names must follow InfluxDB naming rules: alphanumeric characters, dashes (-), underscores (_), and forward slashes (/) are allowed. Must start with a letter or number. Maximum 64 characters. For Cloud Dedicated, optional configuration parameters can be specified.

Inputs: name (required), maxTables, retentionPeriod, maxColumnsPerTable.

create_resource_tokenA

Create a new InfluxDB resource token with specific database permissions (Core/Enterprise only). Example: databases=["mydb", "testdb"], actions=["read", "write"]

Inputs: actions (required), databases (required), description (required), expiry_secs.

delete_databaseA

Delete a database from InfluxDB. Use the exact database name as returned by the list_databases tool.

Inputs: name (required).

delete_tokenB

Delete an InfluxDB token by name (Core/Enterprise only).

Inputs: token_name (required).

execute_queryB

Execute a SQL query against an InfluxDB database (all versions). Returns results in the specified format (defaults to JSON).

Large Dataset Warning: InfluxDB might contain massive time-series data. Always use COUNT(*) first to check size, then LIMIT/OFFSET for large results (>1000 rows).

Cloud Dedicated (v3) Requirements:

  • GROUP BY: Include all group columns in SELECT (e.g., SELECT place, COUNT(*) ... GROUP BY place)

  • Aggregations: Cast and alias COUNT (e.g., CAST(COUNT(*) AS DOUBLE) AS count)

Inputs: query (required), database (required), format.

get_helpA

Get help and troubleshooting guidance for InfluxDB operations. Supports specific categories or keyword search.

Inputs: no named parameters.

get_measurementsA

Get a list of all measurements (tables) in a database (all versions). Uses the InfluxDB information_schema.columns to discover tables.

Inputs: database (required).

get_measurement_schemaB

Get the schema (column information) for a specific measurement/table (all versions). Shows column names, types, and categories (time/tag/field).

Inputs: database (required), measurement (required).

health_checkA

Check current connection status to the InfluxDB instance. Returns connection status, configuration, and available endpoint results. Health assessment is flexible - if any check passes (client initialization, /health endpoint, or /ping), the instance is considered healthy. Available checks depend on the InfluxDB product type and token configuration.

Inputs: no named parameters.

list_admin_tokensA

List all admin tokens (operator and named admin tokens) with optional filtering by token name (Core/Enterprise only). Named admin tokens have full administrative access including resource token management.

Inputs: tokenName.

list_databasesA

List all databases in the InfluxDB instance (all versions). Returns database names, count, and status information.

Inputs: no named parameters.

list_resource_tokensA

List all resource tokens with optional filtering by database name and/or token name, and ordering (Core/Enterprise only).

Inputs: orderBy, tokenName, databaseName, orderDirection.

regenerate_operator_tokenA

Regenerate the InfluxDB operator token (Core/Enterprise only). Returns the new token value. ⚠️ This action invalidates current operator token and is irreversible. Receive the explicit user confirmation before proceeding.

Inputs: no named parameters.

update_databaseA

Update database configuration for InfluxDB Cloud Dedicated clusters only. Allows modification of maxTables, maxColumnsPerTable, and retentionPeriod settings. Not available for Core/Enterprise installations.

Inputs: name (required), maxTables, retentionPeriod, maxColumnsPerTable.

write_line_protocolB

Write data to InfluxDB using line protocol format (all versions). Supports single records or batches.

Line Protocol Syntax: measurement,tag1=value1,tag2=value2 field1=value1,field2=value2 timestamp

Components:

  • measurement: table/measurement name (required)

  • tags: indexed metadata (optional) - comma-separated key=value pairs

  • fields: actual data (required) - space-separated from tags, comma-separated key=value pairs

  • timestamp: optional timestamp (precision must be specified in tool parameters)

Field Value Types:

  • Strings: "quoted string"

  • Floats: 123.45

  • Integers: 123i (note the 'i' suffix)

  • Booleans: t or f

Examples: Single record: temperature,location=office,building=main value=23.5,humidity=45i 1640995200 Batch (separate with newlines): temperature,location=office value=23.5 1640995200 humidity,location=office value=45i 1640995201

Important: Always specify correct precision parameter to match your timestamp format. Use any precision if writing data with no timestamp. Escaping required for special characters in tags/fields.

Inputs: data (required), database (required), precision (required), noSync, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools are clearly separated by resource and action, especially database, query, measurement, and write tools. Token-management tools overlap conceptually, but descriptions distinguish Core/Enterprise admin/resource tokens from Cloud-Dedicated database tokens. A few names, such as delete_token versus cloud_delete_database_token, could still cause hesitation.

    Naming Consistency4/5

    The set uses snake_case consistently and mostly follows a verb_noun pattern. The main deviation is the cloud_ prefix on Cloud-Dedicated token tools, while Core/Enterprise token tools lack a product prefix. health_check and get_help also differ slightly but remain readable.

    Tool Count4/5

    At 21 tools, the server is on the heavy side, but the scope spans multiple InfluxDB product variants and token types. Each tool broadly earns its place, though the token surface is large enough to feel somewhat sprawling.

    Completeness4/5

    The surface covers database lifecycle, querying, measurements, schema inspection, line-protocol writes, health, help, and extensive token management. Minor gaps exist, such as no explicit database-details tool and limited non-token administrative operations, but core workflows are well covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      A Model Context Protocol server that provides Claude with access to InfluxDB time-series database instances, enabling data writing, querying, and management of organizations and buckets through natural language.
      4
      175 npm
      50
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      InfluxDB-v1-MCP is a powerful Model Context Protocol (MCP) interface specifically designed for InfluxDB v1.x, enabling AI assistants to intelligently manage and query time-series databases.
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Apache Flink clusters via the SQL Gateway, allowing query execution, session management, and job control through MCP tools.
      8
      Apache 2.0