Prometheus MCP Server
Provides tools for querying Prometheus metrics, including instant and range queries, scrape targets, alerting rules, cluster health diagnostics, node and namespace diagnosis, top resource consumers, and pod investigation.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Prometheus MCP Server (Go)
A Model Context Protocol (MCP) server for Prometheus integration. Native Go binary with built-in Kubernetes connectivity via client-go.
Installation
npx
npx -y mcp-prometheus@latestMCP Client Configuration
Add to your MCP client configuration (VS Code, Cursor, Windsurf, etc.):
{
"mcpServers": {
"prometheus": {
"command": "npx",
"args": ["-y", "mcp-prometheus@latest"],
"env": {
"PROMETHEUS_URL": "http://localhost:9090"
}
}
}
}VS Code
code --add-mcp '{"name":"prometheus","command":"npx","args":["-y","mcp-prometheus@latest"],"env":{"PROMETHEUS_URL":"http://localhost:9090"}}'Kubernetes Auto-Connect
Automatically connects to Prometheus running in OpenShift/Kubernetes via the K8S API service proxy. Uses native kubeconfig/in-cluster config via client-go. No kubectl or port-forwarding required.
Default: openshift-monitoring/prometheus-operated:9090
{
"mcpServers": {
"prometheus": {
"command": "npx",
"args": ["-y", "mcp-prometheus@latest"]
}
}
}Binary
Download from GitHub Releases or build from source:
make build
./mcp-prometheusRelated MCP server: Prometheus MCP Server
Configuration
Environment Variables
Variable | Description |
| Direct Prometheus API URL (overrides K8S auto-connect) |
CLI Flags
Flag | Description | Default |
| Direct Prometheus URL | - |
| Kubernetes namespace |
|
| Kubernetes service name |
|
| Kubernetes service port |
|
| Service scheme (http/https) |
|
| Path to kubeconfig file | auto-detect |
Precedence: --url / PROMETHEUS_URL > K8S auto-connect
Connection strategy:
Direct URL (if
--urlorPROMETHEUS_URLis set)K8S API proxy (auto-detect kubeconfig or in-cluster config)
Tools (11)
Basic Queries
Tool | Description |
| Execute a PromQL instant query |
| Execute a PromQL range query over time |
| Get scrape targets status |
| Get alerting and recording rules |
| Get server version and runtime info |
Cluster Diagnostics
Tool | Description |
| Comprehensive cluster health overview |
| Diagnose a specific node's health |
| Diagnose a namespace's health |
Resource Analysis
Tool | Description |
| Top CPU/memory/network consumers |
| Deep investigation of a specific pod |
| Compare metrics between two time periods |
Example Prompts
"What's the current CPU usage across all nodes?"
"Show me the cluster health overview"
"Which pods are using the most memory?"
"Diagnose node worker-1"
"Are all scrape targets healthy?"
"Compare CPU usage now vs 24 hours ago"
"Investigate pod my-app in namespace production"
"What alerting rules are defined?"Development
Build
make build # Build for current platform
make build-all-platforms # Cross-compile for all platformsContainer
podman build -f Containerfile -t mcp-prometheus .Kubernetes / OpenShift Deployment
Container Image
The container image is available on GitHub Container Registry:
ghcr.io/jeanlopezxyz/mcp-prometheus:latestHelm Chart
Deploy using the included Helm chart:
# Add the chart repository (or use local chart)
helm upgrade --install mcp-prometheus ./charts/mcp-prometheus \
--namespace mcp-servers \
--create-namespace \
--set openshift=trueHelm Values
Parameter | Description | Default |
| Container registry |
|
| Image repository |
|
| Image tag |
|
| Enable OpenShift Routes |
|
| Service port |
|
| Prometheus namespace |
|
| Prometheus service name |
|
| Use cluster-reader role |
|
Example with custom Prometheus
helm upgrade --install mcp-prometheus ./charts/mcp-prometheus \
--namespace mcp-servers \
--set openshift=true \
--set prometheus.url=http://prometheus.monitoring:9090License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your app's logs, metrics and incidents from your AI assistant.
Manage uptime monitors and incidents and search logs, metrics and traces from an AI assistant.
Query, explore, and manage your databases through natural conversation.
Ask your databases questions in plain English, run read-only SQL and set up data alerts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interactive Kubernetes cluster monitoring and troubleshooting through natural language queries. Users can diagnose pod issues, check service status, and investigate cluster problems using conversational AI.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query Prometheus metrics, monitor alerts, and analyze system health through read-only access to your Prometheus server with built-in query safety and optional AI-powered metric analysis.MIT
- AlicenseNot gradedqualityBmaintenanceEnables natural language Kubernetes operations, including smart resource queries, pod root-cause analysis, cross-environment diffs, and manifest generation.MIT
- AlicenseBqualityCmaintenanceEnables read-only, stack-aware diagnostics for microservices on Kubernetes, turning debugging runbooks into conversational tools that investigate slow requests, changes, leaks, and in-pod conditions without exposing cluster credentials.57Apache 2.0