Model Context Protocol (MCP) server for InfluxDB 3 integration. Provides tools, resources, and prompts for interacting with InfluxDB v3 (Core/Enterprise/Cloud Dedicated/Clustered/Cloud Serverless) via MCP clients. - InfluxDB 3 Instance: URL and token (Core/Enterprise/Cloud Serverless) or Cluster ID and tokens (Cloud Dedicated/Clustered) - Node.js: v18 or newer (for npm/npx usage) - npm: v9 or newe
Add this skill
npx mdskills install influxdata/influxdb3-mcp-serverComprehensive MCP server with 20+ tools for InfluxDB v3, excellent multi-environment setup docs and clear API coverage
1# InfluxDB MCP Server23Model Context Protocol (MCP) server for InfluxDB 3 integration. Provides tools, resources, and prompts for interacting with InfluxDB v3 (Core/Enterprise/Cloud Dedicated/Clustered/Cloud Serverless) via MCP clients.45---67## Prerequisites89- **InfluxDB 3 Instance**: URL and token (Core/Enterprise/Cloud Serverless) or Cluster ID and tokens (Cloud Dedicated/Clustered)10- **Node.js**: v18 or newer (for npm/npx usage)11- **npm**: v9 or newer (for npm/npx usage)12- **Docker**: (for Docker-based setup)1314---1516## Available Tools1718| Tool Name | Description | Availability |19| ----------------------------- | ----------------------------------------------------------------- | ------------------------------------ |20| `load_database_context` | Load optional custom database context and documentation | All versions |21| `get_help` | Get help and troubleshooting guidance for InfluxDB operations | All versions |22| `write_line_protocol` | Write data using InfluxDB line protocol | All versions |23| `create_database` | Create a new database (with cloud-specific config options) | All versions |24| `update_database` | Update database configuration (retention, etc.) | Cloud Dedicated/Clustered/Serverless |25| `delete_database` | Delete a database by name (irreversible) | All versions |26| `execute_query` | Run a SQL query against a database (supports multiple formats) | All versions |27| `get_measurements` | List all measurements (tables) in a database | All versions |28| `get_measurement_schema` | Get schema (columns/types) for a measurement/table | All versions |29| `create_admin_token` | Create a new admin token (full permissions) | Core/Enterprise only |30| `list_admin_tokens` | List all admin tokens (with optional filtering) | Core/Enterprise only |31| `create_resource_token` | Create a resource token for specific DBs and permissions | Core/Enterprise only |32| `list_resource_tokens` | List all resource tokens (with filtering and ordering) | Core/Enterprise only |33| `delete_token` | Delete a token by name | Core/Enterprise only |34| `regenerate_operator_token` | Regenerate the operator token (dangerous/irreversible) | Core/Enterprise only |35| `cloud_list_database_tokens` | List all database tokens for Cloud-Dedicated/Clustered cluster | Cloud Dedicated/Clustered |36| `cloud_get_database_token` | Get details of a specific database token by ID | Cloud Dedicated/Clustered |37| `cloud_create_database_token` | Create a new database token for Cloud-Dedicated/Clustered cluster | Cloud Dedicated/Clustered |38| `cloud_update_database_token` | Update an existing database token | Cloud Dedicated/Clustered |39| `cloud_delete_database_token` | Delete a database token from Cloud-Dedicated/Clustered cluster | Cloud Dedicated/Clustered |40| `list_databases` | List all available databases in the instance | All versions |41| `health_check` | Check InfluxDB connection and health status | All versions |4243---4445## Available Resources4647| Resource Name | Description |48| ------------------ | ------------------------------------------------------- |49| `influx-config` | Read-only access to InfluxDB configuration |50| `influx-status` | Real-time connection and health status |51| `influx-databases` | List of all databases in the instance |52| `context-file` | Custom user-provided database context and documentation |5354---5556## Available Prompts5758| Prompt Name | Description |59| ---------------- | ------------------------------------------------- |60| `list-databases` | Generate a prompt to list all available databases |61| `check-health` | Generate a prompt to check InfluxDB health status |62| `load-context` | Load custom database context and documentation |6364---6566## Setup & Integration Guide6768### 1. Environment Variables6970#### For Core/Enterprise InfluxDB:7172You must provide:7374- `INFLUX_DB_INSTANCE_URL` (e.g. `http://localhost:8181/`)75- `INFLUX_DB_TOKEN`76- `INFLUX_DB_PRODUCT_TYPE` (`core` or `enterprise`)7778Example `.env`:7980```env81INFLUX_DB_INSTANCE_URL=http://localhost:8181/82INFLUX_DB_TOKEN=your_influxdb_token_here83INFLUX_DB_PRODUCT_TYPE=core84```8586#### For Cloud Serverless InfluxDB:8788You must provide:8990- `INFLUX_DB_INSTANCE_URL` (e.g. `https://us-east-1-1.aws.cloud2.influxdata.com`)91- `INFLUX_DB_TOKEN`92- `INFLUX_DB_PRODUCT_TYPE` (`cloud-serverless`)9394Example `.env`:9596```env97INFLUX_DB_INSTANCE_URL=https://us-east-1-1.aws.cloud2.influxdata.com98INFLUX_DB_TOKEN=your_influxdb_token_here99INFLUX_DB_PRODUCT_TYPE=cloud-serverless100```101102#### For Cloud Dedicated InfluxDB:103104You must provide `INFLUX_DB_PRODUCT_TYPE=cloud-dedicated` and `INFLUX_DB_CLUSTER_ID`, plus one of these token combinations:105106**Option 1: Database Token Only** (Query/Write operations only):107108```env109INFLUX_DB_PRODUCT_TYPE=cloud-dedicated110INFLUX_DB_CLUSTER_ID=your_cluster_id_here111INFLUX_DB_TOKEN=your_database_token_here112```113114**Option 2: Management Token Only** (Database management only):115116```env117INFLUX_DB_PRODUCT_TYPE=cloud-dedicated118INFLUX_DB_CLUSTER_ID=your_cluster_id_here119INFLUX_DB_ACCOUNT_ID=your_account_id_here120INFLUX_DB_MANAGEMENT_TOKEN=your_management_token_here121```122123**Option 3: Both Tokens** (Full functionality):124125```env126INFLUX_DB_PRODUCT_TYPE=cloud-dedicated127INFLUX_DB_CLUSTER_ID=your_cluster_id_here128INFLUX_DB_ACCOUNT_ID=your_account_id_here129INFLUX_DB_TOKEN=your_database_token_here130INFLUX_DB_MANAGEMENT_TOKEN=your_management_token_here131```132133#### For Clustered InfluxDB:134135You must provide `INFLUX_DB_PRODUCT_TYPE=clustered` and `INFLUX_DB_INSTANCE_URL`, plus one of these token combinations:136137**Option 1: Database Token Only** (Query/Write operations only):138139```env140INFLUX_DB_PRODUCT_TYPE=clustered141INFLUX_DB_INSTANCE_URL=https://your_cluster_host.com142INFLUX_DB_TOKEN=your_database_token_here143```144145**Option 2: Management Token Only** (Database management only):146147```env148INFLUX_DB_PRODUCT_TYPE=clustered149INFLUX_DB_INSTANCE_URL=https://your_cluster_host.com150INFLUX_DB_MANAGEMENT_TOKEN=your_management_token_here151```152153**Option 3: Both Tokens** (Full functionality):154155```env156INFLUX_DB_PRODUCT_TYPE=clustered157INFLUX_DB_INSTANCE_URL=https://your_cluster_host.com158INFLUX_DB_TOKEN=your_database_token_here159INFLUX_DB_MANAGEMENT_TOKEN=your_management_token_here160```161162See corresponding `env.<instancetype>.example` for examples and detailed info.163164---165166### 2. Integration with MCP Clients167168#### A. Local (npm install & run)1691701. **Install dependencies:**171 ```bash172 npm install173 ```1742. **Build the server:**175 ```bash176 npm run build177 ```1783. **Configure your MCP client** to use the built server. Example (see `example-local.mcp.json`):179 ```json180 {181 "mcpServers": {182 "influxdb": {183 "command": "node",184 "args": ["/path/to/influx-mcp-standalone/build/index.js"],185 "env": {186 "INFLUX_DB_INSTANCE_URL": "http://localhost:8181/",187 "INFLUX_DB_TOKEN": "<YOUR_INFLUXDB_TOKEN>",188 "INFLUX_DB_PRODUCT_TYPE": "core"189 }190 }191 }192 }193 ```194195#### B. Local (npx, no install/build required)1961971. **Run directly with npx** (after publishing to npm, won't work yet):198 ```json199 {200 "mcpServers": {201 "influxdb": {202 "command": "npx",203 "args": ["-y", "@modelcontextprotocol/server-influxdb"],204 "env": {205 "INFLUX_DB_INSTANCE_URL": "http://localhost:8181/",206 "INFLUX_DB_TOKEN": "<YOUR_INFLUXDB_TOKEN>",207 "INFLUX_DB_PRODUCT_TYPE": "core"208 }209 }210 }211 }212 ```213214#### C. Docker215216Before running the Docker integration, you must build the Docker image:217218```bash219# Option 1: Use docker compose (recommended)220docker compose build221# Option 2: Use npm script222npm run docker:build223```224225**a) Docker with remote InfluxDB instance** (see `example-docker.mcp.json`):226227```json228{229 "mcpServers": {230 "influxdb": {231 "command": "docker",232 "args": [233 "run",234 "--rm",235 "-i",236 "-e",237 "INFLUX_DB_INSTANCE_URL",238 "-e",239 "INFLUX_DB_TOKEN",240 "-e",241 "INFLUX_DB_PRODUCT_TYPE",242 "mcp/influxdb"243 ],244 "env": {245 "INFLUX_DB_INSTANCE_URL": "http://remote-influxdb-host:8181/",246 "INFLUX_DB_TOKEN": "<YOUR_INFLUXDB_TOKEN>",247 "INFLUX_DB_PRODUCT_TYPE": "core"248 }249 }250 }251}252```253254**b) Docker with InfluxDB running in Docker on the same machine** (see `example-docker.mcp.json`):255256Use `host.docker.internal` as the InfluxDB URL so the MCP server container can reach the InfluxDB container:257258```json259{260 "mcpServers": {261 "influxdb": {262 "command": "docker",263 "args": [264 "run",265 "--rm",266 "-i",267 "--add-host=host.docker.internal:host-gateway",268 "-e",269 "INFLUX_DB_INSTANCE_URL",270 "-e",271 "INFLUX_DB_TOKEN",272 "-e",273 "INFLUX_DB_PRODUCT_TYPE",274 "influxdb-mcp-server"275 ],276 "env": {277 "INFLUX_DB_INSTANCE_URL": "http://host.docker.internal:8181/",278 "INFLUX_DB_TOKEN": "<YOUR_INFLUXDB_TOKEN>",279 "INFLUX_DB_PRODUCT_TYPE": "enterprise"280 }281 }282 }283}284```285286---287288## Example Usage289290- Use your MCP client to call tools, resources, or prompts as described above.291- **Custom Context**: Edit the provided `context/database-context.md` file or remove it and create your own context file with "context" in the name (`.json`, `.txt`, `.md`) to provide database documentation. Use the `load_database_context` tool or `load-context` prompt to access it.292- See the `example-*.mcp.json` files for ready-to-use configuration templates:293 - `example-local.mcp.json` - Local development setup294 - `example-npx.mcp.json` - NPX-based setup295 - `example-docker.mcp.json` - Docker-based setup296 - `example-cloud-dedicated.mcp.json` - Cloud Dedicated with all variables297 - `example-clustered.mcp.json` - Clustered with all variables298 - `example-cloud-serverless.mcp.json` - Cloud Serverless configuration299- See the `env.example`, `env.cloud-dedicated.example`, `env.clustered.example`, and `env.cloud-serverless.example` files for environment variable templates.300301---302303## Support & Troubleshooting304305- Use the `get_help` tool for built-in help and troubleshooting.306- For connection issues, check your environment variables and InfluxDB instance status.307- For advanced configuration, see the comments in the example `.env` and MCP config files.308309---310311## License312313[MIT](LICENSE)314
Full transparency — inspect the skill content before installing.