
InfluxDB 3
io.github.influxdatav1.4.2Updated Oct 8, 2026
Official InfluxDB 3 MCP server: query, write and manage Core, Enterprise and Cloud databases.
Overview
Lets an assistant query, write, and administer InfluxDB 3 Core, Enterprise, and Cloud time-series databases through MCP tools.
- What it does
- Provides tools, resources, and prompts for InfluxDB 3. Read-only tools include query_sql, query_influxql, list_databases, list_tables, describe_table, get_measurements, get_measurement_schema, investigate_database, and health_check. Write and administration tools include write_line_protocol, create_database, update_database, delete_database, and token management tools for Core, Enterprise, and Cloud Dedicated or Clustered. Resources expose configuration, status, database lists, and custom context files.
- When to use it
- Use it when an assistant should explore or query InfluxDB 3 time-series data, troubleshoot InfluxQL or SQL queries, or manage databases and tokens. The read-only profile suits analysts and operators who only need discovery and queries.
- Requirements
- Runs locally over stdio via npm (Node.js v20.11+ and npm v9+), npx, or Docker. Needs an InfluxDB 3 instance plus environment variables: INFLUX_DB_PRODUCT_TYPE, INFLUX_DB_INSTANCE_URL or INFLUX_DB_CLUSTER_ID, and INFLUX_DB_TOKEN or INFLUX_DB_MANAGEMENT_TOKEN; INFLUX_DB_ACCOUNT_ID for Cloud Dedicated. Network access to the instance is required.
Installation
In SourceWeft
- Open InfluxDB 3 in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
InfluxDB 3 MCP Server
Model Context Protocol (MCP) server for InfluxDB 3 integration. Provides tools, resources, and prompts for interacting with InfluxDB 3 Core and Enterprise, plus InfluxDB Cloud Dedicated, InfluxDB Clustered, and InfluxDB Cloud Serverless via MCP clients.
Prerequisites
- InfluxDB 3 Instance: URL and token (Core/Enterprise/Cloud Serverless) or Cluster ID and tokens (Cloud Dedicated/Clustered)
- Node.js: v20.11 or newer (for npm/npx usage)
- npm: v9 or newer (for npm/npx usage)
- Docker: (for Docker-based setup)
Read-only Agent Workflows
Set INFLUX_MCP_TOOL_PROFILE=readonly when you want an MCP client to explore
and query InfluxDB 3 data without exposing write, admin, token-management, or
host-level tools. In Enterprise deployments that use preview user auth, the
same read-only flow works when the configured bearer credential is a JWT instead
of an apiv3_ token.
Analyst explores an unfamiliar database
An analyst can connect an MCP client such as Claude Desktop, Cursor, Codex, or another agent harness and ask a question like:
With the read-only profile, the agent can:
- Call
list_databasesto see accessible databases. - Call
list_tablesanddescribe_tableto discover measurements and columns. - Treat uncertain tag and field categories as
unknown. - Build a bounded SQL query with
db,q, and optionalparams. - Call
query_sqlwith structured JSON output. - Return the result, row count, truncation status, warnings, and correlation metadata.
The user gets a grounded answer and a reusable query while the agent explores and queries data without access to mutation or administration tools.
Operator investigates an InfluxQL dashboard query
An operator can troubleshoot an existing InfluxQL dashboard panel and ask:
With the read-only profile, the agent can:
- Keep the user's query in InfluxQL and call
query_influxql. - Use
SHOWqueries and schema discovery to verify the measurement and referenced columns. - Sample recent rows with bounded reads to distinguish missing data from a broken query.
- Reject unsafe follow-up attempts, such as
SELECT INTOor destructive statements. - Return
request_id,query_id, andquery_id_sourceso the operator can correlate the MCP result withsystem.queries.idwhen query history is available. - Emit structured logs to stderr for stdio transports so stdout remains reserved for MCP protocol messages.
The user gets a practical diagnosis, such as missing data, renamed schema, a wrong time predicate, or a query failure. The investigation is traceable without logging full query text by default.
Available Tools
Available Resources
Available Prompts
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:
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:
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):
Option 2: Management Token Only (Database management only):
Option 3: Both Tokens (Full functionality):
For Clustered InfluxDB:
You must provide INFLUX_DB_PRODUCT_TYPE=clustered and INFLUX_DB_INSTANCE_URL, plus one of these token combinations:
Option 1: Database Token Only (Query/Write operations only):
Option 2: Management Token Only (Database management only):
Option 3: Both Tokens (Full functionality):
See corresponding env.<instancetype>.example for examples and detailed info.
Optional MCP tool profile and telemetry
Use INFLUX_MCP_TOOL_PROFILE=readonly to expose only read-only tools. If
unset, the server uses the full operator tool profile.
Tool-call telemetry is enabled by default and writes structured JSON lines to
stderr, which keeps stdout reserved for MCP stdio protocol messages. To
disable telemetry:
To write telemetry to a file, configure the file backend:
The telemetry log includes tool name, request ID, query ID, duration, database,
row count, truncation state, success state, and error code. It does not log API
tokens, request headers, tool arguments, or query text. Sample harness profiles
live in harness-profiles/; for approval settings and repeatable E2E prompts,
see AGENT_E2E_TESTS.md.
2. Integration with MCP Clients
A. Local (npm install & run)
- Install dependencies:
- Build the server:
- Configure your MCP client to use the built server. Example (see
example-local.mcp.json):
B. Local (npx, no install/build required)
- Run directly with npx (after publishing to npm, won't work yet):
C. Docker
Before running the Docker integration, you must build the Docker image:
a) Docker with remote InfluxDB instance (see example-docker.mcp.json):
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:
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-clustered.mcp.json- Clustered with all variablesexample-cloud-serverless.mcp.json- Cloud Serverless configuration
- See the
env.example,env.cloud-dedicated.example,env.clustered.example, andenv.cloud-serverless.examplefiles for environment variable templates. - See
AGENT_E2E_TESTS.mdfor MCP harness tips, read-only profile runs, and telemetry correlation checks.
Run Cloud Serverless integration tests
The Cloud Serverless test command accepts Claire's INFLUXDB3_CLOUD_* variables
and maps them to the MCP server's runtime variables.
The command sets INFLUX_TEST_ENABLED=true and INFLUX_DB_PRODUCT_TYPE=cloud-serverless.
For local tests with 1Password, store only op:// references in
~/.config/claire/cloud-serverless.env:
Run the live tests through 1Password so the token exists only in the test process environment:
You can instead copy env.cloud-serverless.example to the ignored
.env.cloud-serverless.local file and set the MCP runtime variables there.
Then run npm run test:integration:cloud-serverless directly.
To use another plaintext credentials file, set INFLUX_TEST_ENV_FILE:
GitHub Actions runs the same command with the existing URL and token secrets
from the cloud-serverless environment. The workflow selects the
mcp-ci-tests bucket explicitly.
Database Retention Policy Examples
Core/Enterprise - Set 90-day Retention
Cloud Dedicated - Update Multiple Settings
Common Retention Periods
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.
Write errors
write_line_protocol surfaces InfluxDB's own error text, not a generic
message. If InfluxDB rejects a write — a duplicate tag key, an
unauthenticated token, a payload over the size limit — the tool error
includes the specific reason, for example:
A 503 reaching this server is phrased as retryable
(Service temporarily unavailable, retry the write: ...) — safe to retry
the write. Any other status is not.
InfluxDB 3.11 compatibility
Verified against InfluxDB 3.11.5 Core and Enterprise, including a
multi-node Enterprise cluster). Core and Enterprise write through
POST /api/v3/write_lp, which 3.11's write-availability changes for the
legacy /api/v2/write endpoint do not affect; only clustered calls
/api/v2/write. Query and schema-discovery tools behave the same whether
the target database is on Parquet (Core, or Enterprise before an upgrade)
or PachaTree (Enterprise 3.11+ by default, or after
--upgrade-pacha-tree) — new system.pt_* tables are excluded from
get_measurements/get_measurement_schema results by the same
table_schema = 'iox' filter that already excludes other system tables.
Core and Enterprise create named admin tokens through
POST /api/v3/configure/token/named_admin.
Named admin tokens accept an optional expiration in seconds.
Only Enterprise supports resource tokens, so the MCP server doesn't advertise
resource-token tools for Core connections.
Publishing to the MCP Registry
Stable GitHub releases publish the npm package first, then register
io.github.influxdata/influxdb3-mcp-server in the
official MCP Registry.
The registry stores metadata; clients install the server from npm.
GitHub OIDC authenticates the release job using id-token: write, so no
additional registry secret is needed. Releases marked as prereleases or with
- in their tag skip registry publishing.
Before tagging a release, update package.json, src/config.ts, the latest
CHANGELOG.md entry, and both version fields in server.json together.
Keep package.json's mcpName equal to server.json's name. Check locally:
The installer pins and verifies the Linux amd64 publisher used in CI. The
validate command contacts the registry and checks metadata without publishing.
CI runs these checks, and the npm release job also checks the versions and tag.
The first registry release must use a freshly published npm version containing
mcpName; an existing npm version cannot be updated to add it.
After publishing, verify the release at each destination:
- npm: The exact package version must exist and include the expected
mcpName. - Docker Hub: The image tagged with the release version must be available.
- MCP Registry: The exact version endpoint must return the expected server name and version. The registry release job automates this check.
From the release checkout, verify npm and the registry manually:
With valid database environment variables configured, also smoke-test the exact published npm version using MCP Inspector:
Metadata validation checks the registry description; the smoke test checks that the published package initializes and advertises tools. Keep the release-note verification checklist unchecked until the corresponding checks pass.
If registry publishing fails after npm succeeds, rerun only the failed registry job; rerunning the successful npm job would try to publish an existing version.
License
Source: README.md at commit ba932f7
Tools
0Version history
1- v1.4.2LatestOct 8, 2026


