InfluxDB MCP Server
InfluxDB MCP サーバー
InfluxDB OSS API v2を使用してInfluxDBインスタンスへのアクセスを公開するモデルコンテキストプロトコル(MCP)サーバー。主にClaude Codeによって構築されています。
特徴
この MCP サーバーは以下を提供します。
リソース: 組織、バケット、測定データへのアクセス
ツール: データの書き込み、クエリの実行、データベース オブジェクトの管理
プロンプト: 一般的な Flux クエリとラインプロトコル形式のテンプレート
Related MCP server: InfluxDB OSS API MCP Server
リソース
サーバーは次のリソースを公開します。
組織リスト:
influxdb://orgsInfluxDBインスタンス内のすべての組織を表示します
バケットリスト:
influxdb://bucketsすべてのバケットとそのメタデータを表示します
バケット測定:
influxdb://bucket/{bucketName}/measurements指定されたバケット内のすべての測定値を一覧表示します
クエリデータ:
influxdb://query/{orgName}/{fluxQuery}Fluxクエリを実行し、結果をリソースとして返します
ツール
サーバーは次のツールを提供します:
write-data: 時系列データをラインプロトコル形式で書き込むパラメータ: org、bucket、data、precision(オプション)
query-data: Fluxクエリを実行するパラメータ: org、クエリ
create-bucket: 新しいバケットを作成するパラメータ: name、orgID、retentionPeriodSeconds(オプション)
create-org: 新しい組織を作成するパラメータ: 名前、説明(オプション)
プロンプト
サーバーは、次のプロンプト テンプレートを提供します。
flux-query-examples: 一般的な Flux クエリの例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 startClaude 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ライセンス
マサチューセッツ工科大学
Maintenance
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
- 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
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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