InfluxDB MCP Server
InfluxDB MCP-Server
Ein Model Context Protocol (MCP)-Server, der den Zugriff auf eine InfluxDB-Instanz mithilfe der InfluxDB OSS API v2 ermöglicht. Größtenteils mit Claude Code erstellt.
Merkmale
Dieser MCP-Server bietet:
Ressourcen : Zugriff auf Organisations-, Bucket- und Messdaten
Tools : Daten schreiben, Abfragen ausführen und Datenbankobjekte verwalten
Eingabeaufforderungen : Vorlagen für allgemeine Flux-Abfragen und das Line Protocol-Format
Related MCP server: InfluxDB OSS API MCP Server
Ressourcen
Der Server stellt die folgenden Ressourcen bereit:
Liste der Organisationen :
influxdb://orgsZeigt alle Organisationen in der InfluxDB-Instanz an
Buckets-Liste :
influxdb://bucketsZeigt alle Buckets mit ihren Metadaten an
Bucket-Messungen :
influxdb://bucket/{bucketName}/measurementsListet alle Messungen innerhalb eines angegebenen Buckets auf
Abfragedaten :
influxdb://query/{orgName}/{fluxQuery}Führt eine Flux-Abfrage aus und gibt die Ergebnisse als Ressource zurück
Werkzeuge
Der Server bietet folgende Tools:
write-data: Schreibt Zeitreihendaten im ZeilenprotokollformatParameter: Organisation, Bucket, Daten, Präzision (optional)
query-data: Flux-Abfragen ausführenParameter: org, Abfrage
create-bucket: Einen neuen Bucket erstellenParameter: Name, OrgID, retentionPeriodSeconds (optional)
create-org: Eine neue Organisation erstellenParameter: Name, Beschreibung (optional)
Eingabeaufforderungen
Der Server bietet diese Eingabeaufforderungsvorlagen:
flux-query-examples: Allgemeine Flux-Abfragebeispieleline-protocol-guide: Leitfaden zum Zeilenprotokollformat von InfluxDB
Konfiguration
Der Server benötigt diese Umgebungsvariablen:
INFLUXDB_TOKEN(erforderlich): Authentifizierungstoken für die InfluxDB-APIINFLUXDB_URL(optional): URL der InfluxDB-Instanz (standardmäßighttp://localhost:8086)INFLUXDB_ORG(optional): Standard-Organisationsname für bestimmte Vorgänge
Installation
Installation über Smithery
So installieren Sie den InfluxDB MCP-Server für Claude Desktop automatisch über Smithery :
npx -y @smithery/cli install @idoru/influxdb-mcp-server --client claudeOption 1: Mit npx ausführen (empfohlen)
# Run directly with npx
INFLUXDB_TOKEN=your_token npx influxdb-mcp-serverOption 2: Global installieren
# Install globally
npm install -g influxdb-mcp-server
# Run the server
INFLUXDB_TOKEN=your_token influxdb-mcp-serverOption 3: Aus der Quelle
# 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 startIntegration mit Claude für Desktop
Fügen Sie den Server zu Ihrer claude_desktop_config.json hinzu:
Verwendung von npx (empfohlen)
{
"mcpServers": {
"influxdb": {
"command": "npx",
"args": ["influxdb-mcp-server"],
"env": {
"INFLUXDB_TOKEN": "your_token",
"INFLUXDB_URL": "http://localhost:8086",
"INFLUXDB_ORG": "your_org"
}
}
}
}Bei lokaler Installation
{
"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"
}
}
}
}Codestruktur
Der Servercode ist in einer modularen Struktur organisiert:
src/index.js- Haupteinstiegspunkt des Serversconfig/- Konfigurationsbezogene Dateienenv.js- Handhabung von Umgebungsvariablen
utils/- HilfsfunktioneninfluxClient.js– InfluxDB-API-ClientloggerConfig.js– Konsolen-Logger-Konfiguration
handlers/- Ressourcen- und Tool-HandlerorganizationsHandler.js– Auflistung der OrganisationenbucketsHandler.js– Buckets-AuflistungmeasurementsHandler.js– Auflistung der MessungenqueryHandler.js- AbfrageausführungwriteDataTool.js– Tool zum Schreiben von DatenqueryDataTool.js- AbfragetoolcreateBucketTool.js– Tool zur Bucket-ErstellungcreateOrgTool.js– Tool zur Organisationserstellung
prompts/- EingabeaufforderungsvorlagenfluxQueryExamplesPrompt.js– Flux-AbfragebeispielelineProtocolGuidePrompt.js- Leitfaden zum Leitungsprotokoll
Diese Struktur ermöglicht eine bessere Wartbarkeit, einfachere Tests und eine klarere Trennung der Belange.
Testen
Das Repository umfasst umfassende Integrationstests, die:
Starten Sie einen Docker-Container mit InfluxDB
Füllen Sie es mit Beispieldaten
Testen Sie alle MCP-Serverfunktionen
So führen Sie die Tests aus:
npm testLizenz
MIT
Available Tools
4 toolscreate-bucketA
Provision a new bucket under an organization so that subsequent write-data calls have a destination.
Inputs: name (required), orgID (required), retentionPeriodSeconds.
create-orgB
Create a brand-new organization to isolate users or projects before generating buckets and tokens.
Inputs: name (required), description.
query-dataA
Execute a Flux query inside an organization to inspect measurement schemas, run aggregations, or validate recently written data. Default org: "my-organization".
Inputs: query (required), org.
write-dataB
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. Default org: "my-organization".
Inputs: data (required), bucket (required), org, precision.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool maps to a distinct resource and action: query-data reads, write-data ingests, create-bucket provisions storage, and create-org provisions a top-level container. There is no plausible way to confuse these operations with one another.
All four names follow the same lowercase hyphenated verb_noun convention (query-data, write-data, create-bucket, create-org). The pattern is fully predictable.
Four tools is at the thin end of the acceptable range but each one earns its place in the core write/query workflow. A slightly larger surface (listing/cleanup) would round out the set.
The core read/write path plus resource creation is covered, but there are no list or delete operations for buckets or orgs, leaving lifecycle gaps. The create-org description mentions tokens, yet no token tooling exists, creating a dead end.
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