Telegraf Controller MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Telegraf Controller MCP ServerCheck the health of my Telegraf Controller"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Telegraf Controller MCP Server
A Model Context Protocol (MCP) server that gives AI assistants full control over Telegraf Controller — manage agent fleets, configurations, labels, and health rules using natural language.
What This Does
Ask your AI assistant (Claude, Cline, etc.) questions like:
"Show me all Telegraf agents that haven't reported in the last hour"
"Create a configuration for MQTT IoT sensor collection and deploy it"
"Label all production agents and assign them the strict monitoring rule"
"Merge our CPU, memory, and disk configs into one stack"
"Which agents are not reporting and why?"
The MCP server translates natural language → 27 API calls → structured answers, all without leaving your chat interface.
Related MCP server: Grafana MCP Server
Architecture
┌──────────────────────────┐
│ Claude / Cline / etc. │
└────────────┬─────────────┘
│ MCP (stdio)
▼
┌──────────────────────────┐
│ Telegraf Controller │
│ MCP Server │
│ 27 tools · 4 resources │
│ 6 guided prompts │
└────────────┬─────────────┘
│ HTTP/REST
▼
┌──────────────────────────┐
│ Telegraf Controller │
│ (port 8888) │
│ Agent mgmt · Configs │
│ Labels · Health rules │
└──────────────────────────┘
│ Heartbeat (port 8889)
▼
┌──────────────────────────┐
│ Telegraf Agents │
│ (IoT, infra, etc.) │
└──────────────────────────┘Quick Start
Prerequisites
Telegraf Controller running (Docker, port 8888)
Node.js 18+ or Docker
MCP-compatible client: Claude Desktop, Cline, or OpenCode
1. Start the Telegraf Controller
docker run -d \
--name telegraf-controller \
-p 8888:8888 \
-p 8889:8889 \
influxdata/telegraf-controller:latest
# Verify
curl http://localhost:8888/health
# → {"status":"healthy","message":"Telegraf Controller is accessible"}Or use the included Docker Compose:
docker-compose up -d2. Configure Your MCP Client
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"telegraf-controller": {
"command": "npx",
"args": ["-y", "@influxdata/telegraf-controller-mcp-server"],
"env": {
"TELEGRAF_CONTROLLER_URL": "http://localhost:8888"
}
}
}
}Local install (Node.js)
git clone https://github.com/dburton-influxdata/telegraf-controller-mcp-server.git
cd telegraf-controller-mcp-server
npm install && npm run buildThen in your MCP client config:
{
"mcpServers": {
"telegraf-controller": {
"command": "node",
"args": ["/absolute/path/to/telegraf-controller-mcp-server/build/index.js"],
"env": {
"TELEGRAF_CONTROLLER_URL": "http://localhost:8888"
}
}
}
}Docker
docker run -i --rm --network=host \
-e TELEGRAF_CONTROLLER_URL=http://localhost:8888 \
ghcr.io/dburton-influxdata/telegraf-controller-mcp-server:latest3. Restart Your MCP Client & Test
After restarting Claude Desktop / Cline, ask:
"Check the health of my Telegraf Controller"
You should see the MCP server respond with agent counts, health status, and configuration counts.
Available Tools (27)
Configuration Management (9 tools)
Tool | Description | Modifies State |
| List all configurations with metadata | ❌ Read-only |
| Get full TOML content of a config | ❌ Read-only |
| Get config metadata (no TOML) | ❌ Read-only |
| Create a new Telegraf configuration | ✅ Creates |
| Update name, TOML, or description | ✅ Modifies |
| Delete a configuration | ✅ Deletes |
| Clone a configuration | ✅ Creates |
| Clone multiple configs at once | ✅ Creates |
| Combine multiple configs into one | ✅ Creates |
Agent Management (6 tools)
Tool | Description | Modifies State |
| List all agents (filterable by status) | ❌ Read-only |
| Get full details for one agent | ❌ Read-only |
| Fleet-wide health statistics | ❌ Read-only |
| Remove an agent from the controller | ✅ Deletes |
| Remove multiple agents at once | ✅ Deletes |
| Override health threshold for agent | ✅ Modifies |
Label Management (8 tools)
Tool | Description | Modifies State |
| List all labels | ❌ Read-only |
| Get label details | ❌ Read-only |
| Create a new label | ✅ Creates |
| Update label description | ✅ Modifies |
| Delete a label | ✅ Deletes |
| Delete multiple labels | ✅ Deletes |
| Tag one agent with a label | ✅ Modifies |
| Tag multiple agents with labels | ✅ Modifies |
Reporting Rules (5 tools)
Tool | Description | Modifies State |
| List all health threshold rules | ❌ Read-only |
| Get one rule's details | ❌ Read-only |
| Define new health threshold | ✅ Creates |
| Update thresholds | ✅ Modifies |
| Remove a rule | ✅ Deletes |
System Tools (3 tools)
Tool | Description |
| Verify controller is reachable |
| Get heartbeat endpoint URL |
| Get analytics instance ID |
MCP Resources
Read-only data URIs available to your AI client:
URI | Description |
| Real-time controller status + agent summary |
| All configurations (names, IDs, descriptions) |
| All agents with current health status |
| All health threshold rules |
MCP Prompts (Guided Workflows)
Pre-built workflows that chain multiple tools together:
Prompt | Description |
| Full fleet health report |
| Diagnose silent agents step-by-step |
| Guided TOML config creation |
| Walk through deploying configs |
| Analyze and improve health thresholds |
| Complete fleet summary |
Usage Examples
Natural Language
"List all agents that haven't reported in the last 30 minutes"
→ Uses: list_agents(status_filter="not_reporting")
"Create an IoT sensor config for MQTT topics IOT/+/temperature and IOT/+/humidity"
→ Uses: create_config(name=..., toml=...)
"Assign the production label and strict monitoring rule to all US-East agents"
→ Uses: list_agents + list_labels + bulk_assign_labels_to_agents + assign_agent_reporting_rule
"Merge the CPU, memory, and disk configs into one monitoring stack"
→ Uses: list_configs + merge_configs(...)Slash Commands (Cline / OpenCode)
# Health check
/mcp telegraf-controller_health_check
# List all agents
/mcp telegraf-controller_list_agents limit=100 page=1
# Get unhealthy agents only
/mcp telegraf-controller_list_agents status_filter=not_reporting
# Create a label
/mcp telegraf-controller_create_label description="env:production"
# Create a config
/mcp telegraf-controller_create_config \
name="iot-sensors" \
description="MQTT IoT data collector" \
toml="[agent]\n interval = \"10s\"\n\n[[inputs.mqtt_consumer]]\n..."
# Create a strict reporting rule
/mcp telegraf-controller_create_reporting_rule \
name="production-strict" \
threshold_seconds=300 \
has_auto_delete=falseComplete Fleet Setup (step-by-step)
1. Check health:
telegraf-controller_health_check
2. See current state:
telegraf-controller_get_agent_summary
3. Create environment labels:
telegraf-controller_create_label description="env:production"
telegraf-controller_create_label description="location:us-east"
telegraf-controller_create_label description="type:iot-sensor"
4. Create IoT config:
telegraf-controller_create_config name="iot-us-east" toml="..."
5. Create strict monitoring rule:
telegraf-controller_create_reporting_rule name="prod-strict" threshold_seconds=300
6. Assign labels to agents:
telegraf-controller_bulk_assign_labels_to_agents agent_ids="..." label_ids="..."
7. Assign reporting rule:
telegraf-controller_assign_agent_reporting_rule agent_id="..." rule_id="..."Configuration
Environment Variables
Variable | Required | Default | Description |
| Yes |
| Base URL of Telegraf Controller API |
MCP Client Config Examples
See the examples/ directory:
examples/claude-desktop-local.json— Claude Desktop, local Node.jsexamples/claude-desktop-npx.json— Claude Desktop, npxexamples/claude-desktop-docker.json— Claude Desktop, Docker
Grafana Dashboards
Four pre-built Grafana dashboards are included in grafana/dashboards/:
Dashboard | File | Description |
IoT Sensor Monitoring |
| Real-time MQTT sensor data (temp, humidity, pressure, CO2) |
Infrastructure Monitoring |
| CPU, memory, disk, network, Docker metrics |
Controller Events |
| Config changes, agent lifecycle, label assignments |
MCP Server Monitoring |
| Agent health, config counts, MCP tool activity |
Import Dashboards
# Install Grafana (if not running)
docker run -d -p 3001:3000 --name grafana grafana/grafana:latest
# Import via Grafana UI
# 1. http://localhost:3001 → Dashboards → Import
# 2. Upload JSON files from grafana/dashboards/
# Or import via API
for f in grafana/dashboards/*.json; do
curl -s -X POST http://admin:admin@localhost:3001/api/dashboards/import \
-H "Content-Type: application/json" \
-d "{\"dashboard\": $(cat $f), \"overwrite\": true, \"folderId\": 0}"
echo " → Imported: $f"
doneSee docs/GRAFANA_DASHBOARDS.md for full panel descriptions and queries.
Documentation
Document | Description |
Complete reference for all 27 tools with parameters and examples | |
Step-by-step setup for Claude Desktop, Cline, OpenCode | |
All 4 dashboards: panels, queries, import instructions |
Project Structure
telegraf-controller-mcp-server/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── tools/
│ │ ├── configs.ts # Configuration management tools
│ │ ├── agents.ts # Agent management tools
│ │ └── reporting.ts # Reporting rules tools
│ ├── resources/
│ │ └── index.ts # 4 MCP resources
│ ├── prompts/
│ │ └── index.ts # 6 guided prompts
│ └── utils/
│ ├── client.ts # Telegraf Controller API client
│ └── validation.ts # Input validation helpers
├── examples/
│ ├── claude-desktop-local.json
│ ├── claude-desktop-npx.json
│ └── claude-desktop-docker.json
├── grafana/
│ └── dashboards/
│ ├── iot-sensors.json
│ ├── infrastructure.json
│ ├── controller-events.json
│ └── telegraf-mcp-monitoring.json
├── docs/
│ ├── MCP_TOOLS.md # All 27 tools reference
│ ├── INSTALLATION.md # Setup guide
│ └── GRAFANA_DASHBOARDS.md # Dashboard reference
├── context/ # Telegraf documentation context files
├── Dockerfile
├── docker-compose.yml
├── package.json
└── tsconfig.jsonDevelopment
Build from Source
git clone https://github.com/dburton-influxdata/telegraf-controller-mcp-server.git
cd telegraf-controller-mcp-server
npm install
npm run buildTest with MCP Inspector
npm run inspector
# Opens browser-based MCP inspector at http://localhost:5173Test Manually
# Initialize the MCP server
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' \
| TELEGRAF_CONTROLLER_URL=http://localhost:8888 node build/index.js
# List all tools
echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
| TELEGRAF_CONTROLLER_URL=http://localhost:8888 node build/index.jsDocker Build
docker build -t telegraf-controller-mcp-server:dev .
# Test Docker image
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' \
| docker run -i --rm --network=host \
-e TELEGRAF_CONTROLLER_URL=http://localhost:8888 \
telegraf-controller-mcp-server:devTroubleshooting
"Cannot connect to Telegraf Controller"
# Check controller is running
curl http://localhost:8888/health
# Check from Docker (if MCP runs in Docker)
curl http://host.docker.internal:8888/health"No agents found"
Agents must send heartbeats to the Controller. Add to any Telegraf config:
[[outputs.http]]
url = "http://localhost:8889/agents/heartbeat"
method = "POST"
data_format = "json"
[outputs.http.headers]
Content-Type = "application/json"Verify heartbeats are arriving:
docker logs telegraf-controller 2>&1 | grep heartbeatMCP server not showing in Claude Desktop
Verify the path to
build/index.jsis absolute (not relative)Check JSON config syntax (no trailing commas)
Check Claude Desktop logs:
macOS:
~/Library/Logs/Claude/mcp*.logWindows:
%APPDATA%\Claude\logs\
Restart Claude Desktop completely
Related Resources
Telegraf Controller MCP Demo — Full IoT demo with sensor simulation, Grafana, and InfluxDB3
InfluxDB3 MCP Server — MCP server for InfluxDB v3
License
MIT — see LICENSE
Built by the InfluxData community · Report an issue
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dburton-influxdata/telegraf-controller-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server