Skip to main content
Glama
idoru

InfluxDB MCP Server

by idoru

InfluxDB MCP-Server

Schmiedeabzeichen

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:

  1. Liste der Organisationen : influxdb://orgs

    • Zeigt alle Organisationen in der InfluxDB-Instanz an

  2. Buckets-Liste : influxdb://buckets

    • Zeigt alle Buckets mit ihren Metadaten an

  3. Bucket-Messungen : influxdb://bucket/{bucketName}/measurements

    • Listet alle Messungen innerhalb eines angegebenen Buckets auf

  4. 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:

  1. write-data : Schreibt Zeitreihendaten im Zeilenprotokollformat

    • Parameter: Organisation, Bucket, Daten, Präzision (optional)

  2. query-data : Flux-Abfragen ausführen

    • Parameter: org, Abfrage

  3. create-bucket : Einen neuen Bucket erstellen

    • Parameter: Name, OrgID, retentionPeriodSeconds (optional)

  4. create-org : Eine neue Organisation erstellen

    • Parameter: Name, Beschreibung (optional)

Eingabeaufforderungen

Der Server bietet diese Eingabeaufforderungsvorlagen:

  1. flux-query-examples : Allgemeine Flux-Abfragebeispiele

  2. line-protocol-guide : Leitfaden zum Zeilenprotokollformat von InfluxDB

Konfiguration

Der Server benötigt diese Umgebungsvariablen:

  • INFLUXDB_TOKEN (erforderlich): Authentifizierungstoken für die InfluxDB-API

  • INFLUXDB_URL (optional): URL der InfluxDB-Instanz (standardmäßig http://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 claude

Option 1: Mit npx ausführen (empfohlen)

# Run directly with npx
INFLUXDB_TOKEN=your_token npx influxdb-mcp-server

Option 2: Global installieren

# Install globally
npm install -g influxdb-mcp-server

# Run the server
INFLUXDB_TOKEN=your_token influxdb-mcp-server

Option 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 start

Integration 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 Servers

    • config/ - Konfigurationsbezogene Dateien

      • env.js - Handhabung von Umgebungsvariablen

    • utils/ - Hilfsfunktionen

      • influxClient.js – InfluxDB-API-Client

      • loggerConfig.js – Konsolen-Logger-Konfiguration

    • handlers/ - Ressourcen- und Tool-Handler

      • organizationsHandler.js – Auflistung der Organisationen

      • bucketsHandler.js – Buckets-Auflistung

      • measurementsHandler.js – Auflistung der Messungen

      • queryHandler.js - Abfrageausführung

      • writeDataTool.js – Tool zum Schreiben von Daten

      • queryDataTool.js - Abfragetool

      • createBucketTool.js – Tool zur Bucket-Erstellung

      • createOrgTool.js – Tool zur Organisationserstellung

    • prompts/ - Eingabeaufforderungsvorlagen

      • fluxQueryExamplesPrompt.js – Flux-Abfragebeispiele

      • lineProtocolGuidePrompt.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 test

Lizenz

MIT

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides secure, read-only access to time-series data stored in InfluxDB 1.8 via JWT authentication.
    4
  • A
    license
    Not graded
    quality
    D
    maintenance
    InfluxDB-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

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A Model Context Protocol server for Wix AI tools

  • GibsonAI MCP server: manage your databases with natural language

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/idoru/influxdb-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server