TODO: Monitoring Stack MCP API Surface
TODO: Monitoring Stack MCP API Surface
Scope for potential MCP server wrapping Grafana + Prometheus + Alertmanager APIs. Agents could use this for self-diagnosis: verify deployments are scraped, dashboards exist, alerts are firing, metrics are flowing.
Grafana HTTP API (~25 OSS categories)
| # | Category | Agent Value |
|---|---|---|
| 1 | Admin API | Low |
| 2 | Alerting API (unstable) | High — check active alerts |
| 3 | Alerting Provisioning API | Medium — manage alert rules |
| 4 | Annotations API | Medium — mark deploy events |
| 5 | Correlations API | Low |
| 6 | Dashboard API | High — verify dashboard exists, get JSON |
| 7 | Dashboard Permissions API | Low |
| 8 | Dashboard Versions API | Medium — rollback dashboards |
| 9 | Data Source API | High — verify Prometheus datasource healthy |
| 10 | Folder API | Low |
| 11 | Folder Permissions API | Low |
| 12 | Folder/Dashboard Search API | High — find dashboards by name/tag |
| 13 | Library Element API | Low |
| 14 | Organization API | Low |
| 15 | Other API (health, frontend settings) | Medium — health check |
| 16 | Playlists API | Low |
| 17 | Preferences API | Low |
| 18 | Shared Dashboards API | Low |
| 19 | Query History API | Low |
| 20 | Service Account API | Medium — manage API keys |
| 21 | Short URL API | Low |
| 22 | Snapshot API | Low |
| 23 | SSO Settings API | Low |
| 24 | Team API | Low |
| 25 | User API | Low |
Prometheus HTTP API (30 endpoints)
| Category | Endpoint | Method | Agent Value |
|---|---|---|---|
| Query | <code>/api/v1/query</code> | GET/POST | High — run PromQL, verify metrics exist |
| Query | <code>/api/v1/query_range</code> | GET/POST | High — time-range queries |
| Query | <code>/api/v1/format_query</code> | GET/POST | Low |
| Query | <code>/api/v1/parse_query</code> | GET/POST | Low (experimental) |
| Metadata | <code>/api/v1/series</code> | GET/POST | Medium — find time series by label |
| Metadata | <code>/api/v1/labels</code> | GET/POST | Medium — list label names |
| Metadata | <code>/api/v1/label/{name}/values</code> | GET | Medium — list label values (e.g., all repos) |
| Metadata | <code>/api/v1/query_exemplars</code> | GET/POST | Low (experimental) |
| Targets | <code>/api/v1/targets</code> | GET | High — verify scrape targets UP/DOWN |
| Targets | <code>/api/v1/scrape_pools</code> | GET | Medium — list scrape pools |
| Targets | <code>/api/v1/targets/metadata</code> | GET | Medium — metric metadata per target |
| Targets | <code>/api/v1/targets/relabel_steps</code> | GET | Low (experimental) |
| Rules | <code>/api/v1/rules</code> | GET | High — alerting + recording rules |
| Alerts | <code>/api/v1/alerts</code> | GET | High — active alerts |
| Status | <code>/api/v1/status/config</code> | GET | Medium — loaded config |
| Status | <code>/api/v1/status/flags</code> | GET | Low |
| Status | <code>/api/v1/status/runtimeinfo</code> | GET | Medium — memory, goroutines, uptime |
| Status | <code>/api/v1/status/buildinfo</code> | GET | Low |
| Status | <code>/api/v1/status/tsdb</code> | GET | Medium — cardinality stats |
| Status | <code>/api/v1/status/tsdb/blocks</code> | GET | Low (experimental) |
| Status | <code>/api/v1/status/walreplay</code> | GET | Low |
| Admin | <code>/api/v1/admin/tsdb/snapshot</code> | POST/PUT | Low (requires flag) |
| Admin | <code>/api/v1/admin/tsdb/delete_series</code> | POST/PUT | Low (requires flag) |
| Admin | <code>/api/v1/admin/tsdb/clean_tombstones</code> | POST/PUT | Low (requires flag) |
| Integration | <code>/api/v1/alertmanagers</code> | GET | Medium — alertmanager discovery |
| Integration | <code>/api/v1/metadata</code> | GET | Medium — metric metadata |
| Integration | <code>/api/v1/write</code> | POST | Low (remote write) |
| Integration | <code>/api/v1/otlp/v1/metrics</code> | POST | Low (OTLP receiver) |
| Notifications | <code>/api/v1/notifications</code> | GET | Medium — server notifications |
| Features | <code>/api/v1/features</code> | GET | Low |
Alertmanager API
| Endpoint | Method | Agent Value |
|---|---|---|
| <code>/-/healthy</code> | GET/HEAD | Medium — health check |
| <code>/-/ready</code> | GET/HEAD | Medium — readiness check |
| <code>/-/reload</code> | POST | Low — config reload |
| {"html" => "<em>v2 API (alerts CRUD, silences, receivers, status) — needs further scoping</em>", "colspan" => 3} |
High-Value Agent Diagnostic Subset
If we build an MCP server, start with these ~8 endpoints:
- Prometheus
/query— run PromQL - Prometheus
/targets— scrape health - Prometheus
/alerts— active alerts - Prometheus
/rules— alert/recording rules - Grafana dashboard search — find dashboards
- Grafana dashboard get — get dashboard JSON
- Grafana datasource health — verify datasource connectivity
- Grafana alerting — check alert states
Related
plan-2026-02-25-platform-observability— parent observability planplan-2026-03-01-dora-metrics-dashboard— DORA dashboard uses these APIs