Prometheus MCP

v1.6.1Monitoring & Observabilitystable

Enables AI assistants to execute PromQL queries and discover metrics within AWS Managed Prometheus (AMP) using SigV4 authentication. It provides tools for instant and range queries, label management, and metric discovery in secure, VPC-isolated envir

aidevopsllmmcpmodel-context-protocol
Share:
444
Stars
0
Downloads
0
Weekly
0/5

What is Prometheus MCP?

Prometheus MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai assistants to execute promql queries and discover metrics within aws managed prometheus (amp) using sigv4 authentication. it provides tools for instant and range queries, label management, ...

Enables AI assistants to execute PromQL queries and discover metrics within AWS Managed Prometheus (AMP) using SigV4 authentication. It provides tools for instant and range queries, label management, and metric discovery in secure, VPC-isolated envir

This server falls under the Monitoring & Observability category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables AI assistants to execute PromQL queries and discover

Use Cases

PromQL query execution
AWS Managed Prometheus integration
Metric discovery
pab1it0

Maintainer

LicenseMIT
Languagepython
Versionv1.6.1
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx prometheus-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Prometheus MCP

The Prometheus MCP Server enables AI assistants to query and explore Prometheus-compatible monitoring systems, including AWS Managed Prometheus (AMP) with SigV4 authentication, using natural language through the Model Context Protocol. It exposes tools for executing instant and range PromQL queries, listing and filtering available metrics with pagination, retrieving metric metadata, and inspecting scrape target health — all without requiring the user to know PromQL syntax. DevOps teams and SREs use it to let Claude investigate alerts, diagnose performance regressions, and build dashboards through conversational interaction rather than manual query crafting.

Prerequisites

  • A running Prometheus server or AWS Managed Prometheus workspace accessible from the machine running the MCP server
  • Docker installed (recommended deployment method) or Python 3.10+ for source-based installation
  • For AWS Managed Prometheus: AWS credentials configured with appropriate IAM permissions for AMP access
  • The PROMETHEUS_URL environment variable set to your Prometheus server endpoint
  • An MCP-compatible client such as Claude Desktop, Claude Code, VS Code, or Cursor
1

Pull the Docker image

The recommended way to run the server is via Docker, which avoids Python dependency management.

docker pull ghcr.io/pab1it0/prometheus-mcp-server:latest
2

Test the server locally

Run a quick test to confirm the server can connect to your Prometheus endpoint. Replace the URL with your actual Prometheus address.

docker run -i --rm -e PROMETHEUS_URL="http://your-prometheus:9090" ghcr.io/pab1it0/prometheus-mcp-server:latest
3

Configure authentication (if required)

For basic auth set PROMETHEUS_USERNAME and PROMETHEUS_PASSWORD. For bearer token auth set PROMETHEUS_TOKEN. For AWS Managed Prometheus, configure AWS credentials via the standard AWS credential chain.

export PROMETHEUS_URL=https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-xxx/
export PROMETHEUS_TOKEN=your-bearer-token
4

Add the server to Claude Code

Register the MCP server with Claude Code using the claude mcp add command, which writes the configuration automatically.

claude mcp add prometheus --env PROMETHEUS_URL=http://your-prometheus:9090 -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:latest
5

Configure Claude Desktop manually

If using Claude Desktop, add the server block to claude_desktop_config.json with your Prometheus URL and any authentication environment variables.

Prometheus MCP Examples

Client configuration

Claude Desktop configuration for the Prometheus MCP Server using Docker with URL and optional auth variables.

{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "PROMETHEUS_URL",
        "ghcr.io/pab1it0/prometheus-mcp-server:latest"
      ],
      "env": {
        "PROMETHEUS_URL": "http://your-prometheus:9090",
        "PROMETHEUS_USERNAME": "",
        "PROMETHEUS_PASSWORD": ""
      }
    }
  }
}

Prompts to try

Example prompts to explore Prometheus metrics through Claude once the MCP server is connected.

- "List all available metrics related to HTTP requests in Prometheus"
- "What is the current CPU usage across all nodes in the cluster?"
- "Show me the request rate for the payment-service over the last hour as a range query"
- "Which scrape targets are currently down or unhealthy?"
- "Find any metrics that have been above their warning threshold in the last 30 minutes"

Troubleshooting Prometheus MCP

Server starts but all queries return 'connection refused' or timeout errors

The Docker container runs in its own network namespace and cannot reach localhost on the host. Use your machine's LAN IP address or Docker host gateway (typically 172.17.0.1 on Linux) instead of localhost in PROMETHEUS_URL. On macOS/Windows Docker Desktop, use host.docker.internal.

AWS Managed Prometheus requests fail with 401 or 403 errors

AMP requires SigV4 request signing. Ensure the IAM role or user has the aps:QueryMetrics and aps:GetLabels permissions on the workspace. AWS credentials must be available via environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION) or an EC2/ECS instance profile.

list_metrics returns an empty list even though Prometheus has data

Some Prometheus instances impose query limits. Check that your PROMETHEUS_URL is correct and includes the full base path. If using a remote_write-only endpoint like Grafana Cloud, ensure you are pointing at the query endpoint (typically ending in /api/prom), not the write endpoint.

Frequently Asked Questions about Prometheus MCP

What is Prometheus MCP?

Prometheus MCP is a Model Context Protocol (MCP) server that enables ai assistants to execute promql queries and discover metrics within aws managed prometheus (amp) using sigv4 authentication. it provides tools for instant and range queries, label management, and metric discovery in secure, vpc-isolated envir It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Prometheus MCP?

Follow the installation instructions on the Prometheus MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Prometheus MCP?

Prometheus MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Prometheus MCP free to use?

Yes, Prometheus MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Monitoring & Observability MCP Servers

Explore all monitoring & observability servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Prometheus MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides