Summary

The InfluxDB 3 Model Context Protocol (MCP) server lets you manage and query InfluxDB 3 (Core, Enterprise, Dedicated, Serverless, Clustered) using natural language through popular LLM tools like Claude Desktop, ChatGPT Desktop, and other MCP-compatible agents.

The setup is straightforward. In this article, we will focus on setting up InfluxDB 3 Enterprise using Docker with Claude Desktop.

Prerequisites

Install InfluxDB 3 Enterprise using Docker (if you’re a new user, try out our free trial) on your machine by running the installer script:

curl -O https://www.influxdata.com/d/install_influxdb3.sh && sh install_influxdb3.sh enterprise


InfluxDB 3 Explorer UI will also make it easier to manage InfluxDB operations, so it’s recommended that you install it (using Docker) during initial setup or afterwards.

1. Create an InfluxDB 3 token for MCP server

The easiest way to create a scoped token is within InfluxDB 3 Explorer UI.

  1. Open Explorer at http://localhost:8888.
  2. Go to Manage Tokens.
  3. Create a Database (resource) token with read (and optional write) permissions for the databases you want your LLM to access.
  4. Copy the token string and store it securely; the MCP server will use it as INFLUX_DB_TOKEN.

Alternatively, you can run the following command inside a Docker container to create the token.

docker exec -it YOUR_CONTAINER_ID influxdb3 create token \
  --permission "db:DATABASE1,DATABASE2:read,write" \
  --name "Read-write on DATABASE1, DATABASE2" \
  --token YOUR_ADMIN_TOKEN \
  --expiry 1y


Security Tip: Use resource tokens with the minimum required permissions and an expiration date, rather than providing a full admin token to the LLM MCP.

2. Configure the Claude Desktop MCP server (Docker) for InfluxDB 3 Enterprise

The InfluxDB 3 MCP server runs as a separate service and can be started using either Node.js or Docker. We will use Docker, as it’s already running InfluxDB 3 and Explorer UI.

  1. Open Claude Desktop.
  2. Navigate to Settings → Developers → Edit Config
  3. Open the Claude Desktop configuration file, add the following to the existing file, save, and restart Claude Desktop.
{
  "mcpServers": {
    "influxdb": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "--interactive",
        "--add-host=host.docker.internal:host-gateway",
        "--env",
        "INFLUX_DB_PRODUCT_TYPE",
        "--env",
        "INFLUX_DB_INSTANCE_URL",
        "--env",
        "INFLUX_DB_TOKEN",
        "influxdata/influxdb3-mcp-server"
      ],
      "env": {
        "INFLUX_DB_PRODUCT_TYPE": "enterprise",
        "INFLUX_DB_INSTANCE_URL": "http://host.docker.internal:8181",
        "INFLUX_DB_TOKEN": "YOUR_RESOURCE_TOKEN"
      }
    }
  }
}


Claude desktop 1

3. Use Claude with InfluxDB via MCP

Once restarted, verify that Claude can access the InfluxDB 3 MCP server by chatting with it.

Claude desktop 2

Finally, you can interact with the database however you’d like, such as performing operations, getting analytics, etc., using natural language. Try the following prompts:

  • “List all the databases and permissions you have access to.”
  • “Show me the schema for the sensor_data table.”
  • “Analyze bitcoin sample data price in the last 30 days.” You can also see the actual SQL query that gets executed.

Claude desktop 3

Connecting other LLMs

In this article we used Claude Desktop, but the InfluxDB 3 MCP server itself is generic. Any LLM agent that supports the Model Context Protocol can be used. For example, ChatGPT Desktop. In a follow-up article, we’ll cover how to run the MCP server and an LLM locally using other tools. We would love to hear your comments/questions, etc., on our community website, Slack, or Discord.

FAQ

What is the Model Context Protocol (MCP), and why does InfluxDB support it?

MCP is an open protocol that standardizes how LLM applications connect to external tools and data sources, so instead of each AI app needing a custom integration for every database, it can talk to any MCP-compatible server through one interface. InfluxDB implements this as a database MCP server so LLM agents like Claude Desktop can manage InfluxDB instances, generate SQL, and query data in plain English without custom code for each connection.

Does InfluxDB have one MCP server or two?

InfluxDB actually offers two separate MCP servers: a database MCP server for managing your InfluxDB instance (creating databases, tokens, running queries) and a documentation MCP server for searching InfluxDB docs directly from your IDE. This article covers the database MCP server; the documentation server is a separate, already-hosted service you can add to an assistant's config without running anything locally.

Do I need an admin token to connect Claude Desktop to InfluxDB via MCP?

No, and you shouldn't use one—a scoped resource token with only the read (and optional write) permissions your LLM actually needs is the recommended approach. This limits the blast radius if the token is ever exposed, since the LLM can only perform operations the token's permissions allow, rather than having full administrative control over your instance.

How do I verify the InfluxDB MCP server is actually working after setup?

After restarting Claude Desktop, ask it something simple like "List all the databases and permissions you have access to"—if it responds with real data from your instance, the connection is working. From there you can also ask schema questions ("show me the schema for the sensor_data table") or request analysis, and Claude will show you the actual SQL it generated and ran.