1. Conduid
  2. Analytics
  3. yshngg/pmcp
MCP server · Analytics

yshngg/pmcp

A Prometheus Model Context Protocol Server.

Unclaimed Apache-2.0 prometheusaimcp
59Fair

Scored 7 hours ago · breakdown

About yshngg/pmcp

yshngg/pmcp is an MCP server published by yshngg in the Analytics category: a Prometheus Model Context Protocol Server.

The repository has 4 stars and 5 forks, with the last commit 3 days ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/yshngg/prometheus-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about yshngg/pmcp

Powered by Claude · Grounded in docs

I know everything about yshngg/pmcp. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 7 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.19.0v0.19.0
v0.18.0v0.18.0
v0.17.0v0.17.0
v0.16.1v0.16.1
v0.16.0v0.16.0

README

Prometheus MCP Server

codecov

A Go-based MCP server that exposes Prometheus query capabilities via the Model Context Protocol.

Installation

go install github.com/yshngg/prometheus-mcp-server@latest

Or pull the Docker image:

docker pull ghcr.io/yshngg/prometheus-mcp-server:latest

Usage

prometheus-mcp-server --prom-addr="http://localhost:9090"

Flags

Flag Default Description
-prom-addr http://localhost:9090 Prometheus server URL
-mcp-addr localhost:8080 MCP server listen address
-transport stdio stdio or http
-auth-token `` Bearer token for MCP endpoint authentication (optional)
-version Print version

Environment Variables

All flags can be set via environment variables: PROM_ADDR, MCP_ADDR, TRANSPORT, AUTH_TOKEN.

MCP Client Configuration

Add the following config to your MCP client:

{
  "mcpServers": {
    "prometheus": {
      "command": "prometheus-mcp-server",
      "args": ["--prom-addr", "http://localhost:9090"]
    }
  }
}

[!NOTE] Install the binary via go install github.com/yshngg/prometheus-mcp-server@latest or pull the Docker image with docker pull ghcr.io/yshngg/prometheus-mcp-server:latest.

If you don't have the binary installed, use Docker:

{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "ghcr.io/yshngg/prometheus-mcp-server:latest",
        "--prom-addr",
        "http://host.docker.internal:9090"
      ]
    }
  }
}

Client-specific configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "prometheus": {
      "command": "prometheus-mcp-server",
      "args": ["--prom-addr", "http://localhost:9090"]
    }
  }
}

With Docker:

{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "ghcr.io/yshngg/prometheus-mcp-server:latest",
        "--prom-addr",
        "http://host.docker.internal:9090"
      ]
    }
  }
}

Add to opencode.json (guide):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "prometheus": {
      "type": "local",
      "command": [
        "prometheus-mcp-server",
        "--prom-addr",
        "http://localhost:9090"
      ]
    }
  }
}

Run the server with HTTP transport:

prometheus-mcp-server --transport=http --mcp-addr="localhost:8080"

Then configure your client to use http://localhost:8080/mcp.

For authenticated access, set AUTH_TOKEN:

AUTH_TOKEN=my-token prometheus-mcp-server --transport=http

Your client must then include Authorization: Bearer my-token in requests to /mcp.

Tools

Expression: instant_query, range_query

Metadata: find_series_by_labels, list_label_names, list_label_values, target_metadata_query, metric_metadata_query

Discovery: target_discovery, alert_query, rule_query, alertmanager_discovery

TSDB Admin: tsdb_snapshot, delete_series, clean_tombstones

Management: health_check, readiness_check, reload, quit

Resources

The server exposes Prometheus data as URI-addressable resources under the prom:/// scheme:

URI Description
prom:///config Currently loaded configuration (YAML)
prom:///flags Command-line flag values
prom:///runtime-info Runtime information
prom:///build-info Build information
prom:///tsdb-stats TSDB cardinality statistics
prom:///wal-replay-stats WAL replay state

Resource Templates

URI templates for dynamic data access:

Template Description
prom:///api/v1/query?query={promql} Instant PromQL query result
prom:///api/v1/label/{name}/values Label values for a given label name

Prompts

Name Arguments Description
all-available-metrics prefix (optional) Lists all metric names in the Prometheus instance

License

Apache License 2.0

README fetched from the repository 7 hours ago. The original is authoritative.

Questions

About yshngg/pmcp

How do I install yshngg/pmcp?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is yshngg/pmcp safe to use with an AI agent?

Its trust score is 59 out of 100 (fair). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is yshngg/pmcp still maintained?

Yes — the last commit was 3 days ago. The repository has 4 stars and 5 forks and 4 open issues.