Prometheus MCP
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
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
Maintainer
Works with
Installation
Manual Installation
npx prometheus-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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:latestTest 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:latestConfigure 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-tokenAdd 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:latestConfigure 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.
Prometheus MCP Alternatives — Similar Monitoring & Observability Servers
Looking for alternatives to Prometheus MCP? Here are other popular monitoring & observability servers you can use with Claude, Cursor, and VS Code.
Netdata
★ 78.9kReal-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Kubeshark
★ 11.9keBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
Mission Control
★ 4.9kSelf-hosted AI agent orchestration platform: dispatch tasks, run multi-agent workflows, monitor spend, and govern operations from one mission control dashboard.
Grafana
★ 3.0kThis MCP server enables natural-language querying of Grafana logs by automatically detecting log sources and service labels. It provides read-only access to log data with intelligent caching for efficient repeat queries.
Sentrux
★ 2.4kReal-time architectural sensor that helps AI agents close the feedback loop, enabling recursive self-improvement of code quality. Pure Rust.
OpenInference
★ 986OpenTelemetry Instrumentation for AI Observability
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.
Set Up Prometheus MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.