drio
Open app

MCP Server for Prometheus

Source

A Model Context Protocol (MCP) server enabling LLMs to query, analyze, and interact with Prometheus databases through predefined routes.

Catalog onlyCatalog onlySTDIO

Overview

The Prometheus MCP Server is a Model Context Protocol (MCP) server designed to enable Large Language Models (LLMs) to query, analyze, and interact with Prometheus databases through predefined routes.

To use the Prometheus MCP Server, set up a Python virtual environment, install the required packages, and configure it to run either as a standalone server or with an MCP client like Claude. The server can be started using specific commands that point to your Prometheus database.

  • Data Retrieval: Fetch specific metrics or ranges of data from Prometheus. - Metric Analysis: Perform statistical analysis on retrieved metrics. - Usage Search: Explore metric usage patterns. - Complex Querying: Execute advanced PromQL queries for detailed data exploration.
  1. Automated analysis and reporting of system performance metrics.
  2. Real-time data querying for machine learning applications.
  3. Facilitating interactive querying sessions for data scientists to retrieve insights from metric databases.

Add to your AI client

Use these steps to connect MCP Server for Prometheus 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-caesaryangs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-caesaryangs"
      ]
    }
  }
}

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-caesaryangs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-caesaryangs"
      ]
    }
  }
}

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-caesaryangs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-caesaryangs"
      ]
    }
  }
}

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-caesaryangs": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-prometheus-mcp-server-caesaryangs"
      ]
    }
  }
}

Windsurf

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

~/.codeium/windsurf/mcp_config.json

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

Cline

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

Cline MCP Settings (via UI)

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

FAQ

What is the purpose of the MCP protocol?

The MCP protocol allows for structured interactions between LLMs and databases, making it easier to manage and analyze data.

Is there a specific environment needed to run the server?

Yes, it requires a Python virtual environment to manage dependencies properly.

How can I contribute to the project?

Contributions are welcome! You can fork the repository, create your feature branch, make your changes, and submit a pull request.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":71,"uuid":"410261c8-d9ee-453b-bcbd-b2ed9a3dd798","name":"prometheus_mcp_server","title":"MCP Server for Prometheus","description":"A Model Context Protocol (MCP) server enabling LLMs to query, analyze, and interact with Prometheus databases through predefined routes.","avatar_url":"https://avatars.githubusercontent.com/u/72857284?v=4","created_at":"$D2024-12-08T15:46:49.044Z","updated_at":"$D2024-12-13T07:47:00.049Z","status":"created","author_name":"CaesarYangs","author_avatar_url":"https://avatars.githubusercontent.com/u/72857284?v=4","tags":"prometheus,model-context-protocol","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/CaesarYangs/prometheus_mcp_server","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/95ebc53de50f7f15050f3a636d7b58c1aa1476a3f4994b79a9b16cade7901498/68747470733a2f2f736d6974686572792e61692f62616467652f4043616573617259616e67732f70726f6d6574686575735f6d63705f736572766572","type":null,"metadata":"{\"star\":\"23\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-04-05 14:16:19\"}","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"}]]}]