Integration

Prometheus integration

Prometheus monitoring system HTTP API for querying time-series metrics, managing alerts, and inspecting targets. Execute PromQL instant and range queries, retrieve metadata, manage recording rules, and check service health.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in Prometheus.Built from the 25 Prometheus tools below, on the connection you add once.

Common Prometheus use cases

  • get flag programmatically
  • get rule programmatically
  • get alert programmatically
  • get config programmatically
  • get target programmatically
  • get tsdb stat programmatically
  • Build PromQL linters or editors
  • get build info programmatically
  • get label name programmatically
  • query exemplar programmatically

What you can do with Prometheus

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Query, 2 operations

  • format_queryFormat queryGETPrettify and format a PromQL expression into its canonical string form.
  • parse_queryParse queryGETParse a PromQL expression into its JSON AST representation. Experimental.

Series, 2 operations

  • delete_seriesDelete seriesPOSTDelete time series data matching the given label matchers within the specified time range. Requires --web.enable-admin-api flag. Data is not immediately removed; use clean_tombstones to reclaim space.
  • find_seriesFind seriesGETFind time series matching a set of label matchers. Returns the list of time series that match the given label sets. Use to discover which series exist for a given metric or label combination.

Alert, 1 operation

  • get_alertsGet alertsGETReturn a list of all active alerts including their labels, annotations, state, and active/firing times. Use to check current alert status and investigate firing alerts.

Alertmanager, 1 operation

  • get_alertmanagersGet alertmanagersGETReturn an overview of the current state of Prometheus Alertmanager discovery. Shows both active and dropped Alertmanager instances.

Build info, 1 operation

  • get_build_infoGet build infoGETReturn build information about the Prometheus server including version, revision, Go version, and build date.

Clean tombstone, 1 operation

  • clean_tombstonesClean tombstonesPOSTRemove deleted data from disk and clean up the TSDB tombstones. Requires --web.enable-admin-api flag. Run after delete_series to reclaim disk space.

Config, 1 operation

  • get_configGet configGETReturn the currently loaded Prometheus configuration as a YAML string. Use to verify configuration changes or inspect the active scrape and alerting configuration.

Exemplar, 1 operation

  • query_exemplarsQuery exemplarsGETReturn a list of exemplars for a given PromQL query. Exemplars are references to specific trace data points that represent a distribution of measurements. Useful for correlating metrics with traces.

Flag, 1 operation

  • get_flagsGet flagsGETReturn the flag values that Prometheus was configured with at launch. Includes all command-line flags and their current values.

Instant query, 1 operation

  • instant_queryInstant queryGETEvaluate a PromQL expression at a single point in time. Returns the current value of metrics matching the query. Use for real-time dashboards, threshold checks, and spot-checking metric values.

Label name, 1 operation

  • get_label_namesGet label namesGETReturn a list of all label names in the system. Use to discover available labels for building queries and understanding the metric label space.

Label value, 1 operation

  • get_label_valuesGet label valuesGETReturn a list of all values for a given label name. Use to discover possible values for a label when building queries or populating filter dropdowns.

Metric metadata, 1 operation

  • get_metric_metadataGet metric metadataGETReturn metadata about metrics currently scraped from targets. Includes metric type, help text, and unit information. Use to understand what a metric measures and its expected data type.

Range query, 1 operation

  • range_queryRange queryGETEvaluate a PromQL expression over a range of time, returning a matrix of time-series data points. Use for generating graphs, trend analysis, and historical metric exploration.

Rule, 1 operation

  • get_rulesGet rulesGETReturn a list of all alerting and recording rules that are currently loaded. Includes rule group names, evaluation intervals, and individual rule details with health status.

Runtime info, 1 operation

  • get_runtime_infoGet runtime infoGETReturn runtime information about the Prometheus server including Go version, OS, architecture, storage retention, and coroutine counts.

Scrape pool, 1 operation

  • get_scrape_poolsGet scrape poolsGETReturn a list of all configured scrape pool names.

Snapshot, 1 operation

  • create_snapshotCreate snapshotPOSTCreate a snapshot of all current TSDB data into the snapshots directory under the data directory. Requires --web.enable-admin-api flag. Returns the snapshot directory name.

Target, 1 operation

  • get_targetsGet targetsGETReturn an overview of the current state of all Prometheus target discovery. Shows active and dropped targets with their labels, scrape status, and health information.

Target metadata, 1 operation

  • get_target_metadataGet target metadataGETReturn metadata about metrics currently exposed by targets. Provides per-target metric type, help, and unit info. More granular than the global metadata endpoint.

Tsdb block, 1 operation

  • get_tsdb_blocksGet tsdb blocksGETReturn metadata about all currently loaded TSDB blocks. Experimental endpoint.

Tsdb stat, 1 operation

  • get_tsdb_statsGet tsdb statsGETReturn statistics about the Prometheus TSDB including number of series, chunks, head block info, and per-metric cardinality. Use to monitor storage usage and identify high-cardinality metrics.

Wal replay status, 1 operation

  • get_wal_replay_statusGet wal replay statusGETReturn information about the WAL (Write-Ahead Log) replay status. Shows replay progress including current segment, total segments, and read percentage. Useful during server startup.

Use Prometheus from Claude Code, Cursor or Codex

Connect Prometheus in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Prometheus operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect Prometheus

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect Prometheus once

    Add your Prometheus connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

Prometheus integration FAQ

What can you do with the Prometheus integration?

LiveContext exposes 25 operations on Prometheus, covering query, series, alert and alertmanager. Common uses include get flag programmatically, get rule programmatically and get alert programmatically.

Popular integrations

Browse the whole catalog