
Netdata
io.github.netdata由 GitHub 账号 netdata 发布v2.12.3更新于 Nov 4, 2026
Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
概览
Netdata 的 MCP 服务器让 AI 助手查询实时基础设施监控数据,包括节点、指标、告警、日志和异常检测。
- 可以做什么
- 发现节点及其硬件、操作系统、版本和流式拓扑信息
- 按 context、实例、维度和标签搜索指标,并列出可用的系统函数
- 以聚合和基于机器学习的异常检测查询指标,并对指标打分以做根因分析
- 读取活跃与已触发告警及完整的告警状态变更历史
- 在已连接的节点上执行 Netdata 函数并查看日志(需要 Netdata Parent)
- 适用场景
- 适合希望让助手排查基础设施健康状况、关联异常或解释告警的场景,前提是你已用 Netdata 监控相关服务器,而不想手工抄录仪表盘数字。
- 运行要求
- 远程端点 app.netdata.cloud(Streamable HTTP),或本地 Agent/Parent v2.6.0+ 的 19999 端口。云端访问需要 Netdata Cloud 账号(付费方案)、已认领到 Cloud 的节点,以及带 scope:mcp 的 API 令牌,通过 Authorization bearer 头传递。本地访问需要自动生成的 MCP API 密钥;仅支持 stdio 的客户端需借助 mcp-remote 或 nd-mcp 桥接。
安装
在 SourceWeft 中
- 打开 控制台中的 Netdata,将其添加到工作区。
- 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.netdata%2Fmcp-server/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"netdata": {
"type": "http",
"url": "https://app.netdata.cloud/api/v1/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
Netdata MCP
Model Context Protocol (MCP) works in two directions with Netdata:
- Netdata as an MCP server — AI assistants and clients (Claude, Cursor, VS Code, CLIs, and more) connect to Netdata to query your infrastructure. This page covers server setup; for per-client instructions see Supported AI Clients.
- Netdata as an MCP client — Netdata Cloud connects out to your own MCP servers (GitHub, PagerDuty, Atlassian, or any custom HTTPS MCP server) so Netdata AI can pull your team's institutional context into troubleshooting. See MCP Connections.
The rest of this page covers Netdata as an MCP server.
Netdata provides MCP servers that enable AI assistants to interact with your infrastructure monitoring data. You can connect via:
- Netdata Cloud — A single cloud-hosted endpoint at
https://app.netdata.cloud/api/v1/mcpwith full visibility across all your nodes. No bridges, no firewall changes. - Local Agent or Parent —
Connect directly to any Netdata Agent or Parent
(v2.6.0+) on your network at
http://YOUR_IP:19999/mcp.
Both options provide comprehensive access to all available observability data through MCP:
- Node Discovery - Hardware specifications, operating system details, version information, streaming topology, and associated metadata
- Metrics Discovery - Full-text search capabilities across contexts, instances, dimensions, and labels
- Function Discovery - Access to system functions including
processes,network-connections,streaming,systemd-journal,windows-events, etc. - Alert Discovery - Real-time visibility into active and raised alerts
- Metrics Queries - Complex aggregations and groupings with ML-powered anomaly detection
- Metrics Scoring - Root cause analysis leveraging anomaly detection and metric correlations
- Alert History - Complete alert transition logs and state changes
- Function Execution - Execute Netdata functions on any connected node (requires Netdata Parent)
- Log Exploration - Access logs from any connected node (requires Netdata Parent)
AI assistants have different visibility depending on where they connect:
Netdata Cloud MCP
Connect AI assistants to your entire Netdata Cloud infrastructure through a single MCP endpoint — no local setup, no bridges, no firewall changes.
Prerequisites
- Netdata Cloud account with a Paid plan
- API token with
scope:mcp— Create one in API Tokens settings - Nodes claimed to Netdata Cloud — The Cloud MCP server can only access nodes connected to your Netdata Cloud space
Endpoint
Transport: Streamable HTTP (stateless, works behind load balancers and CDNs)
Authentication
All requests to the Cloud MCP endpoint require a
Bearer token in the Authorization header:
Creating an API Token
- Log in to Netdata Cloud
- Click your profile picture in the bottom-left corner
- Select User Settings
- Navigate to the API Tokens section
- Create a new token with
scope:mcp - Copy and store the token securely — you won't be able to see it again
For more details, see API Tokens.
Connection Configuration
Claude Code (One-Line Setup)
If you're using Claude Code, you can register the Netdata Cloud MCP server from any session with a single command — no JSON editing required:
Replace YOUR_NETDATA_CLOUD_API_TOKEN with a token that has scope:mcp — see Creating an API Token above, or go directly to User Settings → API Tokens in Netdata Cloud.
Scope flags:
--scope user— available in all your projects on this machine (recommended for personal use)--scope local— this project only, private to you (default when--scopeis omitted)--scope project— this project, checked into.mcp.jsonand shared with your team (do not use with a raw token; reference an environment variable instead)
Useful companion commands:
Restart the Claude Code session after adding the server so the new tools load.
For more Claude Code options — including connecting to a local Netdata Agent or Parent — see the Claude Code guide.
Generic MCP Client (HTTP Transport)
For any MCP client that supports Streamable HTTP transport:
Clients Requiring stdio Bridge
For MCP clients that only support stdio transport, use npx mcp-remote as a bridge:
Replace YOUR_NETDATA_CLOUD_API_TOKEN with your
API token
(must have scope:mcp).
Cloud MCP Troubleshooting
Authentication Errors
- Verify your API token has
scope:mcp - Ensure the token is passed as
Authorization: Bearer <token>(not as a query parameter) - Check that your Netdata Cloud subscription includes a space in a Paid plan
No Nodes Visible
- Confirm your nodes are claimed to Netdata Cloud and appear in the web dashboard
- Check that agents are online and streaming to Cloud
Connection Issues
- The endpoint uses HTTPS — no
--allow-httpflag is needed - Test connectivity:
curl -H "Authorization: Bearer YOUR_TOKEN" https://app.netdata.cloud/api/v1/mcp
Local Agent or Parent MCP
Connect directly to any Netdata Agent or Parent on your network. All Netdata Agents and Parents (v2.6.0+) include a built-in MCP server at http://YOUR_IP:19999/mcp.
Netdata generates a local MCP API key automatically on startup. Authentication behavior depends on [web].bearer token protection:
- Bearer protection disabled (
no): anonymous MCP access works for non-sensitive operations (metrics, alerts, node info). The API key unlocks sensitive operations. - Bearer protection enabled (
yes): anonymous MCP access is rejected on all MCP transports (HTTP, SSE, WebSocket). The API key is required for all MCP requests. - Claiming required: the Agent accepts the API key only while it is claimed to Netdata Cloud. On an unclaimed Agent every key is rejected, so with bearer protection enabled MCP is unavailable.
- MCP only: the API key does not authorize the Agent's REST API (
/api/...). With bearer protection enabled, those endpoints still require a Cloud-issued bearer token.
Transport Options
Netdata implements the MCP protocol with multiple transport options:
- Direct Connection (v2.7.2+): AI clients that support HTTP or SSE transports can connect directly to Netdata
- Bridge Required: AI clients that only support stdio need the
nd-mcp(stdio-to-websocket) ormcp-remote(stdio-to-http or stdio-to-sse) bridge - Preferred authentication: pass the MCP API key via
Authorization: Bearer <mcp_key>. - Backward compatibility: WebSocket also accepts
?api_key=<mcp_key>. Keep this only for legacy clients, since URL query strings are more likely to be logged by proxies and tools. - Request limits: an HTTP or SSE request body can be about 1 MiB, and a WebSocket message up to 1 MiB (a larger one closes the connection with code 1009). A JSON-RPC batch can hold up to 64 requests. Once its responses reach 16 MiB, the remaining requests are not run: each valid request with an
idgets a-32001error, and a response that would cross the limit is replaced by that error too.
MCP Access Control in netdata.conf
Use a dedicated MCP ACL to control network-level MCP access independently from dashboard and streaming:
allow mcp fromcontrols/mcp,/sse, and MCP WebSocket protocol access.allow connections fromis still the global first gate for all features.- For internet-facing Parents, keep
allow mcp fromrestricted to trusted networks.
Official MCP Remote Client (mcp-remote)
If your AI client doesn't support HTTP/SSE directly and you don't want to use nd-mcp, you can use the official MCP remote client (requires Netdata v2.7.2+):
Note: The --allow-http flag is required for non-HTTPS connections. Only use this on trusted networks as traffic will not be encrypted.
Finding the nd-mcp Bridge
Note: With the new HTTP and SSE transports, many AI clients can now connect directly to Netdata without nd-mcp. Check your AI client's documentation to see if it supports direct HTTP or SSE connections.
The nd-mcp bridge is only needed for AI clients that:
- Only support
stdiocommunication (like some desktop applications) - Cannot use HTTP or SSE transports directly
- Cannot use
npx mcp-remote@latest
The nd-mcp bridge needs to be available on your desktop or laptop where your AI client runs. Since most users run Netdata on remote servers rather than their local machines, you have two options:
- If you have Netdata installed locally - Use the existing nd-mcp
- If Netdata is only on remote servers - Build nd-mcp on your desktop/laptop
Option 1: Using Existing nd-mcp
If you have Netdata installed on your desktop/laptop, find the existing bridge:
Linux
Common locations:
- Native packages (apt, yum, etc.):
/usr/sbin/nd-mcpor/usr/bin/nd-mcp - Static installations:
/opt/netdata/usr/bin/nd-mcp - Built from source:
/usr/local/netdata/usr/bin/nd-mcp
macOS
Windows
Option 2: Building nd-mcp for Your Desktop
If you don't have Netdata installed locally you can build just the nd-mcp bridge. Netdata provides three implementations - choose the one that best fits your environment:
-
Go bridge (recommended) - Go bridge source code
- Produces a single binary with no dependencies
- Creates executable named
nd-mcp(nd-mcp.exeon windows) - Includes both
build.shandbuild.bat(for Windows)
-
Node.js bridge - Node.js bridge source code
- Good if you already have Node.js installed
- Creates script named
nd-mcp.js - Includes
build.sh
-
Python bridge - Python bridge source code
- Good if you already have Python installed
- Creates script named
nd-mcp.py - Includes
build.sh
To build:
Important: When configuring your AI client, use the full absolute path to the executable:
- Go bridge:
/path/to/bridges/stdio-golang/nd-mcp - Node.js bridge:
/path/to/bridges/stdio-nodejs/nd-mcp.js - Python bridge:
/path/to/bridges/stdio-python/nd-mcp.py
Verify the Bridge Works
Once you have nd-mcp (either from existing installation or built), test it:
Using MCP Remote Client
The official MCP remote client (mcp-remote) is an alternative bridge that enables stdio-only AI clients to connect to Netdata's HTTP and SSE transports (requires Netdata v2.7.2+). Unlike nd-mcp which only supports WebSocket, mcp-remote provides broader transport compatibility.
When to Use MCP Remote
Use mcp-remote when:
- Your AI client only supports stdio communication
- You want to use HTTP or SSE transports instead of WebSocket
- You're running Netdata v2.7.2 or later
- You don't want to build/install nd-mcp
Installation
No installation required - mcp-remote runs via npx:
Transport Options
mcp-remote supports multiple transport strategies:
Common Options
Authentication
For Netdata MCP, pass the API key via the Authorization header:
Security Note: The --allow-http flag is required for non-HTTPS connections. Only use this on trusted networks as traffic will not be encrypted.
Troubleshooting
Connection Issues:
Clear Authentication State:
Spaces in Arguments:
Some AI clients (Cursor, Claude Desktop on Windows) have issues with spaces in arguments. Use environment variables as a workaround:
Version Management
Always use the latest version:
Or in AI client configurations:
For more details, see the official mcp-remote documentation.
Finding Your API Key
You need the MCP API key when bearer protection is enabled. When bearer protection is disabled, the key is still needed for sensitive functions like logs and live system information. Netdata automatically generates an API key on startup. The key is stored in a file on the Netdata server you want to connect to.
You need the API key of the Netdata you will connect to (usually a Netdata Parent).
Note: This temporary API key mechanism will eventually be replaced by integration with Netdata Cloud.
Find the API Key File
Copy the API Key
The file contains a UUID that looks like:
Copy this entire string - you'll need it for your AI client configuration.
No API Key File?
If the file doesn't exist:
- Ensure you have a recent version of Netdata
- Restart Netdata:
sudo systemctl restart netdata - Check the file again after restart
AI Client Configuration
AI clients can connect to Netdata MCP in different ways depending on their transport support:
Direct Connection (HTTP/SSE)
For AI clients that support HTTP or SSE transports:
Or for SSE:
Using nd-mcp Bridge (stdio)
For AI clients that only support stdio:
Using Official MCP Remote Client
Replace:
IP_OF_YOUR_NETDATA: Your Netdata instance IP/hostnameYOUR_API_KEY: The API key from the file mentioned above/usr/sbin/nd-mcp: With your actual nd-mcp path (if using the bridge)
Multiple MCP Servers
You can configure multiple Netdata instances:
Legacy Query String Support
For compatibility with older tooling, Netdata still accepts the ?api_key=YOUR_API_KEY query parameter on the /mcp endpoints. New integrations should prefer the Authorization: Bearer YOUR_API_KEY header, but the query-string form remains available if you are migrating gradually.
AI Client Specific Documentation
For detailed configuration instructions for specific AI clients, see:
Chat Clients:
- Claude Desktop - Anthropic's desktop AI assistant
- Cursor - AI-powered code editor
- Visual Studio Code - VS Code with MCP support
- JetBrains IDEs - IntelliJ, PyCharm, WebStorm, etc.
DevOps Copilots:
- Claude Code - Anthropic's CLI for Claude
- Gemini CLI - Google's Gemini CLI
- OpenAI Codex CLI - OpenAI's Codex CLI
- Crush - Charmbracelet's glamorous terminal AI
- OpenCode - SST's terminal-based AI assistant
Each guide includes specific transport support matrices and configuration examples optimized for that client.
来源:docs/netdata-ai/mcp/README.md,提交 ec13660
工具
0版本历史
6- v2.12.3最新Nov 4, 2026
- v2.12.2Oct 23, 2026
- v2.12.1Oct 8, 2026
- v2.12.0Sep 30, 2026
- v2.11.1Sep 16, 2026
- v2.11.0Sep 16, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分