InfluxDB MCP Server
Model Context Protocol server for seamless InfluxDB 3 integration and management.
Key Features
Use Cases
README
InfluxDB MCP Server
Model Context Protocol (MCP) server for InfluxDB 3 integration. Provides tools, resources, and prompts for interacting with InfluxDB v3 (Core/Enterprise/Cloud Dedicated/Cloud Serverless) via MCP clients.
Prerequisites
- InfluxDB 3 Instance: URL and token (Core/Enterprise/Cloud Serverless) 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 |
|---|---|---|
load_database_context |
Load optional custom database context and documentation | All versions |
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-specific config options) | All versions |
update_database |
Update database configuration (retention, etc.) | Cloud Dedicated/Serverless |
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 |
context-file |
Custom user-provided database context and documentation |
Available Prompts
| Prompt Name | Description |
|---|---|
list-databases |
Generate a prompt to list all available databases |
check-health |
Generate a prompt to check InfluxDB health status |
load-context |
Load custom database context and documentation |
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=core
For Cloud Serverless InfluxDB:
You must provide:
INFLUX_DB_INSTANCE_URL(e.g.https://us-east-1-1.aws.cloud2.influxdata.com)INFLUX_DB_TOKENINFLUX_DB_PRODUCT_TYPE(cloud-serverless)
Example .env:
INFLUX_DB_INSTANCE_URL=https://us-east-1-1.aws.cloud2.influxdata.com
INFLUX_DB_TOKEN=your_influxdb_token_here
INFLUX_DB_PRODUCT_TYPE=cloud-serverless
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.
See env.cloud-serverless.example for Cloud Serverless configuration template.
2. Integration with MCP Clients
A. Local (npm install & run)
- Install dependencies:
bash
npm install - Build the server:
bash
npm run build - Configure your MCP client to use the built server. Example (see
example-local.mcp.json):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):
json
{ "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.
- Custom Context: Edit the provided
context/database-context.mdfile or remove it and create your own context file with "context" in the name (.json,.txt,.md) to provide database documentation. Use theload_database_contexttool orload-contextprompt to access it. - 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 variablesexample-cloud-serverless.mcp.json- Cloud Serverless configuration
- See the
env.example,env.cloud-dedicated.example, andenv.cloud-serverless.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
Star History
Repository Owner
Organization
Repository Details
Programming Languages
Tags
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
Insforge MCP Server
A Model Context Protocol server for seamless integration with Insforge and compatible AI clients.
Insforge MCP Server implements the Model Context Protocol (MCP), enabling smooth integration with various AI tools and clients. It allows users to configure and manage connections to the Insforge platform, providing automated and manual installation methods. The server supports multiple AI clients such as Claude Code, Cursor, Windsurf, Cline, Roo Code, and Trae via standardized context management. Documentation and configuration guidelines are available for further customization and usage.
- ⭐ 3
- MCP
- InsForge/insforge-mcp
YDB MCP
MCP server for AI-powered natural language database operations on YDB.
YDB MCP acts as a Model Context Protocol server enabling YDB databases to be accessed via any LLM supporting MCP. It allows AI-driven and natural language interaction with YDB instances by bridging database operations with language model interfaces. Flexible deployment through uvx, pipx, or pip is supported, along with multiple authentication methods. The integration empowers users to manage YDB databases conversationally through standardized protocols.
- ⭐ 24
- MCP
- ydb-platform/ydb-mcp
MongoDB MCP Server
A Model Context Protocol server for enabling LLM interaction with MongoDB databases.
MongoDB MCP Server empowers language models to interface directly with MongoDB databases using the Model Context Protocol (MCP). It enables natural language querying and management of collections, documents, and indexes. Users can inspect database schemas, execute document operations, and manage indexes seamlessly. The tool integrates with clients like Claude Desktop for conversational database management.
- ⭐ 172
- MCP
- QuantGeekDev/mongo-mcp
Firefly MCP Server
Seamless resource discovery and codification for Cloud and SaaS with Model Context Protocol integration.
Firefly MCP Server is a TypeScript-based server implementing the Model Context Protocol to enable integration with the Firefly platform for discovering and managing resources across Cloud and SaaS accounts. It supports secure authentication, resource codification into infrastructure as code, and easy integration with tools such as Claude and Cursor. The server can be configured via environment variables or command line and communicates using standardized MCP interfaces. Its features facilitate automation and codification workflows for cloud resource management.
- ⭐ 15
- MCP
- gofireflyio/firefly-mcp
Supabase MCP Server
Connect Supabase projects to AI assistants using the Model Context Protocol.
Supabase MCP Server enables direct, secure integration between Supabase projects and AI assistants such as Cursor, Claude, and Windsurf. Leveraging the Model Context Protocol, it provides standardized endpoints for external LLMs to perform tasks like managing tables, fetching configurations, and querying data on Supabase. The server supports OAuth 2.1 Dynamic Client Registration and offers easy setup with feature groups and popular client installers for local, cloud, and self-hosted environments.
- ⭐ 2,263
- MCP
- supabase-community/supabase-mcp
Codex MCP Server
An MCP-compatible server delivering enriched blockchain data for AI models.
Codex MCP Server implements the Model Context Protocol to provide enriched blockchain data from Codex. It is compatible with MCP clients such as Claude Desktop and Claude CLI, allowing seamless integration in AI workflows that require blockchain context. Users can run the server locally or via npx, and configure it for various MCP-compatible tools using their Codex API key.
- ⭐ 20
- MCP
- Codex-Data/codex-mcp
Didn't find tool you were looking for?