mcp-aws-manager 0.3.1 → 0.3.3
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/AGENT_GUIDANCE_LOOP_TEMPLATE_KO.md +19 -3
- package/IMPLEMENTATION_INTEGRATIONS.md +91 -0
- package/MCP_CLIENT_SETUP.md +17 -8
- package/MCP_DIFFERENTIATION.md +39 -0
- package/README.md +19 -106
- package/bin/mcp-aws-manager-mcp.js +142 -37
- package/bin/mcp-aws-manager.js +888 -132
- package/package.json +13 -6
|
@@ -8,6 +8,22 @@
|
|
|
8
8
|
- 수동 개입이 필요한 순간에만 사용자를 안내한다.
|
|
9
9
|
- 사용자가 조치를 완료하면 같은 입력으로 자동 재시도한다.
|
|
10
10
|
|
|
11
|
+
## 초기 설정 온보딩 모드
|
|
12
|
+
|
|
13
|
+
처음 사용하는 사용자에게는 아래 순서로 진행한다.
|
|
14
|
+
|
|
15
|
+
1. `mcp-aws-manager doctor` 실행
|
|
16
|
+
2. 인증 누락 시 `aws configure sso --profile <profile>` 안내
|
|
17
|
+
3. `aws sso login --profile <profile>` 안내
|
|
18
|
+
4. `aws sts get-caller-identity --profile <profile>` 검증
|
|
19
|
+
5. `discover_ec2_with_ssm` 또는 `mcp-aws-manager discover` 재실행
|
|
20
|
+
|
|
21
|
+
원칙:
|
|
22
|
+
|
|
23
|
+
- 한 번에 하나의 조치만 요청
|
|
24
|
+
- 조치 완료 답변(예: `완료`)을 받으면 즉시 같은 요청 재시도
|
|
25
|
+
- 실패하면 다음 `ACTION_REQUIRED` 1건만 이어서 안내
|
|
26
|
+
|
|
11
27
|
## 입력 가정
|
|
12
28
|
|
|
13
29
|
MCP 응답 JSON에는 아래 필드가 포함된다.
|
|
@@ -46,7 +62,7 @@ MCP 응답 JSON에는 아래 필드가 포함된다.
|
|
|
46
62
|
|
|
47
63
|
완료 시 아래를 간단히 보고한다.
|
|
48
64
|
|
|
49
|
-
1. 전체
|
|
50
|
-
2. SSM 관리/온라인 수
|
|
65
|
+
1. 전체 리소스 수(EC2/Lambda)
|
|
66
|
+
2. EC2 기준 SSM 관리/온라인 수
|
|
51
67
|
3. 주요 경고 유무
|
|
52
|
-
4. 다음 선택 사항(예: 런타임 스냅샷 확장)
|
|
68
|
+
4. 다음 선택 사항(예: 런타임 스냅샷 확장)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Implementation Integrations
|
|
2
|
+
|
|
3
|
+
This document lists MCP/API/CLI integrations used by `mcp-aws-manager`.
|
|
4
|
+
|
|
5
|
+
## 1) MCP integration (provided by this project)
|
|
6
|
+
|
|
7
|
+
Tools:
|
|
8
|
+
|
|
9
|
+
- `discover_ec2_with_ssm`
|
|
10
|
+
- `discover_public_ec2_with_pem` (compat alias)
|
|
11
|
+
- `mcp_aws_discover_cli_help`
|
|
12
|
+
|
|
13
|
+
Files:
|
|
14
|
+
|
|
15
|
+
- `bin/mcp-aws-manager-mcp.js`
|
|
16
|
+
- `bin/mcp-aws-manager.js`
|
|
17
|
+
|
|
18
|
+
Behavior:
|
|
19
|
+
|
|
20
|
+
- MCP tool input is translated to CLI args
|
|
21
|
+
- CLI runs inventory/runtime workflow
|
|
22
|
+
- Result is normalized as structured JSON payload (`summary`, `requiredActions`, `guidance`)
|
|
23
|
+
|
|
24
|
+
## 2) Important implementation scope decision
|
|
25
|
+
|
|
26
|
+
- External AWS management MCP backends are **not used** in runtime execution.
|
|
27
|
+
- Execution is internal-only using AWS SDK + AWS CLI.
|
|
28
|
+
- No bridge command / adapter map is required for normal operation.
|
|
29
|
+
|
|
30
|
+
## 3) AWS SDK integrations (internal execution)
|
|
31
|
+
|
|
32
|
+
File:
|
|
33
|
+
|
|
34
|
+
- `bin/mcp-aws-manager.js`
|
|
35
|
+
|
|
36
|
+
SDK clients:
|
|
37
|
+
|
|
38
|
+
- `@aws-sdk/client-sts`
|
|
39
|
+
- `@aws-sdk/client-ec2`
|
|
40
|
+
- `@aws-sdk/client-ssm`
|
|
41
|
+
- `@aws-sdk/client-lambda`
|
|
42
|
+
- `@aws-sdk/client-elastic-load-balancing-v2`
|
|
43
|
+
- `@aws-sdk/client-auto-scaling`
|
|
44
|
+
- `@aws-sdk/client-rds`
|
|
45
|
+
- `@aws-sdk/client-elasticache`
|
|
46
|
+
- `@aws-sdk/client-route-53`
|
|
47
|
+
|
|
48
|
+
Core API calls:
|
|
49
|
+
|
|
50
|
+
- STS: `GetCallerIdentity`
|
|
51
|
+
- EC2: `DescribeRegions`, `DescribeInstances`, `DescribeIamInstanceProfileAssociations`, `AssociateIamInstanceProfile`, `ReplaceIamInstanceProfileAssociation`
|
|
52
|
+
- SSM: `DescribeInstanceInformation`, `SendCommand`, `GetCommandInvocation`
|
|
53
|
+
- Lambda: `ListFunctions`
|
|
54
|
+
- ELBv2: `DescribeLoadBalancers`, `DescribeTargetGroups`
|
|
55
|
+
- Auto Scaling: `DescribeAutoScalingGroups`
|
|
56
|
+
- RDS: `DescribeDBInstances`
|
|
57
|
+
- ElastiCache: `DescribeCacheClusters`
|
|
58
|
+
- Route53: `ListHostedZones`, `ListResourceRecordSets`
|
|
59
|
+
|
|
60
|
+
## 4) AWS CLI integration
|
|
61
|
+
|
|
62
|
+
File:
|
|
63
|
+
|
|
64
|
+
- `bin/mcp-aws-manager.js`
|
|
65
|
+
|
|
66
|
+
Command used:
|
|
67
|
+
|
|
68
|
+
- `aws sso login --profile <profile>`
|
|
69
|
+
|
|
70
|
+
Purpose:
|
|
71
|
+
|
|
72
|
+
- Automatic recovery when SSO credentials expire.
|
|
73
|
+
|
|
74
|
+
## 5) Local MCP client registration automation
|
|
75
|
+
|
|
76
|
+
Supported clients:
|
|
77
|
+
|
|
78
|
+
- `codex`
|
|
79
|
+
- `claude`
|
|
80
|
+
- `cursor`
|
|
81
|
+
- `windsurf`
|
|
82
|
+
- `antigravity`
|
|
83
|
+
|
|
84
|
+
The setup flow tries multiple `mcp` command variants (`get/show`, `add`, `remove/rm`, scope variations) to maximize compatibility.
|
|
85
|
+
|
|
86
|
+
## 6) Related docs
|
|
87
|
+
|
|
88
|
+
- `README.md`
|
|
89
|
+
- `USAGE_GUIDE.md`
|
|
90
|
+
- `MCP_CLIENT_SETUP.md`
|
|
91
|
+
- `MCP_DIFFERENTIATION.md`
|
package/MCP_CLIENT_SETUP.md
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# MCP Client Setup (stdio)
|
|
2
2
|
|
|
3
|
-
This project provides an MCP stdio wrapper around the SSM-
|
|
3
|
+
This project provides an MCP stdio wrapper around the SSM-first AWS operations CLI.
|
|
4
4
|
|
|
5
5
|
- Preferred CLI command: `mcp-aws-manager`
|
|
6
6
|
- Preferred MCP server command: `mcp-aws-manager-mcp`
|
|
7
|
-
- Compatibility aliases: `mcp-aws-discover`, `mcp-aws-discover-mcp`
|
|
8
7
|
|
|
9
8
|
Exposed MCP tools:
|
|
10
9
|
|
|
11
|
-
- `discover_ec2_with_ssm` (primary)
|
|
10
|
+
- `discover_ec2_with_ssm` (primary, multi-service inventory + SSM runtime)
|
|
12
11
|
- `discover_public_ec2_with_pem` (compatibility alias, same behavior)
|
|
13
12
|
- `mcp_aws_discover_cli_help`
|
|
14
13
|
|
|
@@ -19,7 +18,7 @@ npm install -g mcp-aws-manager
|
|
|
19
18
|
mcp-aws-manager
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
`mcp-aws-manager` (no args) runs bootstrap and registers the MCP server for detected clients (`codex`, `claude`).
|
|
21
|
+
`mcp-aws-manager` (no args) runs bootstrap and registers the MCP server for detected clients (`codex`, `claude` by default).
|
|
23
22
|
|
|
24
23
|
Verification:
|
|
25
24
|
|
|
@@ -27,6 +26,11 @@ Verification:
|
|
|
27
26
|
mcp-aws-manager doctor
|
|
28
27
|
```
|
|
29
28
|
|
|
29
|
+
## Agent-Led Setup Flow
|
|
30
|
+
|
|
31
|
+
Detailed onboarding flow is maintained in `USAGE_GUIDE.md` ("Agent-Assisted First-Time Setup").
|
|
32
|
+
This document only covers MCP server registration/configuration.
|
|
33
|
+
|
|
30
34
|
## Explicit Registration
|
|
31
35
|
|
|
32
36
|
```bash
|
|
@@ -39,6 +43,12 @@ Custom name/command:
|
|
|
39
43
|
mcp-aws-manager setup --name mcp-aws-manager --mcp-command mcp-aws-manager-mcp --clients codex,claude
|
|
40
44
|
```
|
|
41
45
|
|
|
46
|
+
Cursor/Windsurf/Antigravity target example:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
mcp-aws-manager setup --name mcp-aws-manager --mcp-command mcp-aws-manager-mcp --clients cursor,windsurf,antigravity
|
|
50
|
+
```
|
|
51
|
+
|
|
42
52
|
## Manual Configuration (Fallback)
|
|
43
53
|
|
|
44
54
|
Use only when automatic registration is unavailable in your environment.
|
|
@@ -91,7 +101,6 @@ Use only when automatic registration is unavailable in your environment.
|
|
|
91
101
|
|
|
92
102
|
## Notes
|
|
93
103
|
|
|
94
|
-
- Discovery is SSM-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
- For auto remediation, pass `autoRemediateSsm` and an instance profile name/arn.
|
|
104
|
+
- Discovery is SSM-first for host/runtime access; PEM path arguments are no longer required.
|
|
105
|
+
- Runtime execution uses this package's internal AWS SDK/CLI path only (no external AWS management MCP backend dependency).
|
|
106
|
+
- Supported setup clients: `codex`, `claude`, `cursor`, `windsurf`, `antigravity`.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# MCP Differentiation
|
|
2
|
+
|
|
3
|
+
This document clarifies how `mcp-aws-manager` differs from existing AWS-oriented MCP servers.
|
|
4
|
+
|
|
5
|
+
## Scope statement
|
|
6
|
+
|
|
7
|
+
- `mcp-aws-manager` is an internal-execution operations MCP.
|
|
8
|
+
- Runtime does not call external AWS management MCP servers.
|
|
9
|
+
- Discovery/remediation/snapshot are executed directly with AWS SDK and AWS CLI.
|
|
10
|
+
|
|
11
|
+
## Compared targets
|
|
12
|
+
|
|
13
|
+
- AWS MCP Server (Anthropic/community variants)
|
|
14
|
+
- aws-mcp style general AWS control MCPs
|
|
15
|
+
- SSH/filesystem MCP combinations for server introspection
|
|
16
|
+
|
|
17
|
+
## Comparison summary
|
|
18
|
+
|
|
19
|
+
| Area | Existing AWS management MCPs (generic) | `mcp-aws-manager` |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Runtime dependency | Often depends on that MCP server’s own tool/runtime behavior | No external runtime dependency; internal execution only |
|
|
22
|
+
| Product intent | Broad cloud control (many services, ad-hoc actions) | Server operations workflow (inventory + runtime + guided remediation) |
|
|
23
|
+
| Output contract | Tool-specific response shapes | Single normalized multi-service schema (EC2/Lambda/ALB/ASG/RDS/ElastiCache/Route53/SSM) |
|
|
24
|
+
| Runtime insight | Not always integrated with SSM snapshot flow | SSM-first runtime snapshot in same workflow |
|
|
25
|
+
| Failure handling | Varies by server/tool | Standardized `ACTION_REQUIRED` codes and retry guidance payload |
|
|
26
|
+
| Onboarding | Usually per-client manual MCP config | Built-in `bootstrap/setup/doctor` for `codex`, `claude`, `cursor`, `windsurf`, `antigravity` |
|
|
27
|
+
| Governance/audit | Varies | Step-aligned summary and evidence metadata hooks |
|
|
28
|
+
|
|
29
|
+
## Practical differentiation
|
|
30
|
+
|
|
31
|
+
- Deterministic 9-step workflow execution (same ordering every run).
|
|
32
|
+
- Operationally focused defaults (inventory + SSM state + optional remediation/snapshot).
|
|
33
|
+
- User intervention loop designed for agents (ask user only when blocked, then continue).
|
|
34
|
+
- Vendor-agnostic from external MCP backends (no backend lock-in).
|
|
35
|
+
|
|
36
|
+
## Intentional non-goals
|
|
37
|
+
|
|
38
|
+
- Full replacement of every existing AWS management MCP capability.
|
|
39
|
+
- External MCP-to-MCP bridge compatibility as a primary architecture.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# mcp-aws-manager
|
|
2
2
|
|
|
3
|
-
AWS operations CLI and MCP server package (SSM-
|
|
3
|
+
AWS operations CLI and MCP server package (SSM-first mode).
|
|
4
4
|
|
|
5
5
|
## What It Provides
|
|
6
6
|
|
|
@@ -9,13 +9,20 @@ AWS operations CLI and MCP server package (SSM-only mode).
|
|
|
9
9
|
|
|
10
10
|
Current implementation focuses on:
|
|
11
11
|
|
|
12
|
+
- Internal-only execution (AWS SDK + AWS CLI), no external AWS management MCP backend dependency
|
|
12
13
|
- EC2 inventory discovery (multi profile / multi region)
|
|
14
|
+
- Optional Lambda function inventory (same profile/region sweep)
|
|
15
|
+
- Optional ALB/NLB + Target Group inventory
|
|
16
|
+
- Optional Auto Scaling Group inventory
|
|
17
|
+
- Optional RDS inventory
|
|
18
|
+
- Optional ElastiCache inventory
|
|
19
|
+
- Optional Route53 hosted zone inventory
|
|
13
20
|
- SSM management and online-state visibility
|
|
14
21
|
- Optional SSM runtime snapshot collection (`RunCommand`)
|
|
15
22
|
- Optional SSM auto-remediation (instance profile association)
|
|
16
23
|
- Human-in-the-loop guidance via `ACTION_REQUIRED` messages
|
|
17
24
|
- JSON/CSV output (CLI)
|
|
18
|
-
-
|
|
25
|
+
- MCP registration bootstrap helpers (`codex`, `claude`, `cursor`, `windsurf`, `antigravity`)
|
|
19
26
|
|
|
20
27
|
## Install
|
|
21
28
|
|
|
@@ -31,112 +38,18 @@ After install, run once:
|
|
|
31
38
|
mcp-aws-manager
|
|
32
39
|
```
|
|
33
40
|
|
|
34
|
-
This ensures `mcp-aws-manager` is registered in detected clients (`codex`, `claude`).
|
|
41
|
+
This ensures `mcp-aws-manager` is registered in detected clients (`codex`, `claude` by default).
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
For first-time users, follow the agent-assisted onboarding flow in `USAGE_GUIDE.md` ("Agent-Assisted First-Time Setup").
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
- AWS credentials/profile (or IAM role) on the machine running the CLI/MCP server
|
|
40
|
-
- For runtime snapshots: SSM permissions (`ssm:SendCommand`, `ssm:GetCommandInvocation`)
|
|
41
|
-
- For auto remediation: EC2/IAM permissions (`ec2:AssociateIamInstanceProfile`, optionally `ec2:ReplaceIamInstanceProfileAssociation`, `iam:PassRole`)
|
|
45
|
+
## Document Map
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
- End-user setup and run commands: `USAGE_GUIDE.md`
|
|
48
|
+
- MCP client registration and stdio config: `MCP_CLIENT_SETUP.md`
|
|
49
|
+
- Agent retry/guidance loop template: `AGENT_GUIDANCE_LOOP_TEMPLATE_KO.md`
|
|
50
|
+
- Implementation APIs/CLI wiring: `IMPLEMENTATION_INTEGRATIONS.md`
|
|
51
|
+
- Positioning vs existing AWS MCPs: `MCP_DIFFERENTIATION.md`
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
## Differentiation
|
|
46
54
|
|
|
47
|
-
|
|
48
|
-
mcp-aws-manager # bootstrap (default command)
|
|
49
|
-
mcp-aws-manager setup # register/re-register MCP server
|
|
50
|
-
mcp-aws-manager doctor # verify install + registration
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Basic discovery:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
mcp-aws-manager discover --profiles default
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Only public IP instances:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
mcp-aws-manager discover --profiles default --public-only
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Collect runtime snapshots:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
mcp-aws-manager discover --profiles default --runtime-snapshot
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Try automatic remediation for unmanaged instances:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
mcp-aws-manager discover \
|
|
75
|
-
--profiles default \
|
|
76
|
-
--auto-remediate-ssm \
|
|
77
|
-
--ssm-instance-profile-name MySsmInstanceProfile
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Output CSV file:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
mcp-aws-manager discover --profiles default --format csv --out ./inventory.csv
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Compatibility note:
|
|
87
|
-
|
|
88
|
-
- Legacy invocation without subcommand still works for discovery when options are passed.
|
|
89
|
-
- Example: `mcp-aws-manager --profiles default --public-only`
|
|
90
|
-
|
|
91
|
-
## MCP (LLM Tool) Usage
|
|
92
|
-
|
|
93
|
-
Run as an MCP stdio server:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
mcp-aws-manager-mcp
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Exposed MCP tools:
|
|
100
|
-
|
|
101
|
-
- `discover_ec2_with_ssm` (primary)
|
|
102
|
-
- `discover_public_ec2_with_pem` (compatibility alias, same SSM-only behavior)
|
|
103
|
-
- `mcp_aws_discover_cli_help`
|
|
104
|
-
|
|
105
|
-
Example tool arguments:
|
|
106
|
-
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"profiles": ["default"],
|
|
110
|
-
"publicOnly": true,
|
|
111
|
-
"runtimeSnapshot": true,
|
|
112
|
-
"autoSsoLogin": true,
|
|
113
|
-
"noProgress": true
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Human-in-the-loop Behavior
|
|
118
|
-
|
|
119
|
-
When fully automatic execution is not possible, the CLI/MCP returns actionable guidance:
|
|
120
|
-
|
|
121
|
-
- `ACTION_REQUIRED: [SSO_LOGIN_NEEDED] ...`
|
|
122
|
-
- `ACTION_REQUIRED: [SSM_ROLE_OR_AGENT_REQUIRED] ...`
|
|
123
|
-
- `ACTION_REQUIRED: [IAM_PROFILE_ASSOCIATION_FAILED] ...`
|
|
124
|
-
|
|
125
|
-
The MCP wrapper surfaces these in a structured `requiredActions` list and a `guidance` object (`assistantMessageTemplate`, `retryTool`, `retryArgs`).
|
|
126
|
-
|
|
127
|
-
For agent orchestration, see:
|
|
128
|
-
|
|
129
|
-
- `AGENT_GUIDANCE_LOOP_TEMPLATE_KO.md`
|
|
130
|
-
|
|
131
|
-
## Security Notes
|
|
132
|
-
|
|
133
|
-
- Prefer IAM role + SSM over SSH key based access.
|
|
134
|
-
- Restrict RunCommand scopes with IAM policies and resource conditions.
|
|
135
|
-
- Review remediation permissions before enabling `--auto-remediate-ssm`.
|
|
136
|
-
|
|
137
|
-
## Compatibility Aliases
|
|
138
|
-
|
|
139
|
-
These legacy commands are still available:
|
|
140
|
-
|
|
141
|
-
- `mcp-aws-discover`
|
|
142
|
-
- `mcp-aws-discover-mcp`
|
|
55
|
+
This project does not delegate runtime execution to other AWS management MCP servers.
|