InfluxDB MCP Server
InfluxDB MCP 服务器
一个模型上下文协议 (MCP) 服务器,使用 InfluxDB OSS API v2 公开对 InfluxDB 实例的访问。主要使用 Claude 代码构建。
特征
该 MCP 服务器提供:
资源:访问组织、存储桶和测量数据
工具:写入数据、执行查询和管理数据库对象
提示:常见 Flux 查询和线路协议格式的模板
Related MCP server: InfluxDB OSS API MCP Server
资源
服务器公开以下资源:
组织列表:
influxdb://orgs显示 InfluxDB 实例中的所有组织
存储桶列表:
influxdb://buckets显示所有存储桶及其元数据
存储桶测量:
influxdb://bucket/{bucketName}/measurements列出指定存储桶内的所有测量值
查询数据:
influxdb://query/{orgName}/{fluxQuery}执行 Flux 查询并将结果作为资源返回
工具
服务器提供以下工具:
write-data:以线路协议格式写入时间序列数据参数:org、bucket、data、precision(可选)
query-data:执行 Flux 查询参数:org,query
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 服务器:
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- Bucket创建工具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