InfluxDB MCP Server
Provides tools for interacting with InfluxDB v3 (Core/Enterprise/Cloud Dedicated), including database management, querying with SQL, writing data using line protocol, managing measurements and schemas, and token administration.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@InfluxDB MCP Server show me the measurements in the 'iot_sensors' database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 and troubleshooting guidance for InfluxDB operations | All versions |
| Write data using InfluxDB line protocol | All versions |
| Create a new database (with Cloud Dedicated config options) | All versions |
| Update database configuration (maxTables, retention, etc.) | Cloud Dedicated only |
| Delete a database by name (irreversible) | All versions |
| Run a SQL query against a database (supports multiple formats) | All versions |
| List all measurements (tables) in a database | All versions |
| Get schema (columns/types) for a measurement/table | All versions |
| Create a new admin token (full permissions) | Core/Enterprise only |
| List all admin tokens (with optional filtering) | Core/Enterprise only |
| Create a resource token for specific DBs and permissions | Core/Enterprise only |
| List all resource tokens (with filtering and ordering) | Core/Enterprise only |
| Delete a token by name | Core/Enterprise only |
| Regenerate the operator token (dangerous/irreversible) | Core/Enterprise only |
| List all database tokens for Cloud-Dedicated cluster | Cloud Dedicated only |
| Get details of a specific database token by ID | Cloud Dedicated only |
| Create a new database token for Cloud-Dedicated cluster | Cloud Dedicated only |
| Update an existing database token | Cloud Dedicated only |
| Delete a database token from Cloud-Dedicated cluster | Cloud Dedicated only |
| List all available databases in the instance | All versions |
| Check InfluxDB connection and health status | All versions |
Available Resources
Resource Name | Description |
| Read-only access to InfluxDB configuration |
| Real-time connection and health status |
| 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_TOKENINFLUX_DB_PRODUCT_TYPE(coreorenterprise)
Example .env:
INFLUX_DB_INSTANCE_URL=http://localhost:8181/
INFLUX_DB_TOKEN=your_influxdb_token_here
INFLUX_DB_PRODUCT_TYPE=coreFor 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_hereOption 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_hereOption 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_hereSee env.cloud-dedicated.example for detailed configuration options and comments.
2. Integration with MCP Clients
A. Local (npm install & run)
Install dependencies:
npm installBuild the server:
npm run buildConfigure 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)
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:builda) 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.jsonfiles for ready-to-use configuration templates:example-local.mcp.json- Local development setupexample-npx.mcp.json- NPX-based setupexample-docker.mcp.json- Docker-based setupexample-cloud-dedicated.mcp.json- Cloud Dedicated with all variables
See the
env.exampleandenv.cloud-dedicated.examplefiles for environment variable templates.
Support & Troubleshooting
Use the
get_helptool 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
.envand MCP config files.
License
Available Tools
21 toolscloud_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
Scored across 21 tools
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.
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.
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.
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
Related MCP Connectors
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Access New Relic observability data through MCP - query metrics, logs, traces, entities, and more
MCP server for interacting with the Supabase platform
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Related MCP Servers
- AlicenseAqualityBmaintenanceA 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.4175 npm50MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interactions with InfluxDB's open-source time-series database API, allowing data querying, management, and operations through natural language.-
- AlicenseNot gradedqualityDmaintenanceInfluxDB-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
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Apache Flink clusters via the SQL Gateway, allowing query execution, session management, and job control through MCP tools.8Apache 2.0