A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2. Mostly built with Claude Code. This MCP server provides: - Resources: Access to organization, bucket, and measurement data - Tools: Write data, execute queries, and manage database objects - Prompts: Templates for common Flux queries and Line Protocol format The server exposes the fo
Add this skill
npx mdskills install idoru/influxdb-mcp-serverWell-documented MCP server with comprehensive InfluxDB integration and multiple installation options
1[](https://mseep.ai/app/idoru-influxdb-mcp-server)23# InfluxDB v2 MCP Server45[](https://smithery.ai/server/@idoru/influxdb-mcp-server)67[](https://archestra.ai/mcp-catalog/idoru__influxdb-mcp-server)89A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2. Mostly built with Claude Code.1011## Features1213This MCP server provides:1415- **Resources**: Access to organization, bucket, and measurement data16- **Tools**: Write data, execute queries, and manage database objects17- **Prompts**: Templates for common Flux queries and Line Protocol format1819## Resources2021The server exposes the following resources:22231. **Organizations List**: `influxdb://orgs`24 - Displays all organizations in the InfluxDB instance25262. **Buckets List**: `influxdb://buckets`27 - Shows all buckets with their metadata28293. **Bucket Measurements**: `influxdb://bucket/{bucketName}/measurements`30 - Lists all measurements within a specified bucket31324. **Query Data**: `influxdb://query/{orgName}/{fluxQuery}`33 - Executes a Flux query and returns results as a resource3435## Tools3637The server provides these tools:38391. `write-data`: Write time-series data in line protocol format40 - Parameters: org, bucket, data, precision (optional)41422. `query-data`: Execute Flux queries43 - Parameters: org, query44453. `create-bucket`: Create a new bucket46 - Parameters: name, orgID, retentionPeriodSeconds (optional)47484. `create-org`: Create a new organization49 - Parameters: name, description (optional)5051## Prompts5253The server offers these prompt templates:54551. `flux-query-examples`: Common Flux query examples562. `line-protocol-guide`: Guide to InfluxDB line protocol format5758## Configuration5960The server requires these environment variables:6162- `INFLUXDB_TOKEN` (required): Authentication token for the InfluxDB API63- `INFLUXDB_URL` (optional): URL of the InfluxDB instance (defaults to `http://localhost:8086`)64- `INFLUXDB_ORG` (optional): Default organization name for certain operations6566## Installation6768### Installing via Smithery6970To install InfluxDB MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@idoru/influxdb-mcp-server):7172```bash73npx -y @smithery/cli install @idoru/influxdb-mcp-server --client claude74```7576### Option 1: Run with npx (recommended)7778```bash79# Run directly with npx80INFLUXDB_TOKEN=your_token npx influxdb-mcp-server81```8283### Option 2: Install globally8485```bash86# Install globally87npm install -g influxdb-mcp-server8889# Run the server90INFLUXDB_TOKEN=your_token influxdb-mcp-server91```9293### Option 3: From source9495```bash96# Clone the repository97git clone https://github.com/idoru/influxdb-mcp-server.git98cd influxdb-mcp-server99100# Install dependencies101npm install102103# Run the server104INFLUXDB_TOKEN=your_token npm start105```106107`influxdb-mcp-server` uses stdio transport by default. You can explicitly request it with `--stdio`, or start the server with Streamable HTTP transport by providing the `--http` option with an optional port number (defaults to 3000). This mode uses an internal Express.js server:108109```bash110# Start with Streamable HTTP transport on default port 3000111INFLUXDB_TOKEN=your_token npm start -- --http112113# Start with Streamable HTTP transport on a specific port114INFLUXDB_TOKEN=your_token npm start -- --http 8080115```116117If you installed globally or are using npx, you can run:118```bash119INFLUXDB_TOKEN=your_token influxdb-mcp-server --http120# or explicitly force stdio121INFLUXDB_TOKEN=your_token influxdb-mcp-server --stdio122# or123INFLUXDB_TOKEN=your_token influxdb-mcp-server --http 8080124```125126## Integration with Claude for Desktop127128Add the server to your `claude_desktop_config.json`:129130### Using npx (recommended)131132```json133{134 "mcpServers": {135 "influxdb": {136 "command": "npx",137 "args": ["influxdb-mcp-server"],138 "env": {139 "INFLUXDB_TOKEN": "your_token",140 "INFLUXDB_URL": "http://localhost:8086",141 "INFLUXDB_ORG": "your_org"142 }143 }144 }145}146```147148### If installed locally149150```json151{152 "mcpServers": {153 "influxdb": {154 "command": "node",155 "args": ["/path/to/influxdb-mcp-server/src/index.js"],156 "env": {157 "INFLUXDB_TOKEN": "your_token",158 "INFLUXDB_URL": "http://localhost:8086",159 "INFLUXDB_ORG": "your_org"160 }161 }162 }163}164```165166## Code Structure167168The server code is organized into a modular structure:169170- `src/`171 - `index.js` - Main server entry point172 - `config/` - Configuration related files173 - `env.js` - Environment variable handling174 - `utils/` - Utility functions175 - `influxClient.js` - InfluxDB API client176 - `loggerConfig.js` - Console logger configuration177 - `handlers/` - Resource and tool handlers178 - `organizationsHandler.js` - Organizations listing179 - `bucketsHandler.js` - Buckets listing180 - `measurementsHandler.js` - Measurements listing181 - `queryHandler.js` - Query execution182 - `writeDataTool.js` - Data write tool183 - `queryDataTool.js` - Query tool184 - `createBucketTool.js` - Bucket creation tool185 - `createOrgTool.js` - Organization creation tool186 - `prompts/` - Prompt templates187 - `fluxQueryExamplesPrompt.js` - Flux query examples188 - `lineProtocolGuidePrompt.js` - Line protocol guide189190This structure allows for better maintainability, easier testing, and clearer separation of concerns.191192## Testing193194The repository includes comprehensive integration tests that:195196- Spin up a Docker container with InfluxDB197- Populate it with sample data198- Test all MCP server functionality199200To run the tests:201202```bash203npm test204```205206## License207208MIT209
Full transparency — inspect the skill content before installing.