mcp-aws-manager 0.3.6 → 0.3.7
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 +11 -4
- package/README_KO.md +6 -4
- package/bin/mcp-aws-manager-mcp.js +1 -1
- package/bin/mcp-aws-manager.js +25 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,10 +91,16 @@ If AWS auth is not available, use manual fallback:
|
|
|
91
91
|
mcp-aws-manager discover --manual-server-list ./servers.csv --pem-paths C:\keys\prod.pem --no-progress
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
GUI report is generated by default (`./aws-inventory.html`):
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
mcp-aws-manager discover --profiles default --
|
|
97
|
+
mcp-aws-manager discover --profiles default --no-progress
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Custom path / open behavior:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
mcp-aws-manager discover --profiles default --html-out ./inventory.html --open-html --no-progress
|
|
98
104
|
```
|
|
99
105
|
|
|
100
106
|
## User Confirmation Required
|
|
@@ -228,8 +234,9 @@ aws sts get-caller-identity --profile default
|
|
|
228
234
|
- `--ssh-user <name>`
|
|
229
235
|
- `--ssh-port <port>`
|
|
230
236
|
- `--ssh-connect-timeout <seconds>`
|
|
231
|
-
- `--html-out <path>`
|
|
232
|
-
- `--open-html`
|
|
237
|
+
- `--html-out <path>` (default: `./aws-inventory.html`)
|
|
238
|
+
- `--open-html` (force open)
|
|
239
|
+
- `--no-open-html` (disable auto-open)
|
|
233
240
|
- `--auto-sso-login` / `--no-auto-sso-login`
|
|
234
241
|
- `--format <json|csv>`
|
|
235
242
|
- `--out <path>`
|
package/README_KO.md
CHANGED
|
@@ -19,7 +19,7 @@ mcp-aws-manager discover --profiles default --no-progress
|
|
|
19
19
|
- SSM 상태 확인: managed/online
|
|
20
20
|
- 런타임 스냅샷(선택), SSM 완화(선택)
|
|
21
21
|
- AWS 인증이 안 될 때 수동 모드: JSON/CSV 서버 목록 + PEM SSH
|
|
22
|
-
- GUI 리포트 생성:
|
|
22
|
+
- GUI 리포트 기본 생성: `./aws-inventory.html` (검색/필터/CSV 다운로드 버튼 포함)
|
|
23
23
|
- 사람이 개입해야 할 상황을 `ACTION_REQUIRED`로 표준화
|
|
24
24
|
|
|
25
25
|
## 바이너리
|
|
@@ -70,11 +70,13 @@ mcp-aws-manager discover --manual-server-list ./servers.csv --pem-paths C:\keys\
|
|
|
70
70
|
## GUI 리포트
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
mcp-aws-manager discover --profiles default --
|
|
73
|
+
mcp-aws-manager discover --profiles default --no-progress
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
-
|
|
77
|
-
- `--
|
|
76
|
+
- 기본 경로: `./aws-inventory.html`
|
|
77
|
+
- `--html-out <path>`: 리포트 경로 변경
|
|
78
|
+
- `--open-html`: 생성 후 브라우저 오픈 강제
|
|
79
|
+
- `--no-open-html`: 자동 오픈 비활성화
|
|
78
80
|
- GUI에서 현재 뷰 기준 CSV 다운로드 가능
|
|
79
81
|
|
|
80
82
|
## MCP 도구
|
package/bin/mcp-aws-manager.js
CHANGED
|
@@ -11,6 +11,7 @@ const DEFAULT_SNAPSHOT_CONCURRENCY = 3;
|
|
|
11
11
|
const MAX_SSM_FILTER_IDS = 50;
|
|
12
12
|
const DEFAULT_SERVER_NAME = "mcp-aws-manager";
|
|
13
13
|
const DEFAULT_MCP_COMMAND = "mcp-aws-manager-mcp";
|
|
14
|
+
const DEFAULT_HTML_REPORT_NAME = "aws-inventory.html";
|
|
14
15
|
const SUPPORTED_CLIENTS = new Set(["codex", "claude", "cursor", "windsurf", "antigravity"]);
|
|
15
16
|
const INTERNAL_BACKEND_ID = "internal";
|
|
16
17
|
|
|
@@ -266,8 +267,9 @@ function usageText() {
|
|
|
266
267
|
" --ssh-user <name> (default: ec2-user)",
|
|
267
268
|
" --ssh-port <port> (default: 22)",
|
|
268
269
|
" --ssh-connect-timeout <seconds> (default: 8)",
|
|
269
|
-
" --html-out <path> (
|
|
270
|
-
" --open-html (
|
|
270
|
+
" --html-out <path> (default: ./aws-inventory.html)",
|
|
271
|
+
" --open-html (force opening HTML report after write)",
|
|
272
|
+
" --no-open-html (disable auto-open of HTML report)",
|
|
271
273
|
" --auto-sso-login / --no-auto-sso-login",
|
|
272
274
|
" --format <json|csv> (default: json)",
|
|
273
275
|
" --out <path>",
|
|
@@ -285,7 +287,7 @@ function usageText() {
|
|
|
285
287
|
" MCP_AWS_SNAPSHOT_MAX_KB, MCP_AWS_AUTO_SSO_LOGIN",
|
|
286
288
|
" MCP_AWS_MANUAL_SERVER_LIST, MCP_AWS_PEM_PATHS, MCP_AWS_SSH_USER, MCP_AWS_SSH_PORT",
|
|
287
289
|
" MCP_AWS_SSH_CONNECT_TIMEOUT",
|
|
288
|
-
" MCP_AWS_HTML_OUT, MCP_AWS_OPEN_HTML",
|
|
290
|
+
" MCP_AWS_HTML_OUT, MCP_AWS_OPEN_HTML, MCP_AWS_HEADLESS",
|
|
289
291
|
" MCP_AWS_FORMAT, MCP_AWS_OUT, MCP_AWS_NO_PROGRESS",
|
|
290
292
|
""
|
|
291
293
|
].join("\n");
|
|
@@ -502,6 +504,7 @@ function parseDiscoverArgs(argv) {
|
|
|
502
504
|
if (arg === "--auto-sso-login") { options.autoSsoLogin = true; continue; }
|
|
503
505
|
if (arg === "--no-auto-sso-login") { options.autoSsoLogin = false; continue; }
|
|
504
506
|
if (arg === "--open-html") { options.openHtml = true; continue; }
|
|
507
|
+
if (arg === "--no-open-html") { options.openHtml = false; continue; }
|
|
505
508
|
if (arg === "--progress") { options.noProgress = false; continue; }
|
|
506
509
|
if (arg === "--no-progress") { options.noProgress = true; continue; }
|
|
507
510
|
if (!arg.startsWith("--")) throw new Error(`Unexpected argument: ${arg}`);
|
|
@@ -529,6 +532,8 @@ function parseDiscoverArgs(argv) {
|
|
|
529
532
|
|
|
530
533
|
const envNoProgress = envText("MCP_AWS_NO_PROGRESS");
|
|
531
534
|
|
|
535
|
+
const envOpenHtml = envText("MCP_AWS_OPEN_HTML");
|
|
536
|
+
|
|
532
537
|
return {
|
|
533
538
|
help: false,
|
|
534
539
|
profiles: parseCsv(options.profiles) || parseCsv(envText("MCP_AWS_PROFILES")),
|
|
@@ -561,8 +566,8 @@ function parseDiscoverArgs(argv) {
|
|
|
561
566
|
sshConnectTimeoutSec: Math.round(toPosNum(options.sshConnectTimeoutSec || envText("MCP_AWS_SSH_CONNECT_TIMEOUT") || "8", "--ssh-connect-timeout", 8)),
|
|
562
567
|
htmlOutPath: options.htmlOutPath
|
|
563
568
|
? path.resolve(expandHome(options.htmlOutPath))
|
|
564
|
-
: (envText("MCP_AWS_HTML_OUT") ? path.resolve(expandHome(envText("MCP_AWS_HTML_OUT"))) :
|
|
565
|
-
openHtml: options.openHtml != null ? options.openHtml : envBool("MCP_AWS_OPEN_HTML"),
|
|
569
|
+
: (envText("MCP_AWS_HTML_OUT") ? path.resolve(expandHome(envText("MCP_AWS_HTML_OUT"))) : path.resolve(process.cwd(), DEFAULT_HTML_REPORT_NAME)),
|
|
570
|
+
openHtml: options.openHtml != null ? options.openHtml : (envOpenHtml != null ? envBool("MCP_AWS_OPEN_HTML") : null),
|
|
566
571
|
autoSsoLogin: options.autoSsoLogin != null ? options.autoSsoLogin : (envText("MCP_AWS_AUTO_SSO_LOGIN") != null ? envBool("MCP_AWS_AUTO_SSO_LOGIN") : true),
|
|
567
572
|
format,
|
|
568
573
|
outPath: options.outPath ? path.resolve(expandHome(options.outPath)) : (envText("MCP_AWS_OUT") ? path.resolve(expandHome(envText("MCP_AWS_OUT"))) : null),
|
|
@@ -2961,6 +2966,19 @@ function tryOpenFile(targetPath) {
|
|
|
2961
2966
|
}
|
|
2962
2967
|
}
|
|
2963
2968
|
|
|
2969
|
+
function shouldAutoOpenHtml(config) {
|
|
2970
|
+
if (config.openHtml === true) return true;
|
|
2971
|
+
if (config.openHtml === false) return false;
|
|
2972
|
+
|
|
2973
|
+
// Auto mode: only try in likely local desktop sessions.
|
|
2974
|
+
if (envBool("MCP_AWS_HEADLESS")) return false;
|
|
2975
|
+
if (envBool("CI")) return false;
|
|
2976
|
+
if (envText("SSH_CONNECTION") || envText("SSH_CLIENT") || envText("SSH_TTY")) return false;
|
|
2977
|
+
if (!(process.stdout && process.stdout.isTTY)) return false;
|
|
2978
|
+
if (process.platform === "linux" && !envText("DISPLAY") && !envText("WAYLAND_DISPLAY")) return false;
|
|
2979
|
+
return true;
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2964
2982
|
function writeOutput(config, content) {
|
|
2965
2983
|
if (config.outPath) {
|
|
2966
2984
|
fs.writeFileSync(config.outPath, content, "utf8");
|
|
@@ -2976,7 +2994,7 @@ async function runWorkflow(config) {
|
|
|
2976
2994
|
const requiredActions = [];
|
|
2977
2995
|
|
|
2978
2996
|
progress(config, 1, "orchestrator: parse user request and operation scope");
|
|
2979
|
-
eprint(`Inputs: execution_mode=${INTERNAL_BACKEND_ID}, profiles=${config.profiles ? config.profiles.join(",") : "auto"}, regions=${config.regions ? config.regions.join(",") : "auto"}, include_ec2=${config.includeEc2 ? "on" : "off"}, include_lambda=${config.includeLambda ? "on" : "off"}, include_alb=${config.includeAlb ? "on" : "off"}, include_asg=${config.includeAsg ? "on" : "off"}, include_rds=${config.includeRds ? "on" : "off"}, include_elasticache=${config.includeElastiCache ? "on" : "off"}, include_route53=${config.includeRoute53 ? "on" : "off"}, public_only=${config.publicOnly ? "on" : "off"}, managed_only=${config.managedOnly ? "on" : "off"}, auto_remediate_ssm=${config.autoRemediateSsm ? "on" : "off"}, runtime_snapshot=${config.runtimeSnapshot ? "on" : "off"}, manual_server_list=${config.manualServerListPath || "off"}, pem_paths=${config.pemPaths && config.pemPaths.length ? config.pemPaths.length : 0}, ssh_user=${config.sshUser}, ssh_port=${config.sshPort}, html_out=${config.htmlOutPath || "off"}, open_html=${config.openHtml ? "on" : "off"}, auto_sso_login=${config.autoSsoLogin ? "on" : "off"}`);
|
|
2997
|
+
eprint(`Inputs: execution_mode=${INTERNAL_BACKEND_ID}, profiles=${config.profiles ? config.profiles.join(",") : "auto"}, regions=${config.regions ? config.regions.join(",") : "auto"}, include_ec2=${config.includeEc2 ? "on" : "off"}, include_lambda=${config.includeLambda ? "on" : "off"}, include_alb=${config.includeAlb ? "on" : "off"}, include_asg=${config.includeAsg ? "on" : "off"}, include_rds=${config.includeRds ? "on" : "off"}, include_elasticache=${config.includeElastiCache ? "on" : "off"}, include_route53=${config.includeRoute53 ? "on" : "off"}, public_only=${config.publicOnly ? "on" : "off"}, managed_only=${config.managedOnly ? "on" : "off"}, auto_remediate_ssm=${config.autoRemediateSsm ? "on" : "off"}, runtime_snapshot=${config.runtimeSnapshot ? "on" : "off"}, manual_server_list=${config.manualServerListPath || "off"}, pem_paths=${config.pemPaths && config.pemPaths.length ? config.pemPaths.length : 0}, ssh_user=${config.sshUser}, ssh_port=${config.sshPort}, html_out=${config.htmlOutPath || "off"}, open_html=${config.openHtml == null ? "auto" : (config.openHtml ? "on" : "off")}, auto_sso_login=${config.autoSsoLogin ? "on" : "off"}`);
|
|
2980
2998
|
|
|
2981
2999
|
progress(config, 2, "config_validator: validate settings and output path");
|
|
2982
3000
|
validateConfig(config, warnings, requiredActions);
|
|
@@ -3039,7 +3057,7 @@ async function runWorkflow(config) {
|
|
|
3039
3057
|
progress(config, 8, "cli_output_formatter: render JSON/CSV and guidance payload");
|
|
3040
3058
|
writeOutput(config, renderOutput(config, outputRecords));
|
|
3041
3059
|
const htmlPath = writeHtmlReport(config, outputRecords);
|
|
3042
|
-
if (htmlPath && config
|
|
3060
|
+
if (htmlPath && shouldAutoOpenHtml(config)) {
|
|
3043
3061
|
const opened = tryOpenFile(htmlPath);
|
|
3044
3062
|
if (!opened.ok) {
|
|
3045
3063
|
warnings.push(`Failed to auto-open HTML report: ${opened.detail}`);
|
package/package.json
CHANGED