New MCP server that queries live Prometheus and Alertmanager HTTP APIs with 8 tools: list_alerts, get_alert, search_metrics, get_metric_metadata, query (PromQL), list_targets, list_silences, and create_silence. Extends the MCP core with ModeCustom and NewGenericServer for servers that don't require a database. Includes CLI with direct commands (alerts, query, targets, metrics), NixOS module, and comprehensive httptest-based tests. Bumps existing binaries to 0.2.1 due to shared internal/mcp change. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
TODO - Future Improvements
Usability
- Progress reporting during indexing ("Fetching nixpkgs... Parsing options... Indexing files...")
- Add
search_filesMCP tool - search for files by path pattern (e.g., find all nginx-related modules) - Include file size metadata in
get_optiondeclarations (byte size and/or line count) so clients know file sizes before fetching - Add range parameters to
get_file(offset,limit) with sensible defaults (~200-300 lines) to avoid dumping massive files
Robustness
- PostgreSQL integration tests with testcontainers (currently skipped without manual DB setup)
- Graceful handling of concurrent indexing (what happens if two clients index the same revision?)
New MCP Servers
nixpkgs-packages- Index and search nixpkgs packages (implemented innixpkgs-search packages)lab-monitoring- Query Prometheus and Alertmanager APIs (8 tools, no database required)
Nice to Have
- Option history/diff - compare options between two revisions ("what changed in services.nginx between 24.05 and 24.11?")
- Auto-cleanup - prune old revisions after N days or keep only N most recent
- Man page generation
- Shell completions (bash, zsh, fish)