Prometheus
A TypeScript-based MCP server that enables users to interact with Prometheus metrics using PromQL queries and discovery tools. It allows LLMs to retrieve time-series data, metadata, alerts, and system status directly from a Prometheus instance.
What is Prometheus?
Prometheus is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to typescript-based mcp server that enables users to interact with prometheus metrics using promql queries and discovery tools. it allows llms to retrieve time-series data, metadata, alerts, and system s...
A TypeScript-based MCP server that enables users to interact with Prometheus metrics using PromQL queries and discovery tools. It allows LLMs to retrieve time-series data, metadata, alerts, and system status directly from a Prometheus instance.
This server falls under the Monitoring & Observability category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A TypeScript-based MCP server that enables users to interact
Use Cases
Maintainer
Works with
Installation
NPM
npx -y prometheusManual Installation
npx -y prometheusConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Prometheus
The Prometheus MCP Server enables AI assistants to query and explore Prometheus monitoring systems using natural language, translating questions into PromQL queries and returning time-series data, metric metadata, alert states, recording rules, and scrape target information. DevOps and SRE teams can ask Claude 'show me CPU usage for the web tier over the last hour' or 'are there any firing alerts?' without needing to open the Prometheus UI or remember PromQL syntax. It connects to any Prometheus-compatible endpoint, including Thanos and VictoriaMetrics.
Prerequisites
- Node.js 18 or later installed
- npx available (ships with Node.js)
- A running Prometheus instance accessible from your machine (e.g., http://localhost:9090)
- An MCP client such as Claude Desktop or the Claude Code CLI
- Network access from the MCP server host to your Prometheus endpoint
Verify your Prometheus instance is reachable
Confirm you can reach the Prometheus API before configuring the MCP server.
curl http://your-prometheus-instance:9090/api/v1/status/configTest the server with npx
Run the server directly with npx to verify it starts correctly. Set PROMETHEUS_HOST to your Prometheus URL.
PROMETHEUS_HOST=http://localhost:9090 npx -y prometheus-mcp-serverConfigure Claude Desktop
Add the Prometheus MCP server to your Claude Desktop configuration, setting PROMETHEUS_HOST to your Prometheus instance URL.
{
"mcpServers": {
"prometheus": {
"command": "npx",
"args": ["-y", "prometheus-mcp-server"],
"env": {
"PROMETHEUS_HOST": "http://your-prometheus-instance:9090"
}
}
}
}Restart Claude Desktop
Fully quit and relaunch Claude Desktop so it loads the new MCP server configuration.
Verify with a test query
Open a new chat in Claude Desktop and ask it to query Prometheus metrics. The server exposes nine tools: instant_query, range_query, get_series, get_label_values, get_metadata, get_targets, get_alerts, get_rules, and get_status.
Prometheus Examples
Client configuration
Claude Desktop configuration for the Prometheus MCP server pointing to a local Prometheus instance.
{
"mcpServers": {
"prometheus": {
"command": "npx",
"args": ["-y", "prometheus-mcp-server"],
"env": {
"PROMETHEUS_HOST": "http://localhost:9090"
}
}
}
}Prompts to try
Example monitoring questions you can ask Claude with the Prometheus server connected.
- "Query the current CPU usage across all nodes using the node_cpu_seconds_total metric"
- "Show me HTTP request rate over the last 30 minutes for the api-gateway service"
- "Are there any currently firing Prometheus alerts?"
- "List all active scrape targets and their health status"
- "Get the range query for memory usage (node_memory_MemAvailable_bytes) over the last 6 hours with 5-minute resolution"Troubleshooting Prometheus
Connection refused or ECONNREFUSED when querying metrics
Verify that PROMETHEUS_HOST is set to the correct URL including protocol and port (e.g., http://localhost:9090). Test the endpoint with curl from the same machine where the MCP server runs.
Empty results from instant_query or range_query
Check that the metric name exists by using get_metadata or get_series first. Prometheus metric names are case-sensitive and must match exactly. Also verify the time range covers a period when data was being collected.
npx takes too long to start or times out
Pre-install the package globally to avoid download delays: 'npm install -g prometheus-mcp-server'. Then update the command in your config from 'npx' with args '['-y', 'prometheus-mcp-server']' to just 'prometheus-mcp-server' with empty args.
Frequently Asked Questions about Prometheus
What is Prometheus?
Prometheus is a Model Context Protocol (MCP) server that typescript-based mcp server that enables users to interact with prometheus metrics using promql queries and discovery tools. it allows llms to retrieve time-series data, metadata, alerts, and system status directly from a prometheus instance. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Prometheus?
Install via npm with the command: npx -y prometheus. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Prometheus?
Prometheus works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Prometheus free to use?
Yes, Prometheus is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Prometheus Alternatives — Similar Monitoring & Observability Servers
Looking for alternatives to Prometheus? 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 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?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.