
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 分