# Prometheus MCP for AI Agents AI Agent Connect

> Prometheus MCP for AI Agents. Connect your Prometheus instance to your AI agent to run PromQL queries, explore metrics, and troubleshoot infrastructure in real-time. Stop jumping between dashboards and start asking questions directly in your chat or editor.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_Z29iBDtEqGksZbbpEnduZ85NzRcrHrhZ5gOCKpq1/ai-agent-connect
- **Tags:** prometheus, promql, metrics, observability, monitoring, sre

## Description

Prometheus MCP lets you talk to your monitoring data instead of clicking through endless dashboards. If you're an engineer who spends too much time hunting for the right metric or trying to remember the exact syntax for a PromQL query, this changes your workflow. You can ask your agent to find specific spikes, check the health of your services, or look up metadata for your scraped targets. It handles the discovery of labels and the execution of complex queries so you can get straight to the answer. Because Vinkius hosts this Connector, you can connect it to your existing tools and start using it across your entire team's workflow. It turns your AI agent into a teammate that actually knows your infrastructure and can pull the data you need in seconds.

## Tools

### get_status_flags
Lists all the configured flag values for your current Prometheus instance.

### get_status_runtimeinfo
Shows the current runtime information to help you see how the system is behaving.

### get_status_tsdb
Provides TSDB cardinality statistics to help you monitor your storage health.

### create_snapshot
Creates a snapshot of all current data (requires admin API enabled).

### get_status_buildinfo
Shows the version and build details of your Prometheus instance.

### get_status_config
Pulls the current Prometheus configuration in YAML format so you can check your settings.

### get_label_values
Fetches all possible values for a specific label to help you filter your queries.

### get_labels
Lists all available label names across your environment for easier discovery.

### get_metadata
Retrieves metadata for specific metrics to show you units, types, and help text.

### query_range
Runs a PromQL expression over a specific time window to see historical trends.

### query
Executes a PromQL expression at a single point in time for an instant status check.

### find_series
Searches for time series that match your specific label selectors.

### clean_tombstones
Removes deleted data from the disk to save space (requires admin API enabled).

### delete_series
Deletes specific series within a time range to manage your data (requires admin API enabled).

## Prompt Examples

**Prompt:** 
```
Why is the api_latency spiking in the us-east region?
```

**Response:** 
```
I've analyzed the latency metrics for `us-east`. Here is the current status:

| Service | Avg Latency | Error Rate |
| :--- | :--- | :--- |
| auth-api | 450ms | 2.1% |
| gateway | 120ms | 0.5% |
| user-service | 890ms | 4.8% |

**Observation:** The `user-service` is showing a significant spike in both latency and errors over the last 10 minutes.
```

**Prompt:** 
```
What is the current status of our production targets?
```

**Response:** 
```
Checking the status of all production targets now:

- **Load Balancer**: Online
- **Auth Service**: Online
- **Payment Gateway**: Online
- **Search Indexer**: Degraded (High Latency)

Would you like me to run a range query on the Search Indexer to see the trend?
```

**Prompt:** 
```
Show me the average CPU usage for the last 30 minutes.
```

**Response:** 
```
I've pulled the CPU usage data for the last 30 minutes. 

- **Peak Usage**: 88% (at 14:22 UTC)
- **Average Usage**: 62%
- **Current Usage**: 45%

The load seems to have stabilized since the peak earlier this hour.
```

## Capabilities

### Run real-time PromQL queries
Ask your agent to execute complex PromQL expressions to get instant status updates.

### Explore labels and time series
Find specific metrics and discover available labels across your entire environment.

### Inspect metric metadata
Get details on units, types, and help text for any metric you're currently tracking.

### Perform admin maintenance
Manage your data by creating snapshots, deleting series, or cleaning tombstones.

### Check system configuration
View your current Prometheus configuration, flags, and runtime information.

## Use Cases

### Incident Response
An SRE asks why a pod is crashing. The agent uses `query` to find the error rate and identifies the failing service.

### Capacity Planning
A developer needs to see the last 24 hours of CPU usage. The agent uses `query_range` to pull the data.

### Metric Discovery
A new team member wants to know which labels are available for the web service. The agent uses `get_labels`.

### System Cleanup
A platform engineer needs to clear out old data to free up space. The agent uses `clean_tombstones`.

## Benefits

- Get instant answers to infrastructure questions without opening a browser.
- Troubleshoot production issues faster by using `query` for real-time status.
- Analyze historical trends quickly with `query_range` to spot patterns.
- Keep your TSDB healthy by using `clean_tombstones` and `delete_series` for maintenance.
- Discover new metrics easily using `get_labels` and `get_label_values` to find the right data.
- Audit your configuration with `get_status_config` and `get_status_flags` to ensure everything is set correctly.

## How It Works

The bottom line is you get a conversational interface for your entire Prometheus monitoring stack.

1. Subscribe to the Prometheus MCP on Vinkius.
2. Enter your Prometheus URL and any required auth tokens.
3. Ask your agent to query metrics or check system health.

## Frequently Asked Questions

**Can I use the Prometheus MCP with Claude?**
Yes, you can connect this Connector to Claude or any other MCP-compatible client like Cursor or Windsurf to query your metrics.

**Does this Connector require admin rights to work?**
Most query tools do not, but specific actions like deleting series or cleaning tombstones do require admin API access.

**How do I connect my Prometheus instance to the Connector?**
You just need to provide your Prometheus Server URL and an optional auth token in the setup configuration.

**Can it run complex PromQL queries?**
Yes, the agent can evaluate complex PromQL expressions for both real-time status and historical range queries.

**Is my monitoring data safe when using this Connector?**
The Connector only executes the specific queries your agent requests to fetch the data you ask for.

**What is the difference between query and query_range?**
The `query` tool gives you a snapshot at a single point in time, while `query_range` shows you data over a window of time.

**Can I use this to clean up my Prometheus storage?**
Yes, you can use the admin tools to delete specific series or clean tombstones to help manage your disk space.

**Can I run a PromQL query to get the current value of a metric?**
Yes. Use the `query` tool to evaluate any PromQL expression at a single point in time. This is perfect for checking current CPU usage, memory levels, or error rates.

**How do I see how a metric has changed over the last hour?**
Use the `query_range` tool. You can specify the `start` and `end` timestamps along with a `step` duration to retrieve historical data points for graphing or trend analysis.

**Can I perform administrative tasks like creating backups?**
Yes, if your Prometheus server has the Admin API enabled (`--web.enable-admin-api`), you can use the `create_snapshot` tool to create a snapshot of all current data on disk.