VS Code
Configure Visual Studio Code extensions to access your Netdata infrastructure through MCP.
Available Extensions
Continue (Recommended)
The most popular open-source AI code assistant with MCP support.
Cline
Autonomous coding agent that can use MCP tools.
Prerequisites
- VS Code installed - Download VS Code
- MCP-compatible extension - Install from VS Code Marketplace
- The IP and port (usually 19999) of a running Netdata Agent - Prefer a Netdata Parent to get infrastructure level visibility. Currently the latest nightly version of Netdata has MCP support (not released to the stable channel yet). Your AI Client (running on your desktop or laptop) needs to have direct network access to this IP and port.
nd-mcp
program available on your desktop or laptop - This is the bridge that translatesstdio
towebsocket
, connecting your AI Client to your Netdata Agent or Parent. Find its absolute path- Optionally, the Netdata MCP API key that unlocks full access to sensitive observability data (protected functions, full access to logs) on your Netdata. Each Netdata Agent or Parent has its own unique API key for MCP - Find your Netdata MCP API key
Continue Extension Setup
Installation
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Continue"
- Install the Continue extension
- Reload VS Code
Configuration
- Open Command Palette (Ctrl+Shift+P)
- Type "Continue: Open config.json"
- Add Netdata MCP configuration:
{
"models": [
{
"title": "Claude 3.5 Sonnet",
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"apiKey": "YOUR_ANTHROPIC_KEY"
}
],
"mcpServers": {
"netdata": {
"command": "/usr/sbin/nd-mcp",
"args": [
"ws://YOUR_NETDATA_IP:19999/mcp?api_key=NETDATA_MCP_API_KEY"
]
}
}
}
Replace:
/usr/sbin/nd-mcp
- With your actual nd-mcp pathYOUR_NETDATA_IP
- IP address or hostname of your Netdata Agent/ParentNETDATA_MCP_API_KEY
- Your Netdata MCP API keyYOUR_ANTHROPIC_KEY
- Your Anthropic API key
Usage
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 Extension Setup
Installation
- Search for "Cline" in Extensions
- Install and reload VS Code
Configuration
- Open Settings (Ctrl+,)
- Search for "Cline MCP"
- Add configuration:
{
"cline.mcpServers": [
{
"name": "netdata",
"command": "/usr/sbin/nd-mcp",
"args": [
"ws://YOUR_NETDATA_IP:19999/mcp?api_key=NETDATA_MCP_API_KEY"
]
}
]
}
Usage
- Open Cline (Ctrl+Shift+P → "Cline: Open Chat")
- Cline can autonomously:
- Analyze performance issues
- Create monitoring scripts
- Debug based on metrics
Example:
Create a Python script that checks Netdata for high CPU usage and sends an alert
Multiple Environments
Workspace-Specific Configuration
Create .vscode/settings.json
in your project:
{
"continue.mcpServers": {
"netdata-prod": {
"command": "/usr/sbin/nd-mcp",
"args": ["ws://prod-parent:19999/mcp?api_key=PROD_NETDATA_MCP_API_KEY"]
}
}
}
Environment Switching
Different projects can have different Netdata connections:
~/projects/frontend/.vscode/settings.json
→ Frontend servers~/projects/backend/.vscode/settings.json
→ Backend servers~/projects/infrastructure/.vscode/settings.json
→ All servers
Advanced Usage
Custom Commands
Create custom VS Code commands that query Netdata:
{
"commands": [
{
"command": "netdata.checkHealth",
"title": "Netdata: Check System Health"
}
]
}
Task Integration
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"]
}
]
}
Snippets with Metrics
Create snippets that include metric checks:
{
"Check Performance": {
"prefix": "perf",
"body": [
"// @netdata: Current $\{1:CPU} usage?",
"$0"
]
}
}
Extension Comparison
Feature | Continue | Cline | Codeium | Copilot Chat |
---|---|---|---|---|
MCP Support | ✅ Full | ✅ Full | ❓ Check | ❓ Future |
Autonomous Actions | ❌ | ✅ | ❌ | ❌ |
Multiple Models | ✅ | ✅ | ❌ | ❌ |
Free Tier | ❌ | ❌ | ✅ | ❌ |
Open Source | ✅ | ✅ | ❌ | ❌ |
Troubleshooting
Extension Not Finding MCP
- Restart VS Code after configuration
- Check extension logs (Output → Continue/Cline)
- Verify JSON syntax in settings
Connection Issues
- Test Netdata:
curl http://YOUR_NETDATA_IP:19999/api/v3/info
- Check bridge is executable
- Verify network access from VS Code
No Netdata Option
- Ensure
@netdata
is typed correctly - Check MCP server is configured
- Try reloading the window (Ctrl+R)
Performance Problems
- Use local Netdata Parent for faster response
- Check extension memory usage
- Disable unused extensions
Best Practices
Development Workflow
- Start coding with infrastructure context
- Check metrics before optimization
- Validate changes against production data
- Monitor impact of deployments
Team Collaboration
Share Netdata configurations:
- Commit
.vscode/settings.json
for project-specific configs - Document which Netdata Parent to use
- Create team snippets for common queries
Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.