@aaa-sentinel/mcp-server 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +6 -0
  2. package/dist/cli.js +61 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -117,6 +117,7 @@ status as plain JSON.
117
117
  | `get_cost_by_tags` | `accountId` | `reports:read` | Pro |
118
118
  | `get_multicloud_report` | — | `reports:read` | Pro |
119
119
  | `list_alerts` | `limit?` | `alerts:read` | Pro |
120
+ | `get_alert_policies` | `clientId?`, `accountId?` | `alerts:read` | Pro |
120
121
  | `list_disabled_rules` | — | `rules:read` | Pro |
121
122
  | `list_business_metrics` | — | `metrics:read` | Business |
122
123
  | `get_metric_values` | `metricId`, `billingPeriod` | `metrics:read` | Business |
@@ -137,12 +138,17 @@ status as plain JSON.
137
138
  | `get_agent_playbook` | `playbookId` | `agent:read` | Business |
138
139
  | `list_agent_playbook_templates` | — | `agent:read` | Business |
139
140
  | `list_monitors` | `pinned?`, `clientId?` | `monitoring:read` | Pro |
141
+ | `count_monitors_by_client` | — | `monitoring:read` | Pro |
140
142
  | `get_monitor` | `monitorId` | `monitoring:read` | Pro |
141
143
  | `list_monitor_results` | `monitorId`, `limit?`, `before?` | `monitoring:read` | Pro |
142
144
  | `get_monitor_uptime` | `monitorId`, `days?` | `monitoring:read` | Pro |
143
145
  | `list_monitoring_services` | — | `monitoring:read` | Pro |
144
146
  | `get_monitoring_service` | `serviceId` | `monitoring:read` | Pro |
145
147
  | `get_service_history` | `serviceId`, `limit?` | `monitoring:read` | Pro |
148
+ | `list_monitoring_incidents` | `state?`, `monitorId?`, `limit?`, `before?` | `monitoring:read` | Pro |
149
+ | `get_monitoring_incident` | `incidentId` | `monitoring:read` | Pro |
150
+ | `list_status_pages` | — | `monitoring:read` | Pro |
151
+ | `get_status_page` | `pageId` | `monitoring:read` | Pro |
146
152
 
147
153
  In `list_savings`, `type` is one of `compute`, `storage`, `network`, `database`, `serverless`,
148
154
  `governance`. `source` is one of `own`, `corroborated`, `securityhub`, `guardduty`, `defender`,
package/dist/cli.js CHANGED
@@ -4420,6 +4420,13 @@ var TOOLS = [
4420
4420
  argsSchema: external_exports.object({ limit: external_exports.number().int().min(1).max(100).optional() }),
4421
4421
  handler: async ({ limit }, config) => apiGet("/v1/alerts", { limit: asText(limit) }, config)
4422
4422
  }),
4423
+ defineTool({
4424
+ name: "get_alert_policies",
4425
+ description: "Get the alert policy in force for each source (cost, security, monitoring) at the organization, a managed client or an account, plus what that level sets itself: minimum severity, quiet hours, maintenance windows and escalation, the filters that decide whether an alert goes out. `channels` only limits delivery to the channels configured for the level, which this tool does not show. Pass clientId or accountId, not both; the organization and client levels need a token that sees the whole organization. Requires the alerts:read scope.",
4426
+ inputSchema: objectWith({ clientId: CLIENT_ID, accountId: ACCOUNT_ID }),
4427
+ argsSchema: external_exports.object({ clientId: external_exports.string().min(1).optional(), accountId: external_exports.string().min(1).optional() }),
4428
+ handler: async ({ clientId: clientId2, accountId }, config) => apiGet("/v1/alerts/policies", { clientId: clientId2, accountId }, config)
4429
+ }),
4423
4430
  defineTool({
4424
4431
  name: "list_disabled_rules",
4425
4432
  description: 'List the detection rules the customer has turned off, so you can tell "nothing found" apart from "that check is disabled". Requires the rules:read scope.',
@@ -4591,6 +4598,13 @@ var TOOLS = [
4591
4598
  argsSchema: external_exports.object({ pinned: external_exports.boolean().optional(), clientId: external_exports.string().min(1).optional() }),
4592
4599
  handler: async ({ pinned, clientId: clientId2 }, config) => apiGet("/v1/monitoring/monitors", { pinned: pinned ? "true" : void 0, clientId: clientId2 }, config)
4593
4600
  }),
4601
+ defineTool({
4602
+ name: "count_monitors_by_client",
4603
+ description: "Count the monitors and flows of each managed client, to rebill monitoring per client. Every client the token can see is listed, with zeros if it has none; the organization\u2019s own monitors do not count. Requires the monitoring:read scope and the Pro plan or above.",
4604
+ inputSchema: { type: "object", properties: {} },
4605
+ argsSchema: external_exports.object({}),
4606
+ handler: async (_args, config) => apiGet("/v1/monitoring/clients/counts", void 0, config)
4607
+ }),
4594
4608
  defineTool({
4595
4609
  name: "get_monitor",
4596
4610
  description: "Get one monitor with its definition, current state, since when, and last result (outcome, reason code, status code, latency). Requires the monitoring:read scope and the Pro plan or above.",
@@ -4645,15 +4659,61 @@ var TOOLS = [
4645
4659
  ),
4646
4660
  argsSchema: external_exports.object({ serviceId: external_exports.string().min(1), limit: external_exports.number().int().min(1).max(200).optional() }),
4647
4661
  handler: async ({ serviceId, limit }, config) => apiGet(`/v1/monitoring/services/${encodeURIComponent(serviceId)}/history`, { limit: asText(limit) }, config)
4662
+ }),
4663
+ defineTool({
4664
+ name: "list_monitoring_incidents",
4665
+ description: 'List monitoring incidents (each alerted outage, from when it started until it recovered), newest first, with duration, who acknowledged it and what it cost: the business impact per minute set on the monitor and, for cloud resources, an approximate cloud cost, in the organization currency. This answers "what is on fire and who is on it". Filter by state (open or resolved) or monitor. Paginated: pass the returned "nextCursor" as "before"; a page can come back short or empty with a cursor. Requires the monitoring:read scope and the Pro plan or above.',
4666
+ inputSchema: objectWith({
4667
+ state: { type: "string", enum: ["open", "resolved"], description: "Only open or only resolved incidents (optional)." },
4668
+ monitorId: { ...MONITOR_ID, description: "Only the incidents of this monitor (optional)." },
4669
+ limit: { type: "integer", minimum: 1, maximum: 200, description: "Page size (default 50)." },
4670
+ before: { type: "string", description: 'The "nextCursor" value of the previous page (optional).' }
4671
+ }),
4672
+ argsSchema: external_exports.object({
4673
+ state: external_exports.enum(["open", "resolved"]).optional(),
4674
+ monitorId: external_exports.string().min(1).optional(),
4675
+ limit: external_exports.number().int().min(1).max(200).optional(),
4676
+ before: external_exports.string().min(1).optional()
4677
+ }),
4678
+ handler: async ({ state, monitorId, limit, before }, config) => apiGet("/v1/monitoring/incidents", { state, monitorId, limit: asText(limit), before }, config)
4679
+ }),
4680
+ defineTool({
4681
+ name: "get_monitoring_incident",
4682
+ description: "Get one monitoring incident with its timeline (opened, re-alerted, acknowledged, notes, closed), its cause (reason code, status code, failed flow step) and what it cost in the organization currency. Requires the monitoring:read scope and the Pro plan or above.",
4683
+ inputSchema: objectWith({ incidentId: { type: "string", description: "Incident identifier, as returned by list_monitoring_incidents." } }, ["incidentId"]),
4684
+ argsSchema: external_exports.object({ incidentId: external_exports.string().min(1) }),
4685
+ handler: async ({ incidentId }, config) => apiGet(`/v1/monitoring/incidents/${encodeURIComponent(incidentId)}`, void 0, config)
4686
+ }),
4687
+ defineTool({
4688
+ name: "list_status_pages",
4689
+ description: "List the status pages (the public or link-only pages that show customers whether each service is up), with which client each belongs to, its services, language and custom domain, and how many more fit in the plan. A private page comes without its address: that link opens it for anyone. Requires the monitoring:read scope and the Pro plan or above.",
4690
+ inputSchema: objectWith({}),
4691
+ argsSchema: external_exports.object({}),
4692
+ handler: async (_args, config) => {
4693
+ const body = await apiGet("/v1/monitoring/status-pages", void 0, config);
4694
+ return { ...body, pages: (body.pages ?? []).map(withoutPrivateLink) };
4695
+ }
4696
+ }),
4697
+ defineTool({
4698
+ name: "get_status_page",
4699
+ description: "Get one status page: its settings and the step its custom domain is at, with the DNS records still to create. A private page comes without its address: that link opens it for anyone. Requires the monitoring:read scope and the Pro plan or above.",
4700
+ inputSchema: objectWith({ pageId: { type: "string", description: "Status page identifier, as returned by list_status_pages." } }, ["pageId"]),
4701
+ argsSchema: external_exports.object({ pageId: external_exports.string().min(1) }),
4702
+ handler: async ({ pageId }, config) => withoutPrivateLink(await apiGet(`/v1/monitoring/status-pages/${encodeURIComponent(pageId)}`, void 0, config))
4648
4703
  })
4649
4704
  ];
4705
+ function withoutPrivateLink(page) {
4706
+ if (page["visibility"] !== "private") return page;
4707
+ const { url: _url, ...rest } = page;
4708
+ return rest;
4709
+ }
4650
4710
  function findTool(name) {
4651
4711
  return TOOLS.find((tool) => tool.name === name);
4652
4712
  }
4653
4713
 
4654
4714
  // src/protocol.ts
4655
4715
  var SERVER_NAME = "aaa-sentinel-mcp";
4656
- var SERVER_VERSION = "0.3.0";
4716
+ var SERVER_VERSION = "0.5.0";
4657
4717
  var SUPPORTED_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26", "2024-11-05"];
4658
4718
  var PARSE_ERROR = -32700;
4659
4719
  var INVALID_REQUEST = -32600;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aaa-sentinel/mcp-server",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Read-only MCP server for AAA Sentinel: query cloud costs, savings, security posture, AI spend, uptime monitoring, the remediation agent and managed clients from an AI assistant",
5
5
  "license": "MIT",
6
6
  "type": "module",