feat: add lab-monitoring MCP server for Prometheus and Alertmanager
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>
This commit is contained in:
11
flake.nix
11
flake.nix
@@ -33,6 +33,13 @@
|
||||
mainProgram = "nixpkgs-search";
|
||||
description = "Search nixpkgs options and packages";
|
||||
};
|
||||
lab-monitoring = pkgs.callPackage ./nix/package.nix {
|
||||
src = ./.;
|
||||
pname = "lab-monitoring";
|
||||
subPackage = "cmd/lab-monitoring";
|
||||
mainProgram = "lab-monitoring";
|
||||
description = "MCP server for Prometheus and Alertmanager monitoring";
|
||||
};
|
||||
default = self.packages.${system}.nixpkgs-search;
|
||||
});
|
||||
|
||||
@@ -73,6 +80,10 @@
|
||||
imports = [ ./nix/hm-options-module.nix ];
|
||||
services.hm-options-mcp.package = lib.mkDefault self.packages.${pkgs.system}.hm-options;
|
||||
};
|
||||
lab-monitoring-mcp = { pkgs, ... }: {
|
||||
imports = [ ./nix/lab-monitoring-module.nix ];
|
||||
services.lab-monitoring.package = lib.mkDefault self.packages.${pkgs.system}.lab-monitoring;
|
||||
};
|
||||
default = self.nixosModules.nixpkgs-search-mcp;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user