MCP integration
Cursor
Wire Prometheus into Cursor via the project-level .cursor/mcp.json config.
Cursor supports the MCP protocol from version 0.43 onward. The config
file lives inside your project (not in user-global settings), which
keeps API keys out of dotfile syncs.
1. Create .cursor/mcp.json
In your project root, create the directory and file:
mkdir -p .cursor && touch .cursor/mcp.json
2. Add the prometheus server
{
"mcpServers": {
"prometheus": {
"command": "npx",
"args": ["-y", "@prometheus/context-mcp@latest"],
"env": {
"PROMETHEUS_API_KEY": "<your-api-key>",
"PROMETHEUS_WORKSPACE_ID": "<your-workspace-id>"
}
}
}
}
{
"mcpServers": {
"prometheus": {
"command": "npx",
"args": ["-y", "@prometheus/context-mcp@latest"],
"env": {
"PROMETHEUS_API_KEY": "${PROMETHEUS_API_KEY}",
"PROMETHEUS_WORKSPACE_ID": "${PROMETHEUS_WORKSPACE_ID}"
}
}
}
}
3. Reload Cursor
Cmd-Shift-P → Reload Window. Cursor reads the config on each
window load. The MCP server status shows up in the MCP panel
(Cmd-Shift-M).
What changes inside Cursor
The Agent panel now lists Prometheus tools. Agents can call them in their reasoning loops — particularly useful for grounding fixes in the actual call sites rather than hallucinated symbol names.
See MCP tools for the full surface.