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 "Install 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 Servershow 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)
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
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.