MCP Directory

How to add Prometheus MCP Server to Windsurf

Run PromQL queries and analyze Prometheus metrics from any MCP client. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 15, 2026 · 340 · stdio · no auth

Windsurf config for Prometheus MCP Server

uvx prometheus-mcp-server
{
  "mcpServers": {
    "prometheus-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "PROMETHEUS_URL",
        "ghcr.io/pab1it0/prometheus-mcp-server:latest"
      ],
      "env": {
        "PROMETHEUS_URL": "<your-prometheus-url>"
      }
    }
  }
}

Requires Docker to be installed and running.

Setup steps

  1. 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the Prometheus MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5Prometheus MCP Server's tools become available to Cascade.

Before you start

  • A reachable Prometheus server URL, set via the PROMETHEUS_URL environment variable
  • Docker (recommended) — or Python 3.10+ with the uv package manager for a local install
  • An MCP-compatible client (Claude Desktop, VS Code, Cursor, Windsurf, etc.)
  • Optional credentials only if your Prometheus is secured: basic auth (PROMETHEUS_USERNAME/PASSWORD), bearer token (PROMETHEUS_TOKEN), mTLS client cert/key, or custom headers

What Prometheus MCP Server can do in Windsurf

execute_query

Run an instant PromQL query at a single point in time

execute_range_query

Run a PromQL range query over a start/end time with a step

list_metrics

List the metric names available in Prometheus

get_metric_metadata

Fetch metadata (type, help, unit) for a metric

get_targets

List scrape targets and their health/status

health_check

Check connectivity and health of the configured Prometheus server

Security

Read access to Prometheus exposes all scraped infrastructure and application metrics; restrict network reachability to the Prometheus endpoint and set basic-auth credentials if the server is exposed. PromQL queries can be expensive, so consider rate limits on the upstream.

Prometheus MCP Server + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Prometheus MCP Server config there under the "mcpServers" key and restart the client.

Is Prometheus MCP Server safe to use with Windsurf?

Read access to Prometheus exposes all scraped infrastructure and application metrics; restrict network reachability to the Prometheus endpoint and set basic-auth credentials if the server is exposed. PromQL queries can be expensive, so consider rate limits on the upstream.

Does it require authentication to Prometheus?

Only if your Prometheus is secured. It works with no auth by default, and supports basic auth, bearer token, mutual TLS, and custom headers via environment variables.

Can it run remotely instead of as a local stdio process?

Yes. Besides the default stdio transport it can serve HTTP or SSE (default 127.0.0.1:8080), including a stateless HTTP mode suited to multi-replica/Kubernetes deployments.

How do I connect to more than one Prometheus?

Run multiple instances and set the TOOL_PREFIX environment variable on each so their tool names don't collide in the client.

View repo Full Prometheus MCP Server page