rhobs/obs-mcp
If you are the rightful owner of obs-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This is an MCP server designed to facilitate interaction between LLMs and a running Prometheus instance via its API.
obs mcp server
This is an mcp server to allow LLMs to interact with a running Prometheus instance via the API.
[!NOTE] This project is moved from jhadvig/genie-plugin preserving the history of commits.
Development Quickstart
The easiest way to get the obs-mcp connected to the cluster is via a kubeconfig:
- Log into your OpenShift cluster
- Run the server with
go run ./cmd/obs-mcp/ --listen 127.0.0.1:9100 --auth-mode kubeconfig --insecure
This will connect the obs-mcp to the thanos querier running in the cluster.
This procedure would not work if you're not using token-based auth (oc whoami -t to validate).
In that case, consider using serviceaccount + token auth. Alternatively, follow the procedure bellow.
[!NOTE] It is possible to hit the ground running locally as well:
helm install prometheus-community/prometheus --name-template <prefix> # sets up Prometheus (and exporters) on your local single-node k8s cluster
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=alertmanager,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
Port-forwarding alternative
This scenario opens a local port via port-forward that the obs-mcp will connect to:
-
Log into your OpenShift cluster
-
Port forward the OpenShift Thanos instance to a local port
PROM_POD=$(kubectl get pods -n openshift-monitoring -l app.kubernetes.io/instance=thanos-querier -o jsonpath="{.items[0].met
adata.name}")
kubectl port-forward -n openshift-monitoring $PROM_POD 9090:9090
- Run the server with
PROMETHEUS_URL=http://localhost:9090 go run ./cmd/obs-mcp/ --listen 127.0.0.1:9100 --auth-mode header