drio
Open app

prometheus-mcp-server

Source

Catalog onlyCatalog onlySTDIO

Overview

Prometheus MCP Server is a Model Context Protocol (MCP) server designed to interact with Prometheus metrics and data, providing a bridge between Claude and your Prometheus server.

To use the Prometheus MCP Server, install it globally or locally using npm, or run it directly with npx. Configure it in Claude Desktop by adding the server configuration to the appropriate JSON file.

  • Instant Queries: Execute PromQL queries at a specific time. - Range Queries: Execute PromQL queries over a time period. - Series Discovery: Find series by label matchers. - Label Exploration: Get label names and values. - Metadata Access: Get metadata for metrics. - Target Information: Get information about scrape targets. - Alerts & Rules: Get information about alerts and recording rules. - Status Information: Get Prometheus server status information.
  1. Integrating Prometheus metrics with applications using the Model Context Protocol.
  2. Executing complex queries on Prometheus data for monitoring and analysis.
  3. Facilitating real-time data access for applications that require Prometheus metrics.

Add to your AI client

Use these steps to connect prometheus-mcp-server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "prometheus-mcp-server-weetime": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-weetime"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "prometheus-mcp-server-weetime": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-weetime"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "prometheus-mcp-server-weetime": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-weetime"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "prometheus-mcp-server-weetime": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-weetime"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "prometheus-mcp-server-weetime": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-weetime"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "prometheus-mcp-server-weetime": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-weetime"
      ]
    }
  }
}

FAQ

What is the required environment variable?

The server requires the `PROMETHEUS_HOST` environment variable, which is the base URL of your Prometheus instance.

Can I run the server without installation?

Yes! You can use npx to run the server without installing it globally.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2871,"uuid":"ca95c233-62e5-4ed5-8fde-6ba636949061","name":"prometheus-mcp-server","title":"prometheus-mcp-server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/8436592?v=4","created_at":"$D2025-03-15T13:58:01.766Z","updated_at":"$D2025-03-15T14:14:46.440Z","status":"created","author_name":"weetime","author_avatar_url":"https://avatars.githubusercontent.com/u/8436592?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/weetime/prometheus-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":"https://github.com/weetime/prometheus-mcp-server/raw/main/images/prometheus-mcp-server.jpg","type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-16 10:02:36\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]