Add the Prometheus MCP server to Cursor
Config last verified Jun 1, 2026
The exact config to run Prometheus in Cursor — paste it in, restart, and the tools load.
Prerequisites
- Cursor installed.
- PROMETHEUS_URL — Base URL of your Prometheus-compatible HTTP API, e.g. http://localhost:9090.
Setup
1. Open ~/.cursor/mcp.json
2. Add this configuration
Add to ~/.cursor/mcp.json
~/.cursor/mcp.json
json
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:latest"
],
"env": {
"PROMETHEUS_URL": "<PROMETHEUS_URL>",
"PROMETHEUS_USERNAME": "<PROMETHEUS_USERNAME>",
"PROMETHEUS_PASSWORD": "<PROMETHEUS_PASSWORD>",
"PROMETHEUS_TOKEN": "<PROMETHEUS_TOKEN>",
"ORG_ID": "<ORG_ID>"
}
}
}
}3. Restart Cursor and confirm the Prometheus tools load.
Gotchas
Cursor keeps MCP servers under an "mcpServers" object in ~/.cursor/mcp.json for global use, and also reads a project-scoped .cursor/mcp.json so a repository can ship its own servers. Remote servers are configured with a bare "url" field and connect natively, with OAuth handled in-app when a server requires it.