Ops MCP for re8ch/qwen Public URLs: - Headlamp: https://headlamp.re8ch.com - Grafana: https://grafana.re8ch.com - Registry: https://registry.re8ch.com Authentication: - HTTP API and MCP both require Authorization: Bearer - You can also send X-Ops-Token: HTTP API: - GET /healthz - GET /api/me - GET /api/resources?kind=pods - GET /api/resources?kind=deployments - GET /api/resources?kind=services - GET /api/resources?kind=nodes - GET /api/resources?kind=podmetrics - GET /api/kubeconfig - GET /api/registry/info - GET /api/grafana/links - GET /api/grafana/access - GET /api/grafana/render?preset=errors - GET /api/metrics/summary - GET /api/secrets/refs - POST /api/secrets/database-credentials {"database":"qianwen_test"} - GET /api/secrets/web-logins - POST /api/restart {"deployment":"name"} - POST /api/k8s/proxy {"method":"GET","path":"/api/v1/namespaces//pods","kubeToken":"..."} - POST /api/postgres/query {"database":"qianwen_test","sql":"select now()","role":"app_ro"} - GET /api/admin/dex-users admin token required - GET /api/admin/dex-hash-instructions admin token required - POST /api/admin/generate-pg-tenant-database-plan admin token required - POST /api/admin/ensure-tenant-access admin token required - POST /api/admin/create-dex-user admin token required - POST /api/admin/grant-user-namespace admin token required - POST /api/admin/ensure-harbor-tenant admin token required - POST /api/admin/ensure-tenant-database-secrets admin token required - POST /api/admin/ensure-tenant-database-bundle admin token required MCP endpoint: - POST /mcp with JSON-RPC 2.0 - Supported methods: initialize, tools/list, tools/call Grafana for AI agents: - Prefer MCP tool get_tenant_metrics_summary for compact tenant health summaries. - Use MCP tool get_grafana_access only when the agent needs Grafana dashboard JSON or raw Grafana datasource query API. - get_grafana_access returns a Viewer-scoped Grafana service account token for this tenant org. - Use the returned token with: Authorization: Bearer - Dashboard discovery: GET https://grafana.re8ch.com/ui/api/search?type=dash-db - Dashboard JSON: GET https://grafana.re8ch.com/ui/api/dashboards/uid/ - Datasource query: POST https://grafana.re8ch.com/ui/api/ds/query with datasource uid tenant-metrics. - The tenant Grafana datasource still goes through the tenant metrics proxy, so arbitrary PromQL and cross-tenant queries are rejected. - Do not use human Grafana web passwords for AI agents. Recommended PostgreSQL routing: - Prefer tenant Secrets and the get_tenant_database_credentials tool instead of hardcoding database hosts. - Direct write/admin/migration SQL: pgwrite.zt.re8ch.com:5433. - Pooled app read/write direct PG: pgwrite.zt.re8ch.com:6432 when PgBouncer semantics fit the app. - Direct normal reads: pgread-sh.zt.re8ch.com:5434 or pgread-gz.zt.re8ch.com:5434, chosen by region and health. - CloudBeaver/DBeaver JDBC templates may use pgwrite.zt.re8ch.com:5432 for intentional instance-level GUI access, but do not treat 5432 as the HA write route. - Cloud functions should prefer the PostgREST HA gateway on :3080 for simple CRUD: Shanghai write/strong read http://10.181.22.186:3080, Shanghai read http://10.181.22.79:3080, Guangzhou read http://10.181.22.47:3080. - PostgreSQL 5432 is the instance port. It is useful for DBA inspection and some GUI clients, but the tenant default write route is 5433 or PgBouncer 6432. - For Ops MCP postgres_sql_proxy specifically, the default route is instancePrimaryName / pgwrite.zt.re8ch.com:5432 because it is a network reachability helper for external agents and current tenant roles authenticate reliably on that direct instance entry. Use explicit route only when you intentionally need to test 5433/5434/6432. Safety boundary: - Tenant namespace: qwen - Normal token writes are limited to restarting deployments in qwen. - Node access is read-only for topology and metrics. - Admin token can reconcile Dex static users and tenant RBAC. - k8s_api_proxy only forwards Kubernetes API paths. The caller-provided kubeToken controls Kubernetes RBAC; Ops MCP only solves public-to-ZT/K3s API reachability. - postgres_sql_proxy executes lightweight SQL from the Ops MCP network position. PostgreSQL username/password or tenant DB Secret role still controls database permissions; normal Ops tokens are limited to cataloged tenant databases.