InfluxDB logo

InfluxDB

Community
idoru

An MCP Server for querying InfluxDB

Publisheridoru
Repositoryinfluxdb-mcp-server
LanguageJavaScript
Forks
15
Stars
37
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    InfluxDB exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    37 stars and 15 forks from the linked repository.

MseeP Badge

InfluxDB v2 MCP Server

smithery badge

Trust Score

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.

Features

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

Resources

The server exposes the following resources:

  1. Organizations List: influxdb://orgs

    • Displays all organizations in the InfluxDB instance
  2. Buckets List: influxdb://buckets

    • Shows all buckets with their metadata
  3. Bucket Measurements: influxdb://bucket/{bucketName}/measurements

    • Lists all measurements within a specified bucket
  4. Query Data: influxdb://query/{orgName}/{fluxQuery}

    • Executes a Flux query and returns results as a resource

Tools

The server provides these tools:

  1. write-data: Write time-series data in line protocol format

    • Parameters: org, bucket, data, precision (optional)
  2. query-data: Execute Flux queries

    • Parameters: org, query
  3. create-bucket: Create a new bucket

    • Parameters: name, orgID, retentionPeriodSeconds (optional)
  4. create-org: Create a new organization

    • Parameters: name, description (optional)

Prompts

The server offers these prompt templates:

  1. flux-query-examples: Common Flux query examples
  2. line-protocol-guide: Guide to InfluxDB line protocol format

Configuration

The server requires these environment variables:

  • INFLUXDB_TOKEN (required): Authentication token for the InfluxDB API
  • INFLUXDB_URL (optional): URL of the InfluxDB instance (defaults to http://localhost:8086)
  • INFLUXDB_ORG (optional): Default organization name for certain operations

Installation

Installing via Smithery

To install InfluxDB MCP Server for Claude Desktop automatically via Smithery:

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

Option 1: Run with npx (recommended)

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

Option 2: Install globally

bash
# Install globally
npm install -g influxdb-mcp-server

# Run the server
INFLUXDB_TOKEN=your_token influxdb-mcp-server

Option 3: From source

bash
# 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

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:

bash
# Start with Streamable HTTP transport on default port 3000
INFLUXDB_TOKEN=your_token npm start -- --http

# Start with Streamable HTTP transport on a specific port
INFLUXDB_TOKEN=your_token npm start -- --http 8080

If you installed globally or are using npx, you can run:

bash
INFLUXDB_TOKEN=your_token influxdb-mcp-server --http
# or explicitly force stdio
INFLUXDB_TOKEN=your_token influxdb-mcp-server --stdio
# or
INFLUXDB_TOKEN=your_token influxdb-mcp-server --http 8080

Integration with Claude for Desktop

Add the server to your claude_desktop_config.json:

Using npx (recommended)

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

If installed locally

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

Code Structure

The server code is organized into a modular structure:

  • src/
    • index.js - Main server entry point
    • config/ - Configuration related files
      • env.js - Environment variable handling
    • utils/ - Utility functions
      • influxClient.js - InfluxDB API client
      • loggerConfig.js - Console logger configuration
    • handlers/ - Resource and tool handlers
      • organizationsHandler.js - Organizations listing
      • bucketsHandler.js - Buckets listing
      • measurementsHandler.js - Measurements listing
      • queryHandler.js - Query execution
      • writeDataTool.js - Data write tool
      • queryDataTool.js - Query tool
      • createBucketTool.js - Bucket creation tool
      • createOrgTool.js - Organization creation tool
    • prompts/ - Prompt templates
      • fluxQueryExamplesPrompt.js - Flux query examples
      • lineProtocolGuidePrompt.js - Line protocol guide

This structure allows for better maintainability, easier testing, and clearer separation of concerns.

Testing

The repository includes comprehensive integration tests that:

  • Spin up a Docker container with InfluxDB
  • Populate it with sample data
  • Test all MCP server functionality

To run the tests:

bash
npm test

License

MIT

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Use InfluxDB MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once InfluxDB is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add InfluxDB as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the InfluxDB MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "influxdb": {
      "command": "npx",
      "args": [
        "-y",
        "influxdb-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the InfluxDB MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the InfluxDB MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use InfluxDB to help me with this task?
InfluxDB
Sure. I read it.
Here is what I found using InfluxDB.

Frequently asked questions

What is the InfluxDB MCP server used for?

InfluxDB is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use InfluxDB MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use InfluxDB with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use InfluxDB MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With InfluxDB connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect InfluxDB MCP to TypingMind?

InfluxDB runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does InfluxDB MCP provide in TypingMind?

InfluxDB exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use InfluxDB MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If InfluxDB requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇