ff-ruyijs
A AI Browser run any site JavaScript from Python with the real Firefox engine. Headless SpiderMonkey + Necko for automation and scraping.
An MCP Server for querying InfluxDB
Translation pending
Developer toolsJavaScript · DockerfileGitHub @idoruSelf-installOwner unconfirmed
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Installable projects can be verified without a deployment domain. Use GitHub sign-in for a personal repository, or the repository verification file above for an organization repository.
Ask about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗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:
The server exposes the following resources:
Organizations List: influxdb://orgs
Buckets List: influxdb://buckets
Bucket Measurements: influxdb://bucket/{bucketName}/measurements
INFLUXDB_ORG)Query Data: influxdb://query/{orgName}/{fluxQuery}
headers and one record per row, across all result tables)Template variables (bucketName, orgName, fluxQuery) must be percent-encoded, e.g. with encodeURIComponent, so names containing spaces or / and multi-line queries survive the URI.
The server provides these tools:
write-data: Write time-series data in line protocol format
org and bucket are optional when INFLUXDB_ORG / INFLUXDB_BUCKET are set, and fall back to those valuesquery-data: Execute Flux queries
org is optional when INFLUXDB_ORG is set, and falls back to that valuecreate-bucket: Create a new bucket
create-org: Create a new organization
The server offers these prompt templates:
flux-query-examples: Common Flux query examplesline-protocol-guide: Guide to InfluxDB line protocol formatThe server requires these environment variables:
INFLUXDB_TOKEN (required): Authentication token for the InfluxDB APIINFLUXDB_URL (optional): URL of the InfluxDB instance (defaults to http://localhost:8086)INFLUXDB_ORG (optional): Default organization name for certain operations. When set, org becomes optional on the write-data and query-data toolsINFLUXDB_BUCKET (optional): Default bucket name. When set, bucket becomes optional on the write-data toolDEBUG (optional): Set to mcp:* to log every MCP message to stderr. This includes query text and written data, so leave it off in productionThe following variables apply only to the Streamable HTTP transport (see HTTP transport security):
MCP_HTTP_HOST (optional): Interface to listen on (defaults to 127.0.0.1; same as --host)MCP_AUTH_TOKEN (optional): When set, every request must send Authorization: Bearer <token>. Required to listen on a non-loopback interfaceMCP_ALLOWED_HOSTS (optional): Comma-separated hostnames (ports are ignored) accepted in the Host header. Defaults to localhost,127.0.0.1,[::1] plus the bind address on loopback; unset means no Host check on other interfacesMCP_HTTP_ALLOW_UNAUTHENTICATED (optional): Set to true to listen on a non-loopback interface without MCP_AUTH_TOKEN, e.g. behind a reverse proxy that authenticates for youMCP_HTTP_BODY_LIMIT (optional): Maximum request body size (defaults to 4mb; accepts b, kb or mb suffixes). Raise it for very large write-data batchesRequests to InfluxDB time out after 10 seconds (60 seconds for queries, 30 seconds for writes), including the time spent reading the response.
To install InfluxDB MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @idoru/influxdb-mcp-server --client claude
# Run directly with npx
INFLUXDB_TOKEN=your_token npx influxdb-mcp-server
# Install globally
npm install -g influxdb-mcp-server
# Run the server
INFLUXDB_TOKEN=your_token influxdb-mcp-server
# 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
Node.js 20 or later is required.
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 that listens on 127.0.0.1 unless --host is given:
# 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:
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
Anyone who can reach the HTTP endpoint can read and write InfluxDB with the server's INFLUXDB_TOKEN, so the HTTP transport is locked down by default:
127.0.0.1 only.Host header is not localhost, 127.0.0.1 or [::1], which blocks DNS rebinding attacks from websites open in your browser.MCP_AUTH_TOKEN is set (or MCP_HTTP_ALLOW_UNAUTHENTICATED=true).To expose the server on your network, or from a container, require a bearer token:
INFLUXDB_TOKEN=your_token MCP_AUTH_TOKEN="$(openssl rand -hex 32)" \
influxdb-mcp-server --http 3000 --host 0.0.0.0
Clients then send Authorization: Bearer <MCP_AUTH_TOKEN> with each request. Set MCP_ALLOWED_HOSTS to the hostnames clients use to reach the server for additional DNS rebinding protection. Prefer terminating TLS in front of the server when it is reachable beyond your machine.
The image runs as the unprivileged node user and uses stdio by default:
docker build -t influxdb-mcp-server .
docker run --rm -i -e INFLUXDB_TOKEN=your_token -e INFLUXDB_URL=http://host.docker.internal:8086 influxdb-mcp-server
# Streamable HTTP inside a container must bind 0.0.0.0, so it needs a token
docker run --rm -p 127.0.0.1:3000:3000 -e INFLUXDB_TOKEN=your_token -e MCP_AUTH_TOKEN=your_mcp_token \
influxdb-mcp-server --http 3000 --host 0.0.0.0
Add the server to your claude_desktop_config.json:
{
"mcpServers": {
"influxdb": {
"command": "npx",
"args": ["influxdb-mcp-server"],
"env": {
"INFLUXDB_TOKEN": "your_token",
"INFLUXDB_URL": "http://localhost:8086",
"INFLUXDB_ORG": "your_org",
"INFLUXDB_BUCKET": "your_bucket"
}
}
}
}
{
"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",
"INFLUXDB_BUCKET": "your_bucket"
}
}
}
}
The server code is organized into a modular structure:
src/
index.js - CLI entry point (argument parsing and transport selection)server.js - MCP server factory registering resources, tools and promptsconfig/ - Configuration related files
env.js - Environment variable handlinghttp.js - HTTP transport options and safety checkshttp/ - Streamable HTTP transport
app.js - Express app (Host validation, bearer auth, body limits)utils/ - Utility functions
influxClient.js - InfluxDB API client with request timeoutscsv.js - Flux CSV response parserflux.js - Flux string escaping and URI parameter decodingloggerConfig.js - Console logger configuration and DEBUG tracingtraceTransport.js - MCP message tracing for DEBUG=mcp:*handlers/ - Resource and tool handlers
organizationsHandler.js - Organizations listingbucketsHandler.js - Buckets listingmeasurementsHandler.js - Measurements listingqueryHandler.js - Query executionwriteDataTool.js - Data write toolqueryDataTool.js - Query toolcreateBucketTool.js - Bucket creation toolcreateOrgTool.js - Organization creation toolprompts/ - Prompt templates
fluxQueryExamplesPrompt.js - Flux query exampleslineProtocolGuidePrompt.js - Line protocol guideThis structure allows for better maintainability, easier testing, and clearer separation of concerns.
The repository includes comprehensive tests that:
To run the tests:
npm test
MIT