InfluxDB MCP Server
InfluxDB MCP サーバー
JWT 認証を介して InfluxDB 1.8 への安全な読み取り専用アクセスを提供するモデル コンテキスト プロトコル (MCP) サーバー。
概要
InfluxDB MCPサーバーは、AIアシスタントが標準化されたインターフェースを介してInfluxDBに保存された時系列データにクエリを実行できるようにします。JWTトークンによる認証により、InfluxDBインスタンスへの読み取り専用アクセスを提供します。
Related MCP server: MCP Auth Server
前提条件
ドッカー
InfluxDB 1.8 インスタンス (すでに実行中)
InfluxDBインスタンスの認証情報
インストール
リポジトリをクローンします:
git clone https://github.com/m4tyn0/influx_mcp cd influxdb-mcp-server設定を含む**
.envファイルを作成します**。cp env.example .envINFLUXDB_HOST= INFLUXDB_PORT=8086 INFLUXDB_USERNAME= INFLUXDB_PASSWORD= INFLUXDB_SSL=false INFLUXDB_VERIFY_SSL=true INFLUXDB_TIMEOUT=10 JWT_SECRET= JWT_ALGORITHM=HS256Docker コンテナをビルドして実行します。
docker build -t influxdb-mcp-server . docker run -d --env-file .env -p 8000:8000 influxdb-mcp-server
JWT認証
サーバーは認証にJWTトークンを使用します。MCPサーバーで認証するにはトークンを生成する必要があります。そのための簡単なスクリプトを以下に示します。
import jwt
import datetime
# Create a token
payload = {
"sub": "username", # Replace with the username you want to identify with
"iat": datetime.datetime.utcnow(),
"exp": datetime.datetime.utcnow() + datetime.timedelta(hours=1)
}
token = jwt.encode(payload, "your-jwt-secret", algorithm="HS256")
print(token)このトークンを MCP クライアントで使用するために保存します。
MCPクライアントでの使用
JWT トークンを使用して MCP サーバーで認証します。
Tool: auth Arguments: {"token": "your.jwt.token.here"}InfluxDB データのクエリ:
Tool: list_databases Arguments: {}Tool: list_measurements Arguments: {"database": "your_database_name"}Tool: query Arguments: { "database": "your_database_name", "query": "SELECT * FROM measurement_name LIMIT 10" }
トラブルシューティング
問題が発生した場合:
InfluxDBへの接続エラー:
INFLUXDB_HOST が正しく、Docker コンテナからアクセスできることを確認します。
InfluxDBの認証情報が正しいことを確認してください
InfluxDBインスタンスが外部ホストからの接続を受け入れるように設定されていることを確認します。
認証の問題:
JWT_SECRETが正しく設定されていることを確認してください
使用しているトークンがJWT_SECRETと一致しており、期限が切れていないことを確認してください。
InfluxDBの認証情報にデータベースへの読み取りアクセス権があることを確認します
ログを確認してください:
docker logs
セキュリティノート
MCPサーバーはInfluxDBインスタンスへの読み取り専用アクセスのみを許可します
すべてのクエリはSELECTで始まることを確認するために検証されます
JWT認証はMCPサーバーへのアクセスを保護します
セキュリティ強化のため、プライベートネットワークでサーバーを実行することを検討してください。
ご協力ありがとうございました。コードに問題がある場合や、もっと何か作ってほしいものがあれば、 m4tyn0@gmail.comまでご連絡ください。
This server cannot be installed
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
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides Claude with access to InfluxDB time-series database instances, enabling data writing, querying, and management of organizations and buckets through natural language.41,17644MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server with HTTP transport that implements JWT authentication, allowing secure tool execution and prompt handling with role-based access control.61
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server for Grafana data analysis8945MIT
- AlicenseNot gradedqualityCmaintenanceA selective, aggregation-first MCP server for InfluxDB v2 that bounds output and pushes reduction to the database, avoiding context flooding from raw time-series data.MIT
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
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/m4tyn0/influx_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server