Skip to main content
Glama

InfluxDB MCP Server

by idoru

InfluxDB MCP サーバー

InfluxDB OSS API v2を使用してInfluxDBインスタンスへのアクセスを公開するモデルコンテキストプロトコル(MCP)サーバー。主にClaude Codeによって構築されています。

特徴

この MCP サーバーは以下を提供します。

  • リソース: 組織、バケット、測定データへのアクセス
  • ツール: データの書き込み、クエリの実行、データベース オブジェクトの管理
  • プロンプト: 一般的な Flux クエリとラインプロトコル形式のテンプレート

リソース

サーバーは次のリソースを公開します。

  1. 組織リスト: influxdb://orgs
    • InfluxDBインスタンス内のすべての組織を表示します
  2. バケットリスト: influxdb://buckets
    • すべてのバケットとそのメタデータを表示します
  3. バケット測定: influxdb://bucket/{bucketName}/measurements
    • 指定されたバケット内のすべての測定値を一覧表示します
  4. クエリデータ: influxdb://query/{orgName}/{fluxQuery}
    • Fluxクエリを実行し、結果をリソースとして返します

ツール

サーバーは次のツールを提供します:

  1. write-data : 時系列データをラインプロトコル形式で書き込む
    • パラメータ: org、bucket、data、precision(オプション)
  2. query-data : Fluxクエリを実行する
    • パラメータ: org、クエリ
  3. create-bucket : 新しいバケットを作成する
    • パラメータ: name、orgID、retentionPeriodSeconds(オプション)
  4. create-org : 新しい組織を作成する
    • パラメータ: 名前、説明(オプション)

プロンプト

サーバーは、次のプロンプト テンプレートを提供します。

  1. flux-query-examples : 一般的な Flux クエリの例
  2. line-protocol-guide : InfluxDB ラインプロトコル形式のガイド

構成

サーバーには次の環境変数が必要です:

  • INFLUXDB_TOKEN (必須): InfluxDB API の認証トークン
  • INFLUXDB_URL (オプション): InfluxDBインスタンスのURL (デフォルトはhttp://localhost:8086 )
  • INFLUXDB_ORG (オプション): 特定の操作のデフォルトの組織名

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の InfluxDB MCP Server を自動的にインストールするには:

npx -y @smithery/cli install @idoru/influxdb-mcp-server --client claude

オプション1: npxで実行(推奨)

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

オプション2: グローバルにインストールする

# Install globally npm install -g influxdb-mcp-server # Run the server INFLUXDB_TOKEN=your_token influxdb-mcp-server

オプション3: ソースから

# 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

Claude for Desktopとの統合

claude_desktop_config.jsonにサーバーを追加します。

npx の使用(推奨)

{ "mcpServers": { "influxdb": { "command": "npx", "args": ["influxdb-mcp-server"], "env": { "INFLUXDB_TOKEN": "your_token", "INFLUXDB_URL": "http://localhost:8086", "INFLUXDB_ORG": "your_org" } } } }

ローカルにインストールした場合

{ "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" } } } }

コード構造

サーバー コードはモジュール構造に編成されています。

  • src/
    • index.js - メインサーバーのエントリポイント
    • config/ - 設定関連ファイル
      • env.js - 環境変数の処理
    • utils/ - ユーティリティ関数
      • influxClient.js - InfluxDB API クライアント
      • loggerConfig.js - コンソールロガーの設定
    • handlers/ - リソースとツールのハンドラー
      • organizationsHandler.js - 組織の一覧
      • bucketsHandler.js - バケットの一覧
      • measurementsHandler.js - 測定値リスト
      • queryHandler.js - クエリ実行
      • writeDataTool.js - データ書き込みツール
      • queryDataTool.js - クエリツール
      • createBucketTool.js - バケット作成ツール
      • createOrgTool.js - 組織作成ツール
    • prompts/ - プロンプトテンプレート
      • fluxQueryExamplesPrompt.js - Flux クエリの例
      • lineProtocolGuidePrompt.js - ラインプロトコルガイド

この構造により、保守性が向上し、テストが容易になり、関心の分離が明確になります。

テスト

リポジトリには、次のような包括的な統合テストが含まれています。

  • InfluxDB で Docker コンテナを起動する
  • サンプルデータを入力する
  • すべてのMCPサーバー機能をテストする

テストを実行するには:

npm test

ライセンス

マサチューセッツ工科大学

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Claude に InfluxDB 時系列データベース インスタンスへのアクセスを提供し、自然言語によるデータの書き込み、クエリ、組織およびバケットの管理を可能にするモデル コンテキスト プロトコル サーバー。

  1. 特徴
    1. リソース
      1. ツール
        1. プロンプト
          1. 構成
            1. インストール
              1. Smithery経由でインストール
              2. オプション1: npxで実行(推奨)
              3. オプション2: グローバルにインストールする
              4. オプション3: ソースから
            2. Claude for Desktopとの統合
              1. npx の使用(推奨)
              2. ローカルにインストールした場合
            3. コード構造
              1. テスト
                1. ライセンス

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables Claude to execute SQL queries on Snowflake databases with automatic connection lifecycle management.
                    Last updated -
                    41
                    Python
                    MIT License
                    • Apple
                    • Linux
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol server that enables Claude to perform advanced web research with intelligent search queuing, enhanced content extraction, and deep research capabilities.
                    Last updated -
                    3
                    8
                    1
                    TypeScript
                    MIT License
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables large language models like Claude to perform comprehensive interactions with Firebase Firestore databases, supporting full CRUD operations, complex queries, and advanced features like transactions and TTL management.
                    Last updated -
                    2
                    4
                    JavaScript
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that allows Large Language Models like Claude to execute SQL queries, explore database schemas, and maintain persistent connections to SQL Server databases.
                    Last updated -
                    TypeScript

                  View all related MCP servers

                  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