@cloudburn/mcp 0.1.6 → 0.1.8
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 +4 -2
- package/dist/cli.js +19 -8
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -50,7 +50,9 @@ Requires Node.js 24 or later.
|
|
|
50
50
|
`scan_iac` and `discover` accept `configPath`, `enabledRules`, `disabledRules`, and `services`, like the CLI's
|
|
51
51
|
`--config`, `--enabled-rules`, `--disabled-rules`, and `--service` flags. `discover` also accepts `region`,
|
|
52
52
|
`timeoutSeconds`, and `cache` (`normal`, `refresh`, or `off`) and reports progress to clients that request it.
|
|
53
|
-
Paths must be absolute because agents start the server in different working directories
|
|
53
|
+
Paths must be absolute because agents start the server in different working directories, and `configPath` must
|
|
54
|
+
point to a file named `.cloudburn.yml` or `.cloudburn.yaml`. Earlier versions accepted any filename; other names
|
|
55
|
+
now return `INVALID_ARGUMENT`, so rename a custom config file to use it through MCP.
|
|
54
56
|
|
|
55
57
|
Results are the SDK's `ScanResult` JSON, the same shape as `cloudburn --format json`; see the
|
|
56
58
|
[finding reference](https://github.com/towardsthecloud/cloudburn/blob/main/docs/reference/finding-shape.md). Errors
|
|
@@ -62,7 +64,7 @@ agent.
|
|
|
62
64
|
`discover` and `discovery_status` use the standard AWS credential chain of the process that starts the server, so set
|
|
63
65
|
`AWS_PROFILE` and `AWS_REGION` in your agent's environment. Live discovery needs AWS Resource Explorer. Run
|
|
64
66
|
`npx -y cloudburn discover init` once; the server never changes AWS resources. Discovery shares the CLI's per-user
|
|
65
|
-
evidence cache at `$XDG_CACHE_HOME/cloudburn/evidence` or `~/.cache/cloudburn/evidence`. See the
|
|
67
|
+
evidence cache at `$XDG_CACHE_HOME/cloudburn/evidence` (when absolute) or `~/.cache/cloudburn/evidence`. See the
|
|
66
68
|
[CLI README](https://github.com/towardsthecloud/cloudburn/tree/main/packages/cloudburn#discover) for rule
|
|
67
69
|
prerequisites and IAM permissions.
|
|
68
70
|
|
package/dist/cli.js
CHANGED
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
5
5
|
|
|
6
6
|
// src/server.ts
|
|
7
|
-
import { homedir } from "os";
|
|
8
|
-
import { join } from "path";
|
|
9
7
|
import {
|
|
10
8
|
assertSupportedAwsRegion,
|
|
11
9
|
CloudBurnClient,
|
|
12
10
|
filterBuiltInRules,
|
|
11
|
+
resolveCloudBurnCacheDirectory,
|
|
13
12
|
SEVERITIES
|
|
14
13
|
} from "@cloudburn/sdk";
|
|
15
14
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
@@ -37,12 +36,12 @@ var toToolResult = (value) => ({
|
|
|
37
36
|
});
|
|
38
37
|
|
|
39
38
|
// src/options.ts
|
|
40
|
-
import { isAbsolute } from "path";
|
|
39
|
+
import { basename, isAbsolute } from "path";
|
|
41
40
|
import { validateServices as validateSdkServices } from "@cloudburn/sdk";
|
|
42
41
|
import * as z from "zod";
|
|
43
42
|
var ruleSelectionShape = {
|
|
44
43
|
configPath: z.string().min(1).optional().describe(
|
|
45
|
-
"Absolute path to
|
|
44
|
+
"Absolute path to the project's .cloudburn.yml or .cloudburn.yaml config file. Without it, CloudBurn searches upward from the server's working directory, which depends on the agent host."
|
|
46
45
|
),
|
|
47
46
|
enabledRules: z.array(z.string().min(1)).min(1).optional().describe('Rule IDs to check exclusively, for example ["CLDBRN-AWS-EBS-1"]. Defaults to the AWS Core preset.'),
|
|
48
47
|
disabledRules: z.array(z.string().min(1)).min(1).optional().describe("Rule IDs to remove from the default AWS Core preset."),
|
|
@@ -53,6 +52,18 @@ var requireAbsolutePath = (value, argument) => {
|
|
|
53
52
|
throw new InvalidArgumentError(`${argument} must be an absolute path; received "${value}".`);
|
|
54
53
|
}
|
|
55
54
|
};
|
|
55
|
+
var requireConfigFilePath = (value) => {
|
|
56
|
+
if (value === void 0) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
requireAbsolutePath(value, "configPath");
|
|
60
|
+
const filename = basename(value);
|
|
61
|
+
if (filename !== ".cloudburn.yml" && filename !== ".cloudburn.yaml") {
|
|
62
|
+
throw new InvalidArgumentError(
|
|
63
|
+
`configPath must point to a .cloudburn.yml or .cloudburn.yaml file; received "${value}".`
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
56
67
|
var validateServices = (services, mode) => {
|
|
57
68
|
try {
|
|
58
69
|
return validateSdkServices(services, mode);
|
|
@@ -71,7 +82,7 @@ var toConfigOverride = (mode, selection) => {
|
|
|
71
82
|
};
|
|
72
83
|
|
|
73
84
|
// src/version.ts
|
|
74
|
-
var SERVER_VERSION = "0.1.
|
|
85
|
+
var SERVER_VERSION = "0.1.8";
|
|
75
86
|
|
|
76
87
|
// src/server.ts
|
|
77
88
|
var INSTRUCTIONS = [
|
|
@@ -132,7 +143,7 @@ var createCloudBurnServer = (options = {}) => {
|
|
|
132
143
|
},
|
|
133
144
|
async ({ path, configPath, ...selection }) => run(async () => {
|
|
134
145
|
requireAbsolutePath(path, "path");
|
|
135
|
-
|
|
146
|
+
requireConfigFilePath(configPath);
|
|
136
147
|
const config = toConfigOverride("iac", selection);
|
|
137
148
|
return createClient().scanStatic(path, config, configPath === void 0 ? void 0 : { configPath });
|
|
138
149
|
})
|
|
@@ -151,13 +162,13 @@ var createCloudBurnServer = (options = {}) => {
|
|
|
151
162
|
annotations: { ...readOnly, openWorldHint: true }
|
|
152
163
|
},
|
|
153
164
|
async ({ region, timeoutSeconds, cache, configPath, ...selection }, ctx) => run(async () => {
|
|
154
|
-
|
|
165
|
+
requireConfigFilePath(configPath);
|
|
155
166
|
const config = toConfigOverride("discovery", selection);
|
|
156
167
|
const onProgress = createProgressReporter(ctx);
|
|
157
168
|
return createClient().discover({
|
|
158
169
|
cache: {
|
|
159
170
|
mode: cache ?? "normal",
|
|
160
|
-
directory:
|
|
171
|
+
directory: resolveCloudBurnCacheDirectory("evidence", env)
|
|
161
172
|
},
|
|
162
173
|
target: region === void 0 ? { mode: "current" } : { mode: "regions", regions: [assertSupportedAwsRegion(region)] },
|
|
163
174
|
signal: ctx.mcpReq.signal,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudburn/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"mcpName": "io.github.towardsthecloud/cloudburn",
|
|
5
5
|
"description": "CloudBurn MCP server for AWS cost scans of IaC and live accounts",
|
|
6
6
|
"homepage": "https://cloudburn.io/docs",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"!dist/plugin"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"
|
|
26
|
-
"
|
|
24
|
+
"@cloudburn/sdk": "0.38.3",
|
|
25
|
+
"@modelcontextprotocol/server": "^2.2.0",
|
|
26
|
+
"zod": "^4.6.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@biomejs/biome": "^2.5.
|
|
30
|
-
"@modelcontextprotocol/client": "^2.
|
|
31
|
-
"@types/node": "^24.
|
|
32
|
-
"@vitest/coverage-v8": "^5.0.
|
|
29
|
+
"@biomejs/biome": "^2.5.15",
|
|
30
|
+
"@modelcontextprotocol/client": "^2.2.0",
|
|
31
|
+
"@types/node": "^24.19.0",
|
|
32
|
+
"@vitest/coverage-v8": "^5.0.3",
|
|
33
33
|
"tsup": "^8.5.1",
|
|
34
34
|
"typescript": "5.9.3",
|
|
35
|
-
"vitest": "^5.0.
|
|
35
|
+
"vitest": "^5.0.3"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"aws",
|