1. Conduid
  2. AI
  3. Obs MCP
MCP server · AI

Obs MCP

MCP server to allow LLMs to interact with a running Prometheus, Thanos, Alertmanager and optionally Tempo, OpenTelemetry Collector and Loki instances via the API

Unclaimed Apache-2.0 ai
56Fair

Scored 3 days ago · breakdown

About Obs MCP

Obs MCP is an MCP server published by rhobs in the AI category: mCP server to allow LLMs to interact with a running Prometheus, Thanos, Alertmanager and optionally Tempo, OpenTelemetry Collector and Loki instances via the API.

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

Install

From source
git clone https://github.com/rhobs/obs-mcp

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 Obs MCP

Powered by Claude · Grounded in docs

I know everything about Obs MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 5 days 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.8.1v0.8.1 · 1 Oct 2026What's Changed fix: install Resolver when use_route is set in TOML by @slashpai in https://github.com/rhobs/obs-mcp/pull/207 chore: cut v0.8.1 by @slashpai in https://github.com/rhobs/obs-mcp/pull/208 Full Changelog:…
v0.8.0v0.8.0 · 30 Sep 2026What's Changed chore(deps): bump the github-actions group across 1 directory with 3 updates by @dependabot[bot] in https://github.com/rhobs/obs-mcp/pull/166 chore(deps): bump the go-dependencies group with 2 updates by @dependabot[bot] in…
v0.7.1v0.7.1 · 30 Jul 2026What's Changed fix: downgrade github.com/modelcontextprotocol/go-sdk to 1.6.1 by @slashpai in https://github.com/rhobs/obs-mcp/pull/188 chore: cut v0.7.1 by @slashpai in https://github.com/rhobs/obs-mcp/pull/189 Full Changelog:…
v0.7.0v0.7.0 · 30 Jul 2026What's Changed chore: use extracted tools.MustSchema in traces toolset by @andreasgerstmayr in https://github.com/rhobs/obs-mcp/pull/165 chore: refactor otelcol toolset to use Toolset API by @andreasgerstmayr in…
v0.6.0v0.6.0 · 15 Jul 2026What's Changed tempo_search_traces: add OTEL semconv to tool description by @andreasgerstmayr in https://github.com/rhobs/obs-mcp/pull/140 e2e: enable span metrics for traces by @andreasgerstmayr in…

README

obs mcp server

lint unit e2e docs

obs-mcp is an MCP server that lets LLMs query Prometheus or Thanos Querier and Alertmanager in Kubernetes. It optionally supports Loki for logs, Grafana Tempo for traces, and OpenTelemetry Collector configuration assistance. Enable additional toolsets with --toolsets (e.g., --toolsets observability/metrics,observability/logs,observability/traces,observability/otelcol).

[!NOTE] This project is moved from jhadvig/genie-plugin preserving the history of commits.

Quickstart

Run make help to see all available commands.

1. Using Kubeconfig (OpenShift)

The easiest way to get the obs-mcp connected to the cluster is via a kubeconfig:

  1. Login into your OpenShift cluster
  2. Run the server with
make run

Or directly:

go run ./cmd/obs-mcp/ --listen 127.0.0.1:9100 --auth-mode kubeconfig --insecure

This will auto-discover the metrics backend in OpenShift. By default, it tries thanos-querier route first, then falls back to prometheus-k8s route. Use --metrics-backend to control which route is preferred.

[!WARNING] kubeconfig auth mode requires a bearer token. Run oc whoami -t to verify you have one.

If it fails, either:

  • Re-login with: oc login --token=<token> or oc login -u user -p password
  • Use port-forwarding with --auth-mode header instead

Example using Prometheus as the preferred backend:

go run ./cmd/obs-mcp/ --listen 127.0.0.1:9100 --auth-mode kubeconfig --metrics-backend prometheus --insecure

Example using Thanos as the preferred backend:

[!NOTE]

Thanos versions before v0.40.0 do not expose the /api/v1/status/tsdb endpoint, so guardrails that rely on TSDB stats (max-metric-cardinality, disallow-blanket-regex with max-label-cardinality > 0) will fail. Use --guardrails=none or --guardrails='!tsdb' when using older Thanos versions. Thanos v0.40.0+ (#8484) added TSDB status support to the Query component, so guardrails should work if your cluster runs that version or later.

make run-no-guardrails

Or directly:

go run ./cmd/obs-mcp/ --listen 127.0.0.1:9100 --auth-mode kubeconfig --metrics-backend thanos --insecure --guardrails=none

[!IMPORTANT] How the Metrics Backend URL is Determined:

  1. PROMETHEUS_URL environment variable (if set, always used)
  2. --metrics-backend flag route discovery (only in kubeconfig mode)
  3. Default: http://localhost:9090

Example using explicit PROMETHEUS_URL:

PROMETHEUS_URL=https://thanos-querier.openshift-monitoring.svc:9091/ make run

[!IMPORTANT] How the Loki URL is determined (when observability/logs toolset is enabled):

  1. --loki-url flag
  2. LOKI_URL environment variable
  3. lokiNamespace/lokiName tool parameters for each MCP tool call (except loki_list_instances)

[!IMPORTANT] How the Tempo URL is determined (when observability/traces toolset is enabled):

  1. --traces.tempo-url flag
  2. TEMPO_URL environment variable
  3. tempoNamespace/tempoName tool parameters for each MCP tool call (except tempo_list_instances)

2. Port-forwarding alternative

Port-forwards prometheus-k8s-0:9090 to localhost and starts obs-mcp with header auth. Requires oc login:

make run-openshift-pf-prometheus

3. Local Development with Kind (using E2E test infrastructure)

Use the E2E test infrastructure for a fully working local environment with Prometheus:

Setup Kind cluster with Prometheus

make test-e2e-setup

This creates a Kind cluster with:

  • Prometheus Operator, Prometheus, and Alertmanager
  • Tempo Operator and a sample tracing application
  • Loki Operator and a test LokiStack

Build and deploy obs-mcp

make test-e2e-deploy

Port forward obs-mcp

kubectl port-forward -n obs-mcp svc/obs-mcp 9100:9100

To connect an MCP client, use http://localhost:9100/mcp.

When done:

make test-e2e-teardown

See TESTING.md for more details.

4. Using prometheus helm chart in local Kubernetes cluster

# add the prometheus-community Helm repo (once)
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update

# install Prometheus (and exporters) on your local cluster
helm install local prometheus-community/prometheus

# port-forward Prometheus server
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=prometheus,app.kubernetes.io/instance=local" -o jsonpath="{.items[0].metadata.name}") && kubectl --namespace default port-forward $POD_NAME 9090

go run ./cmd/obs-mcp/ --auth-mode header --insecure --listen :9100 

Testing with curl

You can test the MCP server using curl. The server uses JSON-RPC 2.0 over HTTP.

[!TIP] For formatted JSON output, pipe the response to jq:

curl ... | jq

List available tools:

[!NOTE] The default --toolsets value is observability/metrics only. Additional toolsets:

  • observability/logs - Loki log query tools (requires Loki URL or LokiStack discovery)
  • observability/traces - Tempo tracing tools (requires Tempo configuration)
  • observability/otelcol - OpenTelemetry Collector configuration assistance (no external dependencies)

Example: --toolsets observability/metrics,observability/logs,observability/traces,observability/otelcol

curl -X POST http://localhost:9100/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'|jq

Call the list_metrics tool:

curl -X POST http://localhost:9100/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_metrics","arguments":{}}}' | jq

Execute a range query (e.g., get up metrics for the last hour):

curl -X POST http://localhost:9100/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"execute_range_query","arguments":{"query":"up{job=\"prometheus\"}","step":"1m","end":"NOW","duration":"1h"}}}' | jq

Testing with MCP Inspector

Use the MCP Inspector to visually test and debug obs-mcp tools.

Using container compose

Kind
  1. Set up a Kind cluster with Prometheus and Alertmanager (if not already running):

    make test-e2e-setup
    
  2. Port-forward Prometheus and Alertmanager from your Kind cluster:

    kubectl port-forward -n monitoring pod/prometheus-k8s-0 9090:9090 &
    
    kubectl port-forward -n monitoring pod/alertmanager-main-0 9093:9093 &
    
OpenShift
  1. Port-forward Prometheus and Alertmanager from your OpenShift cluster:

    oc port-forward -n openshift-monitoring pod/prometheus-k8s-0 9090:9090 &
    
    oc port-forward -n openshift-monitoring pod/alertmanager-main-0 9093:9093 &
    
  2. Start obs-mcp and the Inspector (builds the obs-mcp container and starts both services via compose):

    make inspect
    

    This uses Docker by default. For podman, use:

    CONTAINER_CLI=podman make inspect
    
  3. Open the Inspector URL from the logs (includes the auth token):

    http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<token>
    
  4. Connect using Streamable HTTP transport to http://obs-mcp:8080/mcp

Documentation

Document Description
DEPLOYMENT.md Authentication modes, in-cluster deployment, configuration
TOOLS.md Available MCP tools
TESTING.md Testing guide
RELEASE.md Release process and versioning guidelines
CHANGELOG.md Notable changes per release
MCPChecker Evals Automated eval framework for tool verification
KUBE_MCP_SYNC.md /kube-mcp-sync skill for kubernetes-mcp-server compatibility

License

Apache 2.0

README fetched from the repository 5 days ago. The original is authoritative.

Questions

About Obs MCP

How do I install Obs MCP?

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

Is Obs MCP safe to use with an AI agent?

Its trust score is 56 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 Obs MCP still maintained?

Yes — the latest release is v0.8.1 (1 Oct 2026), and the last commit was 7 days ago. The repository has 13 stars and 14 open issues.