InfluxDB MCP Server
Servidor MCP de InfluxDB
Un servidor de Protocolo de Contexto de Modelo (MCP) que expone el acceso a una instancia de InfluxDB mediante la API OSS de InfluxDB v2. Desarrollado principalmente con Claude Code.
Características
Este servidor MCP proporciona:
Recursos : Acceso a datos de organización, grupo y medición
Herramientas : escribir datos, ejecutar consultas y administrar objetos de base de datos
Indicaciones : Plantillas para consultas Flux comunes y formato de protocolo de línea
Related MCP server: InfluxDB OSS API MCP Server
Recursos
El servidor expone los siguientes recursos:
Lista de organizaciones :
influxdb://orgsMuestra todas las organizaciones en la instancia de InfluxDB
Lista de deseos :
influxdb://bucketsMuestra todos los depósitos con sus metadatos
Medidas del cubo :
influxdb://bucket/{bucketName}/measurementsEnumera todas las mediciones dentro de un grupo específico
Datos de consulta :
influxdb://query/{orgName}/{fluxQuery}Ejecuta una consulta Flux y devuelve resultados como un recurso
Herramientas
El servidor proporciona estas herramientas:
write-data: escribe datos de series temporales en formato de protocolo de líneaParámetros: organización, contenedor, datos, precisión (opcional)
query-data: Ejecutar consultas FluxParámetros: org, consulta
create-bucket: Crea un nuevo bucketParámetros: nombre, orgID, retainPeriodSeconds (opcional)
create-org: Crea una nueva organizaciónParámetros: nombre, descripción (opcional)
Indicaciones
El servidor ofrece estas plantillas de indicaciones:
flux-query-examples: Ejemplos comunes de consultas Fluxline-protocol-guide: Guía del formato del protocolo de línea de InfluxDB
Configuración
El servidor requiere estas variables de entorno:
INFLUXDB_TOKEN(obligatorio): token de autenticación para la API de InfluxDBINFLUXDB_URL(opcional): URL de la instancia de InfluxDB (el valor predeterminado eshttp://localhost:8086)INFLUXDB_ORG(opcional): Nombre de la organización predeterminado para ciertas operaciones
Instalación
Instalación mediante herrería
Para instalar InfluxDB MCP Server para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install @idoru/influxdb-mcp-server --client claudeOpción 1: Ejecutar con npx (recomendado)
# Run directly with npx
INFLUXDB_TOKEN=your_token npx influxdb-mcp-serverOpción 2: Instalar globalmente
# Install globally
npm install -g influxdb-mcp-server
# Run the server
INFLUXDB_TOKEN=your_token influxdb-mcp-serverOpción 3: Desde la fuente
# Clone the repository
git clone https://github.com/idoru/influxdb-mcp-server.git
cd influxdb-mcp-server
# Install dependencies
npm install
# Run the server
INFLUXDB_TOKEN=your_token npm startIntegración con Claude para escritorio
Agregue el servidor a su claude_desktop_config.json :
Usando npx (recomendado)
{
"mcpServers": {
"influxdb": {
"command": "npx",
"args": ["influxdb-mcp-server"],
"env": {
"INFLUXDB_TOKEN": "your_token",
"INFLUXDB_URL": "http://localhost:8086",
"INFLUXDB_ORG": "your_org"
}
}
}
}Si se instala localmente
{
"mcpServers": {
"influxdb": {
"command": "node",
"args": ["/path/to/influxdb-mcp-server/src/index.js"],
"env": {
"INFLUXDB_TOKEN": "your_token",
"INFLUXDB_URL": "http://localhost:8086",
"INFLUXDB_ORG": "your_org"
}
}
}
}Estructura del código
El código del servidor está organizado en una estructura modular:
src/index.js- Punto de entrada del servidor principalconfig/- Archivos relacionados con la configuraciónenv.js- Manejo de variables de entorno
utils/- Funciones de utilidadinfluxClient.js- Cliente de la API de InfluxDBloggerConfig.js- Configuración del registrador de la consola
handlers/- Manipuladores de recursos y herramientasorganizationsHandler.js- Listado de organizacionesbucketsHandler.js- Listado de bucketsmeasurementsHandler.js- Listado de medicionesqueryHandler.js- Ejecución de consultaswriteDataTool.js- Herramienta de escritura de datosqueryDataTool.js- Herramienta de consultacreateBucketTool.js- Herramienta de creación de bucketscreateOrgTool.js- Herramienta de creación de organizaciones
prompts/- Plantillas de indicacionesfluxQueryExamplesPrompt.js- Ejemplos de consultas FluxlineProtocolGuidePrompt.js- Guía del protocolo de línea
Esta estructura permite un mejor mantenimiento, pruebas más sencillas y una separación más clara de las preocupaciones.
Pruebas
El repositorio incluye pruebas de integración integrales que:
Ponga en marcha un contenedor Docker con InfluxDB
Rellénelo con datos de muestra
Pruebe todas las funciones del servidor MCP
Para ejecutar las pruebas:
npm testLicencia
Instituto Tecnológico de Massachusetts (MIT)
Available Tools
4 toolscreate-bucketB
Provision a new bucket under an organization so that subsequent write-data calls have a destination.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Friendly bucket name. Follow InfluxDB naming rules (alphanumeric, dashes, underscores). | |
| orgID | Yes | Organization ID (UUID) that will own the bucket. Retrieve it from the organizations resource or create-org output. | |
| retentionPeriodSeconds | No | Optional retention duration expressed in seconds. Omit for infinite retention. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral transparency. It does not disclose important traits like permissions required, uniqueness constraints, idempotency, error conditions, or side effects. This is insufficient for an agent to safely invoke the tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, concise and front-loaded. It conveys the essential purpose efficiently, though it could include more detail without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the three parameters and no output schema, the description lacks essential context such as uniqueness constraints for bucket names, validity of orgID, potential errors, and return values. This leaves gaps for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds minor context by linking the bucket to subsequent write-data calls, but does not significantly enhance understanding beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool provisions a new bucket under an organization, with a specific verb and resource. It also ties to sibling tools by explaining that this bucket serves as a destination for write-data calls, distinguishing it from create-org, query-data, and write-data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool should be used before write-data to create a destination, but does not explicitly state when not to use it or provide alternatives. Usage guidance is present but minimal.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create-orgA
Create a brand-new organization to isolate users or projects before generating buckets and tokens.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name for the organization as it should appear in InfluxDB Cloud/OSS. | |
| description | No | Optional free-form description that helps humans understand why the org exists. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It only states the creation action but does not disclose any side effects, required permissions, or behavioral constraints, leaving significant gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the action and purpose. No extraneous words; every part earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple creation tool with two parameters and no output schema, the description provides the essential purpose but lacks details on return values or post-creation behavior, making it adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (both name and description are documented in the schema). The tool description adds no extra meaning beyond what the schema already provides, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (create), the resource (organization), and the purpose (isolate users/projects as a prerequisite for buckets/tokens). It distinguishes from siblings like create-bucket and query-data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'before generating buckets and tokens' effectively indicates when to use this tool as a prerequisite step. While it lacks explicit exclusions or comparisons, the context is sufficient for an AI agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query-dataA
Execute a Flux query inside an organization to inspect measurement schemas, run aggregations, or validate recently written data.
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Organization whose buckets the query should target (exact name, not ID). | |
| query | Yes | Flux query text. Multi-line strings are supported; results are returned as annotated CSV for easy parsing. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description must convey behavior. It indicates a read operation (query) but does not mention permissions, rate limits, or output format (though schema mentions CSV). The description adds moderate behavioral context but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, reasonably concise sentence that conveys the core purpose. It could be slightly tighter, but no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple query tool with two parameters and no output schema, the description covers purpose and usage scenarios. It omits potential guidance on query performance, timeouts, or security, making it adequate but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for both parameters. The description adds no new parameter-specific meaning beyond the use cases. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the verb 'execute' and the resource 'Flux query inside an organization', with specific example use cases (inspect schemas, run aggregations, validate data). It effectively distinguishes from sibling tools that create or write.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context by listing example scenarios (inspect schemas, run aggregations, validate data), which implies when to use. However, it does not explicitly contrast with siblings or state when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write-dataA
Stream newline-delimited line protocol records into a bucket. Use this after composing measurements so the LLM can insert real telemetry, optionally controlling timestamp precision.
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Human-readable organization name that owns the destination bucket (the same value returned by the orgs resource). | |
| bucket | Yes | Bucket name to receive the points. Make sure it already exists or call create-bucket first. | |
| data | Yes | Payload containing one or more line protocol lines (measurements, tags, fields, timestamps) separated by newlines. | |
| precision | No | Optional timestamp precision. Provide it only when the line protocol omits unit suffix context; defaults to nanoseconds. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It only mentions streaming and insertion, but does not explain whether the operation is append-only or destructive, what happens to existing data, required permissions, rate limits, or error conditions. For a write tool, these omissions are significant.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two concise sentences. It immediately states the core action and then adds the use case and optional control. No redundant or unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description should cover more contextual details. It does not describe the return value (e.g., success indicator, count of points written), error handling, or prerequisites like bucket existence (though hinted in schema). The tool's complexity is moderate, but the description omits essential information for an agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All four parameters have descriptions in the input schema (100% coverage). The tool description adds minimal new meaning beyond the schema, only noting that precision is optional and controls timestamp precision. The schema already provides adequate descriptions for org, bucket, data, and precision. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: streaming line protocol records into a bucket. It specifies the format (newline-delimited) and the use case (after composing measurements for telemetry insertion). It distinguishes well from sibling tools like create-bucket (bucket creation) and query-data (reading data).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context: 'Use this after composing measurements so the LLM can insert real telemetry'. This implies the tool is for writing data after preparation. It does not explicitly state when not to use it or mention alternatives, but the sibling tools are clearly different in purpose. The schema parameter description for 'bucket' hints at a prerequisite (bucket must exist), but the main description lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.2.0- Changed
create-bucket3 fields changed- changed
Input schema / properties / name / descriptionPrevious value: -"The bucket name"New value: +"Friendly bucket name. Follow InfluxDB naming rules (alphanumeric, dashes, underscores)." - changed
Input schema / properties / orgID / descriptionPrevious value: -"The organization ID"New value: +"Organization ID (UUID) that will own the bucket. Retrieve it from the organizations resource or create-org output." - changed
Input schema / properties / retentionPeriodSeconds / descriptionPrevious value: -"Retention period in seconds (optional)"New value: +"Optional retention duration expressed in seconds. Omit for infinite retention."
- Changed
create-org2 fields changed- changed
Input schema / properties / description / descriptionPrevious value: -"Organization description (optional)"New value: +"Optional free-form description that helps humans understand why the org exists." - changed
Input schema / properties / name / descriptionPrevious value: -"The organization name"New value: +"Display name for the organization as it should appear in InfluxDB Cloud/OSS."
- Changed
query-data2 fields changed- changed
Input schema / properties / org / descriptionPrevious value: -"The organization name"New value: +"Organization whose buckets the query should target (exact name, not ID)." - changed
Input schema / properties / query / descriptionPrevious value: -"Flux query string"New value: +"Flux query text. Multi-line strings are supported; results are returned as annotated CSV for easy parsing."
- Changed
write-data4 fields changed- changed
Input schema / properties / bucket / descriptionPrevious value: -"The bucket name"New value: +"Bucket name to receive the points. Make sure it already exists or call create-bucket first." - changed
Input schema / properties / data / descriptionPrevious value: -"Data in InfluxDB line protocol format"New value: +"Payload containing one or more line protocol lines (measurements, tags, fields, timestamps) separated by newlines." - changed
Input schema / properties / org / descriptionPrevious value: -"The organization name"New value: +"Human-readable organization name that owns the destination bucket (the same value returned by the orgs resource)." - changed
Input schema / properties / precision / descriptionPrevious value: -"Timestamp precision (ns, us, ms, s)"New value: +"Optional timestamp precision. Provide it only when the line protocol omits unit suffix context; defaults to nanoseconds."
4 tool updates
v1.0.0- First observed
create-bucket - First observed
create-org - First observed
query-data - First observed
write-data
TDQS
Scored across 4 tools
Each tool targets a distinct operation: organization creation, bucket creation, data writing, and querying. There is no overlap in functionality.
All tool names follow a consistent verb-noun pattern with hyphens (create-bucket, create-org, query-data, write-data).
With 4 tools, the server is well-scoped for basic InfluxDB operations, though it is on the smaller side.
The set lacks read, update, and delete operations for organizations and buckets, which are common needs when managing an InfluxDB instance. This could lead to agent failures.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
A Model Context Protocol server for Wix AI tools
The Telnyx MCP server is an official implementation of the Model Context Protocol that enables AI clients (like Claude Desktop, Cursor, and OpenAI Agents) to interact with Telnyx's telephony, messaging, and AI assistant APIs. It provides comprehensive capabilities including making and managing phone calls, sending SMS/MMS messages, purchasing and configuring phone numbers, creating AI assistants with custom instructions, managing cloud storage buckets, scraping and embedding website content, and handling integration secrets. The server exists as both a local implementation and a remotely hosted version, allowing developers to integrate real-world communication infrastructure directly into AI applications.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides secure, read-only access to time-series data stored in InfluxDB 1.8 via JWT authentication.4-
- 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.-
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing tools for DB queries, API calls, file I/O, and text transformations, enabling AI agents like Claude to perform real-world actions.10MIT
- 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