@aaa-sentinel/mcp-server 0.24.0 → 0.26.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.
- package/README.md +2 -0
- package/dist/cli.js +29 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -166,6 +166,8 @@ status as plain JSON.
|
|
|
166
166
|
| `get_environment_cost` | `env` | `leases:read` | Pro |
|
|
167
167
|
| `list_owner_sources` | — | `owners:read` | Business |
|
|
168
168
|
| `get_team_costs` | — | `owners:read` | Business |
|
|
169
|
+
| `get_tag_policy` | `clientId?` | `tagging:read` | Pro |
|
|
170
|
+
| `get_tag_coverage` | `period?` | `reports:read` | Business |
|
|
169
171
|
|
|
170
172
|
In `list_savings`, `type` is one of `compute`, `storage`, `network`, `database`, `serverless`,
|
|
171
173
|
`governance`; it returns the 50 largest, not paginated (`count` and `hasMore` say whether there are
|
package/dist/cli.js
CHANGED
|
@@ -6029,9 +6029,20 @@ async function requestToken(config2) {
|
|
|
6029
6029
|
await sleepImpl(delay);
|
|
6030
6030
|
continue;
|
|
6031
6031
|
}
|
|
6032
|
-
|
|
6032
|
+
const code = await errorCode(response);
|
|
6033
|
+
const why = code ? TOKEN_REFUSALS[code] : void 0;
|
|
6034
|
+
throw new ApiError(response.status, `Could not obtain an access token (HTTP ${response.status}${code ? ` ${code}` : ""})${why ? `: ${why}` : ""}`);
|
|
6033
6035
|
}
|
|
6034
6036
|
}
|
|
6037
|
+
var TOKEN_REFUSALS = {
|
|
6038
|
+
APP_OWNER_NOT_MEMBER: "the person who created this app is no longer a member of the organization. An administrator can reassign the app to another member in Developers > Apps.",
|
|
6039
|
+
APP_OWNER_NOT_ACTIVE: "the access of the person who created this app is suspended. An administrator can reactivate it or reassign the app in Developers > Apps.",
|
|
6040
|
+
OWNER_CHECK_UNAVAILABLE: "the server could not check the person who created this app. Try again in a few minutes."
|
|
6041
|
+
};
|
|
6042
|
+
async function errorCode(response) {
|
|
6043
|
+
const body = await response.json().catch(() => null);
|
|
6044
|
+
return typeof body?.code === "string" && /^[A-Z][A-Z0-9_]{0,63}$/.test(body.code) ? body.code : null;
|
|
6045
|
+
}
|
|
6035
6046
|
async function getToken(config2) {
|
|
6036
6047
|
if (cachedToken && cachedToken.expiresAt - TOKEN_REFRESH_MARGIN_MS > Date.now()) return cachedToken.value;
|
|
6037
6048
|
inflightToken ??= requestToken(config2).finally(() => {
|
|
@@ -6179,7 +6190,7 @@ var TOOLS = [
|
|
|
6179
6190
|
}),
|
|
6180
6191
|
defineTool({
|
|
6181
6192
|
name: "list_focus_exports",
|
|
6182
|
-
description: "List the FOCUS 1.2 exports of the organization still kept for download (deleted 3 to 4 days after the request), with the status of each account or AI connection (pending, ok, partial when limits cut the month, error with its code), plus the export schema: the 57 FOCUS 1.2 columns and the custom x_ columns with their data type. It does not return download links:
|
|
6193
|
+
description: "List the FOCUS 1.2 exports of the organization still kept for download (deleted 3 to 4 days after the request), with the status of each account or AI connection (pending, ok, partial when limits cut the month, error with its code), plus the export schema: the 57 FOCUS 1.2 columns and the custom x_ columns with their data type. It does not return download links: an export is requested and downloaded in the console, or through the public API with the reports:export scope. Requires the reports:read scope and the Business plan.",
|
|
6183
6194
|
inputSchema: { type: "object", properties: {} },
|
|
6184
6195
|
argsSchema: object({}),
|
|
6185
6196
|
handler: async (_args, config2) => apiGet("/v1/finops/focus/exports", void 0, config2)
|
|
@@ -6895,6 +6906,21 @@ var TOOLS = [
|
|
|
6895
6906
|
inputSchema: { type: "object", properties: {} },
|
|
6896
6907
|
argsSchema: object({}),
|
|
6897
6908
|
handler: async (_args, config2) => apiGet("/v1/owners/teams", void 0, config2)
|
|
6909
|
+
}),
|
|
6910
|
+
// ── Política de etiquetado ─────────────────────────────────
|
|
6911
|
+
defineTool({
|
|
6912
|
+
name: "get_tag_policy",
|
|
6913
|
+
description: "Get the tagging policy: the required tag keys and, for keys with a list, their allowed values. A resource complies when it carries every key and, for keys with a list, an allowed value (case-insensitive; on Google Cloud compared as a label). Without clientId it returns the organization policy: applies is false when it has no keys or on Free, where the scan keeps the five fixed governance keys; updatedAt is the last real change. With clientId (Business, managed clients) it returns that client's own policy, or tagPolicy null when its accounts use the organization policy. Changing the policy stays in the console or the API. Requires the tagging:read scope and the Pro plan (Business with clientId).",
|
|
6914
|
+
inputSchema: objectWith({ clientId: { ...CLIENT_ID, description: "Managed client id, as returned by list_clients (optional; without it, the organization policy)." } }, []),
|
|
6915
|
+
argsSchema: object({ clientId: string2().min(1).optional() }),
|
|
6916
|
+
handler: async ({ clientId: clientId2 }, config2) => apiGet(clientId2 ? `/v1/clients/${encodeURIComponent(clientId2)}/tagging/policy` : "/v1/tagging/policy", void 0, config2)
|
|
6917
|
+
}),
|
|
6918
|
+
defineTool({
|
|
6919
|
+
name: "get_tag_coverage",
|
|
6920
|
+
description: `Get how much of a closed month's billed cost complies with the tagging policy, per required key: compliant (the key with an allowed value), invalid (another value), missing (no key, including cost that cannot be tagged such as tax, support or Marketplace) and unknown (values grouped in the overflow of a key with a list); the four add up to total. ruleAssisted is the part of compliant and invalid assigned by a virtual tagging or owner rule rather than the resource tag. It comes from each account's FOCUS allocation and only measures keys that are also allocation keys (allocationKey false: add it as one). Each account is measured with the policy that applies to it (its client's in an MSP); Google Cloud accounts are excluded (dimension_unsupported). Rows for the whole organization and per scope; only account scopes without a filter are measurable. Amounts are in the response "currency": the organization currency at the month-close rate ("approximate" is true), or USD when there was no rate; no field ends in Usd. Requires the reports:read scope and the Business plan.`,
|
|
6921
|
+
inputSchema: objectWith({ period: { ...BILLING_PERIOD, description: "Closed month as YYYY-MM (optional; default the last closed month)." } }, []),
|
|
6922
|
+
argsSchema: object({ period: BillingPeriod.optional() }),
|
|
6923
|
+
handler: async ({ period }, config2) => apiGet("/v1/finops/tag-coverage", { period }, config2)
|
|
6898
6924
|
})
|
|
6899
6925
|
];
|
|
6900
6926
|
function withoutPrivateLink(page) {
|
|
@@ -6908,7 +6934,7 @@ function findTool(name) {
|
|
|
6908
6934
|
|
|
6909
6935
|
// src/protocol.ts
|
|
6910
6936
|
var SERVER_NAME = "aaa-sentinel-mcp";
|
|
6911
|
-
var SERVER_VERSION = "0.
|
|
6937
|
+
var SERVER_VERSION = "0.26.0";
|
|
6912
6938
|
var SUPPORTED_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26", "2024-11-05"];
|
|
6913
6939
|
var PARSE_ERROR = -32700;
|
|
6914
6940
|
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
|
+
"version": "0.26.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",
|