docs/netdata-ai/mcp/mcp-clients/vs-code.md
Configure Visual Studio Code extensions to access your Netdata infrastructure through MCP.
The most popular open-source AI code assistant with MCP support.
Autonomous coding agent that can use MCP tools.
VS Code extensions typically support stdio-based MCP servers:
| Transport | Support | Netdata Version | Use Case |
|---|---|---|---|
| stdio (via nd-mcp bridge) | ✅ Fully Supported | v2.6.0+ | Local bridge to WebSocket |
| stdio (via npx mcp-remote) | ✅ Fully Supported | v2.7.2+ | Alternative bridge with HTTP/SSE support |
| Streamable HTTP | ⚠️ Varies by Extension | v2.7.2+ | Check extension documentation |
| SSE (Server-Sent Events) | ⚠️ Varies by Extension | v2.7.2+ | Check extension documentation |
| WebSocket | ❌ Not Supported | - | Use nd-mcp bridge |
Note: Most VS Code extensions support stdio-based MCP servers. For HTTP/SSE connections to Netdata v2.7.2+, you can use npx mcp-remote bridge. For older Netdata versions (v2.6.0 - v2.7.1), use the nd-mcp bridge with WebSocket.
nd-mcp bridgenpx mcp-remote bridge for HTTP/SSE supportnd-mcp bridge - The stdio-to-websocket bridge for all Netdata versions. Find its absolute pathnpx mcp-remote@latest - Official MCP remote client supporting HTTP/SSE (requires Netdata v2.7.2+)export ND_MCP_BEARER_TOKEN="$(cat /var/lib/netdata/mcp_dev_preview_api_key)"
Connect to your entire Netdata Cloud infrastructure through a single endpoint — no local setup, bridges, or firewall changes needed.
Prerequisites:
scope:mcp
(create one)Add to .continue/mcpServers/netdata-cloud.yaml:
name: Netdata Cloud
version: 0.0.1
schema: v1
mcpServers:
- name: netdata-cloud
type: streamable-http
url: https://app.netdata.cloud/api/v1/mcp
requestOptions:
headers:
Authorization: Bearer YOUR_NETDATA_CLOUD_API_TOKEN
Cline only supports stdio and SSE transports.
Since Netdata Cloud MCP uses Streamable HTTP,
you need the mcp-remote bridge to convert
stdio to HTTP:
{
"mcpServers": {
"netdata-cloud": {
"command": "npx",
"args": [
"mcp-remote@latest",
"https://app.netdata.cloud/api/v1/mcp",
"--header",
"Authorization: Bearer YOUR_NETDATA_CLOUD_API_TOKEN"
],
"alwaysAllow": [],
"disabled": false
}
}
}
Replace YOUR_NETDATA_CLOUD_API_TOKEN with your
Netdata Cloud API token (must have scope:mcp).
For more details, see
Netdata Cloud MCP.
The following methods connect directly to a Netdata Agent or Parent on your network.
Claude-3.5-SonnetContinue stores MCP definitions as YAML or JSON blocks. The recommended flow is:
.continue/mcpServers/<name>.yamlContinue's reference guide documents the
typefield (stdio,sse, orstreamable-http) and block syntax (https://docs.continue.dev/customize/deep-dives/mcp).
Method 1: stdio launcher (all Netdata versions)
name: Netdata (nd-mcp)
version: 0.0.1
schema: v1
mcpServers:
- name: netdata
type: stdio
command: /usr/sbin/nd-mcp
args:
- ws://YOUR_NETDATA_IP:19999/mcp
Export ND_MCP_BEARER_TOKEN before launching Continue so nd-mcp can authenticate without embedding secrets in YAML.
Method 2: Direct SSE (Netdata v2.7.2+)
name: Netdata (SSE)
version: 0.0.1
schema: v1
mcpServers:
- name: netdata
type: sse
url: https://YOUR_NETDATA_IP:19999/mcp
requestOptions:
headers:
Authorization: Bearer ${NETDATA_MCP_API_KEY}
Method 3: Streamable HTTP (Netdata v2.7.2+)
name: Netdata (HTTP)
version: 0.0.1
schema: v1
mcpServers:
- name: netdata
type: streamable-http
url: https://YOUR_NETDATA_IP:19999/mcp
requestOptions:
headers:
Authorization: Bearer ${NETDATA_MCP_API_KEY}
Continue expands environment placeholders such as ${NETDATA_MCP_API_KEY} so you can keep API keys out of source control. After saving, reload the window to pick up the new server.
Press Ctrl+L to open Continue chat, then:
@netdata what's the current CPU usage?
@netdata show me memory trends for the last hour
@netdata are there any anomalies in the database servers?
Cline's official docs describe two workflows (https://docs.cline.bot/mcp/configuring-mcp-servers):
cline_mcp_settings.json and edit the underlying JSON.Stdio (nd-mcp)
{
"mcpServers": {
"netdata": {
"command": "/usr/sbin/nd-mcp",
"args": [
"ws://YOUR_NETDATA_IP:19999/mcp"
],
"alwaysAllow": [],
"disabled": false
}
}
}
SSE for Netdata v2.7.2+
{
"mcpServers": {
"netdata": {
"url": "https://YOUR_NETDATA_IP:19999/mcp",
"headers": {
"Authorization": "Bearer NETDATA_MCP_API_KEY"
},
"alwaysAllow": [],
"disabled": false
}
}
}
Optional fields such as
networkTimeout,alwaysAllow, andenvmap directly to Cline's UI controls. SSE and stdio are the two transports Cline supports today; pick the one that matches your Netdata deployment.
Example:
Create a Python script that checks Netdata for high CPU usage and sends an alert
Create a YAML file in your project's .continue/mcpServers/ directory (e.g., netdata-prod.yaml):
name: Netdata Production
version: 0.0.1
schema: v1
mcpServers:
- name: netdata-prod
type: stdio
command: /usr/sbin/nd-mcp
args:
- ws://prod-parent:19999/mcp
Different projects can have different Netdata connections:
~/projects/frontend/.continue/mcpServers/netdata.yaml → Frontend servers~/projects/backend/.continue/mcpServers/netdata.yaml → Backend servers~/projects/infrastructure/.continue/mcpServers/netdata.yaml → All serversℹ️ Export
ND_MCP_BEARER_TOKENwith the appropriate key before opening VS Code so the bridge picks up credentials without storing them in the YAML files.
Create custom VS Code commands that query Netdata:
{
"commands": [
{
"command": "netdata.checkHealth",
"title": "Netdata: Check System Health"
}
]
}
Add Netdata checks to tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "Check Production Metrics",
"type": "shell",
"command": "continue",
"args": [
"--ask",
"@netdata show current system status"
]
}
]
}
Create snippets that include metric checks:
{
"Check Performance": {
"prefix": "perf",
"body": [
"// @netdata: Current ${1:CPU} usage?",
"$0"
]
}
}
| Feature | Continue | Cline | Codeium | Copilot Chat |
|---|---|---|---|---|
| MCP Support | ✅ Full | ✅ Full | ❓ Check | ❓ Future |
| Autonomous Actions | ❌ | ✅ | ❌ | ❌ |
| Multiple Models | ✅ | ✅ | ❌ | ❌ |
| Free Tier | ❌ | ❌ | ✅ | ❌ |
| Open Source | ✅ | ✅ | ❌ | ❌ |
curl http://YOUR_NETDATA_IP:19999/api/v3/info@netdata is typed correctlyShare Netdata configurations:
.vscode/settings.json for project-specific configs