VS Code
Use one of the options below to add the prometheus-mcp server to VS Code.
1) One‑click install (recommended)
Open this link in VS Code Insiders (web) to add the server automatically:
This config runs the server in Docker and points it at Prometheus at http://host.docker.internal:9090
.
2) Manual add via settings.json
If you prefer to add it manually, configure your MCP servers in VS Code settings (JSON):
jsonc
{
"mcp.servers": {
"prometheus mcp server": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"brenoepics/prometheus-mcp:latest",
"--mcp",
"--prometheus-url", "http://host.docker.internal:9090"
]
}
}
}
Linux notes
host.docker.internal
may not resolve on some Linux setups. If so, either:- Use your host IP directly (e.g.,
http://127.0.0.1:9090
if Prometheus is on the host), or - Add
--add-host=host.docker.internal:host-gateway
todocker run
and keep the same URL.
- Use your host IP directly (e.g.,
Troubleshooting
- Make sure Prometheus is reachable at the URL you configured.
- Check the server logs (VS Code MCP output) for errors.
- See the general Installation and Docker docs for more options.