# InfluxDB Cloud — how to use (mcp.ai)

Connect your InfluxDB Cloud account and use 9 tools for databases straight from your AI agent. Connect with your own API key. InfluxDB Cloud is a fully managed, scalable, and secure time series database service designed for real-time analytics and monitoring.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_influxdb_cloud?ms=1787293440000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `influxdb_cloud_add_dashboard_cell`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/influxdb_cloud`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/influxdb_cloud/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/influxdb_cloud/add/dashboard/cell` — Tool to add a cell to a dashboard. Use when you want to add or copy a cell to an existing dashboard after verifying the dashboard exists.
  - body: { h?: integer, w?: integer, x?: integer, y?: integer, name?: string, usingView?: string, dashboardID: string }
- `POST https://api.mcp.ai/api/influxdb_cloud/delete/user` — Delete a user from InfluxDB Cloud by their user ID. This action permanently removes a user from the InfluxDB Cloud organization. Requires an operator token with write:users permission to execute succe
  - body: { userID: string }
- `POST https://api.mcp.ai/api/influxdb_cloud/generate/query/ast` — Generates an Abstract Syntax Tree (AST) from a Flux query script. Use this tool to analyze the structure of a Flux query and validate its syntax. The AST shows the parsed structure but does not valida
  - body: { query: string, zap_trace_span?: string }
- `POST https://api.mcp.ai/api/influxdb_cloud/get/dbrp` — Retrieve a Database and Retention Policy (DBRP) mapping by ID from InfluxDB Cloud. DBRP mappings enable InfluxDB 1.x query compatibility by mapping old database/retention policy names to InfluxDB 2.x 
  - body: { org?: string, orgID?: string, dbrpID: string }
- `POST https://api.mcp.ai/api/influxdb_cloud/list/routes` — Lists all available InfluxDB v2 API endpoints and routes. This action queries the root API endpoint (GET /api/v2) to retrieve a comprehensive map of all available API resources and their corresponding
  - body: { zap_trace_span?: string }
- `POST https://api.mcp.ai/api/influxdb_cloud/signin` — Authenticates a user with username and password to create a session with InfluxDB Cloud. Returns a session cookie that can be used for subsequent API requests instead of token-based authentication. Us
  - body: { base_url?: string, password: string, username: string, Zap-Trace-Span?: string }
- `POST https://api.mcp.ai/api/influxdb_cloud/signout` — Tool to expire a user session using a session cookie. Use when ending an authenticated session after signin.
  - body: { cookie: string, Zap-Trace-Span?: string }
- `POST https://api.mcp.ai/api/influxdb_cloud/update/dbrp` — Tool to update a DBRP mapping's default and retention policy. Use when modifying an existing DBRP mapping after initial creation.
  - body: { org?: string, orgID?: string, dbrpID: string, default?: boolean, retentionPolicy?: string }
- `POST https://api.mcp.ai/api/influxdb_cloud/write/data` — Writes time-series data in line protocol format to an InfluxDB Cloud bucket. Use this tool to ingest metrics, sensor data, or any time-series measurements into InfluxDB. The data must be formatted acc
  - body: { org?: string, data: string, orgID?: string, bucket: string, precision?: string }

## Example prompts
- "What can I do in InfluxDB Cloud?"
- "Show me a summary of my InfluxDB Cloud account"

## More
- Page: https://mcp.ai/influxdb_cloud
- Agent spec (llms.txt): https://mcp.ai/influxdb_cloud/llms.txt
- Postman collection: https://mcp.ai/influxdb_cloud/postman.json
