mcp-aws-manager 0.3.5 → 0.3.6
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/AWS_SSO_SETUP_GUIDE.md +133 -0
- package/AWS_SSO_SETUP_GUIDE_KO.md +70 -0
- package/IMPLEMENTATION_INTEGRATIONS.md +38 -3
- package/MCP_CLIENT_SETUP.md +2 -0
- package/MCP_CLIENT_SETUP_KO.md +107 -0
- package/README.md +161 -88
- package/README_KO.md +115 -0
- package/bin/mcp-aws-manager-mcp.js +1097 -649
- package/bin/mcp-aws-manager.js +970 -27
- package/package.json +6 -2
- package/AGENT_GUIDANCE_LOOP_TEMPLATE_KO.md +0 -68
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# AWS 인증 설정 가이드 (SSO / Access Key)
|
|
2
|
+
|
|
3
|
+
## 1. 목적
|
|
4
|
+
- AWS CLI/콘솔 인증 방식을 표준화하고, 운영에 맞는 방식(SSO 또는 Access Key)을 선택해 안전하게 설정한다.
|
|
5
|
+
|
|
6
|
+
## 2. SSO vs Access Key 비교
|
|
7
|
+
|
|
8
|
+
| 항목 | SSO (IAM Identity Center) | Access Key (IAM User) |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| 기본 개념 | 브라우저 로그인 후 단기 자격증명 사용 | 고정 `Access key ID/Secret access key` 사용 |
|
|
11
|
+
| 보안성 | 높음 (단기 토큰, 중앙 통제, MFA 연계 용이) | 상대적으로 낮음 (장기 키 유출 위험) |
|
|
12
|
+
| 권한 관리 | Permission Set 중심 중앙 관리 | 사용자/그룹 정책으로 개별 관리 |
|
|
13
|
+
| 감사 추적 | 사용자/역할 매핑이 명확 | 키 공유 시 추적성 저하 |
|
|
14
|
+
| 운영 편의 | 최초 구성은 복잡, 이후 일관성 높음 | 초기 진입 쉬움, 장기 운영 리스크 큼 |
|
|
15
|
+
| 만료/회전 | 자동 만료(재로그인) | 수동 회전 필요 |
|
|
16
|
+
| 권장 용도 | 사람(개발자/운영자) 인터랙티브 작업 | 레거시/임시 작업. 자동화는 가급적 Role/OIDC 권장 |
|
|
17
|
+
|
|
18
|
+
권장 기준:
|
|
19
|
+
- 사람의 일상 작업: `SSO` 우선
|
|
20
|
+
- 임시 테스트/단일 계정 빠른 접근: `Access Key` 가능
|
|
21
|
+
- CI/CD 같은 자동화: IAM User Access Key보다 `IAM Role`(OIDC/AssumeRole) 우선
|
|
22
|
+
|
|
23
|
+
## 3. SSO 설정 과정 (IAM Identity Center)
|
|
24
|
+
|
|
25
|
+
### 3.1 사전 조건
|
|
26
|
+
- AWS CLI v2
|
|
27
|
+
|
|
28
|
+
```powershell
|
|
29
|
+
aws --version
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- `AWS Organizations` 미사용이면 먼저 조직 생성 필요
|
|
33
|
+
- IAM Identity Center는 `Organization instance` 사용 권장
|
|
34
|
+
|
|
35
|
+
### 3.2 콘솔 설정
|
|
36
|
+
1. `AWS Organizations`에서 `Create organization` 수행 (미사용 시)
|
|
37
|
+
2. `IAM Identity Center` 활성화
|
|
38
|
+
3. `AWS access portal URL` 확인
|
|
39
|
+
- 예: `https://d-xxxxxxxxxx.awsapps.com/start`
|
|
40
|
+
4. `Permission set` 생성
|
|
41
|
+
- 예: `AdministratorAccess`, `ReadOnlyAccess`
|
|
42
|
+
5. 사용자/그룹에 대상 계정 + Permission Set 할당
|
|
43
|
+
|
|
44
|
+
### 3.3 로컬 CLI 설정
|
|
45
|
+
```powershell
|
|
46
|
+
aws configure sso --profile default
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
입력 항목:
|
|
50
|
+
- `SSO start URL`: 포털 URL
|
|
51
|
+
- `SSO region`: Identity Center 리전
|
|
52
|
+
- `Account` / `Role`: 할당된 항목 선택
|
|
53
|
+
- `Default region`: 예) `ap-southeast-1`
|
|
54
|
+
- `Default output`: `json`
|
|
55
|
+
|
|
56
|
+
로그인/검증:
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
aws sso login --profile default
|
|
60
|
+
aws sts get-caller-identity --profile default
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 4. Access Key 설정 과정 (IAM User)
|
|
64
|
+
|
|
65
|
+
### 4.1 사전 조건
|
|
66
|
+
- IAM 사용자 권한 정책이 먼저 정의되어 있어야 함
|
|
67
|
+
- `Root` 계정 Access Key는 사용 금지
|
|
68
|
+
|
|
69
|
+
### 4.2 콘솔에서 키 발급
|
|
70
|
+
1. AWS 콘솔 `IAM > Users > (본인 사용자) > Security credentials`
|
|
71
|
+
2. `Create access key` 선택
|
|
72
|
+
3. 사용 시나리오 선택 후 키 생성
|
|
73
|
+
4. `Access key ID`, `Secret access key` 안전 저장
|
|
74
|
+
- Secret은 생성 시점에만 확인 가능
|
|
75
|
+
|
|
76
|
+
### 4.3 로컬 CLI 등록
|
|
77
|
+
```powershell
|
|
78
|
+
aws configure --profile default
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
입력 항목:
|
|
82
|
+
- `AWS Access Key ID`
|
|
83
|
+
- `AWS Secret Access Key`
|
|
84
|
+
- `Default region name` (예: `ap-southeast-1`)
|
|
85
|
+
- `Default output format` (`json`)
|
|
86
|
+
|
|
87
|
+
검증:
|
|
88
|
+
|
|
89
|
+
```powershell
|
|
90
|
+
aws sts get-caller-identity --profile default
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 4.4 회전(Rotation) 권장 절차
|
|
94
|
+
1. 두 번째 키를 먼저 발급
|
|
95
|
+
2. 애플리케이션/로컬 설정을 새 키로 전환
|
|
96
|
+
3. 정상 동작 검증
|
|
97
|
+
4. 이전 키 비활성화/삭제
|
|
98
|
+
|
|
99
|
+
## 5. 공통 점검 명령
|
|
100
|
+
|
|
101
|
+
```powershell
|
|
102
|
+
aws configure list-profiles
|
|
103
|
+
aws sts get-caller-identity --profile default
|
|
104
|
+
aws ec2 describe-regions --profile default
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 6. 자주 발생하는 문제
|
|
108
|
+
|
|
109
|
+
### 6.1 SSO 오류: `Missing the following required SSO configuration values`
|
|
110
|
+
- 원인: `sso_start_url`, `sso_region` 누락
|
|
111
|
+
- 조치: `aws configure sso --profile default` 재실행
|
|
112
|
+
|
|
113
|
+
### 6.2 SSO 오류: `Unable to locate credentials`
|
|
114
|
+
- 원인: 로그인 전
|
|
115
|
+
- 조치:
|
|
116
|
+
|
|
117
|
+
```powershell
|
|
118
|
+
aws sso login --profile default
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 6.3 Access Key 오류: `InvalidClientTokenId` 또는 `SignatureDoesNotMatch`
|
|
122
|
+
- 원인: 키 오입력 또는 비활성/삭제된 키 사용
|
|
123
|
+
- 조치: 키 재발급 후 `aws configure` 재등록
|
|
124
|
+
|
|
125
|
+
### 6.4 AccessDenied
|
|
126
|
+
- 원인: 역할/사용자 권한 부족
|
|
127
|
+
- 조치: 정책 또는 Permission Set 조정
|
|
128
|
+
|
|
129
|
+
## 7. 운영 권장안
|
|
130
|
+
- 기본 전략: 사람은 `SSO`, 자동화는 `Role`, 장기 `Access Key` 최소화
|
|
131
|
+
- 변경 권한과 조회 권한 분리 (예: 운영은 `ReadOnly` 기본)
|
|
132
|
+
- 키/권한 변경 시 즉시 검증 명령 실행
|
|
133
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# AWS 인증 설정 가이드 (SSO / Access Key)
|
|
2
|
+
|
|
3
|
+
이 문서는 `mcp-aws-manager` 사용 전 필요한 AWS 인증 설정을 한국어로 정리한 가이드입니다.
|
|
4
|
+
|
|
5
|
+
## 어떤 방식이 더 좋은가
|
|
6
|
+
|
|
7
|
+
- 권장: `SSO` (IAM Identity Center)
|
|
8
|
+
- 대안: `Access Key` (정책/조직 제약상 SSO 불가 시)
|
|
9
|
+
|
|
10
|
+
SSO 권장 이유:
|
|
11
|
+
|
|
12
|
+
- 장기 키를 로컬에 보관하지 않아 보안 위험 감소
|
|
13
|
+
- MFA와 세션 만료 관리가 쉬움
|
|
14
|
+
- 조직 단위 권한/회수 정책과 잘 맞음
|
|
15
|
+
|
|
16
|
+
## 1) SSO 설정
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
aws configure sso --profile default
|
|
20
|
+
aws sso login --profile default
|
|
21
|
+
aws sts get-caller-identity --profile default
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
정상이라면 마지막 명령에서 `Account`, `Arn`, `UserId`가 출력됩니다.
|
|
25
|
+
|
|
26
|
+
## 2) Access Key 설정
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
aws configure --profile default
|
|
30
|
+
aws sts get-caller-identity --profile default
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 3) 현재 상태 점검
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
aws configure list-profiles
|
|
37
|
+
aws configure list --profile default
|
|
38
|
+
aws sts get-caller-identity --profile default
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 4) 자주 나는 오류
|
|
42
|
+
|
|
43
|
+
`Unable to locate credentials`
|
|
44
|
+
|
|
45
|
+
- 원인: 인증 미설정 또는 SSO 로그인 만료
|
|
46
|
+
- 조치: SSO 로그인 재실행 또는 Access Key 재설정
|
|
47
|
+
|
|
48
|
+
`AccessDenied` / `not authorized`
|
|
49
|
+
|
|
50
|
+
- 원인: IAM 권한 부족
|
|
51
|
+
- 조치: 필요한 API 권한 정책 추가
|
|
52
|
+
|
|
53
|
+
## 5) mcp-aws-manager 사용 전 최소 준비
|
|
54
|
+
|
|
55
|
+
- 조회 중심이면: AWS API 조회 권한 + 인증(SSO 또는 Access Key)
|
|
56
|
+
- EC2 런타임(SSM)도 보려면:
|
|
57
|
+
- 인스턴스 프로파일에 `AmazonSSMManagedInstanceCore`
|
|
58
|
+
- SSM Agent 정상
|
|
59
|
+
- SSM 통신 가능한 네트워크/엔드포인트
|
|
60
|
+
|
|
61
|
+
## 6) 인증이 아예 불가한 환경이라면
|
|
62
|
+
|
|
63
|
+
수동 모드로 진행 가능합니다.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
mcp-aws-manager discover --manual-server-list ./servers.csv --pem-paths C:\keys\prod.pem --no-progress
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- 서버 목록(JSON/CSV)을 직접 제공
|
|
70
|
+
- PEM SSH 기반으로 런타임 스냅샷 수행
|
|
@@ -7,6 +7,10 @@ This document lists MCP/API/CLI integrations used by `mcp-aws-manager`.
|
|
|
7
7
|
Tools:
|
|
8
8
|
|
|
9
9
|
- `discover_ec2_with_ssm`
|
|
10
|
+
- `ec2_start_instances`
|
|
11
|
+
- `ec2_stop_instances`
|
|
12
|
+
- `ec2_reboot_instances`
|
|
13
|
+
- `ec2_apply_instance_profile`
|
|
10
14
|
- `mcp_aws_discover_cli_help`
|
|
11
15
|
|
|
12
16
|
Files:
|
|
@@ -32,6 +36,13 @@ File:
|
|
|
32
36
|
|
|
33
37
|
- `bin/mcp-aws-manager.js`
|
|
34
38
|
|
|
39
|
+
Coverage summary:
|
|
40
|
+
|
|
41
|
+
- AWS API "all features" are not fully implemented in this project.
|
|
42
|
+
- AWS API total has no fixed official single number because services/actions keep growing.
|
|
43
|
+
- Current implementation uses `9` AWS SDK service clients and `20` AWS SDK operations.
|
|
44
|
+
- AWS CLI integration count is `1` command (`aws sso login --profile <profile>`).
|
|
45
|
+
|
|
35
46
|
SDK clients:
|
|
36
47
|
|
|
37
48
|
- `@aws-sdk/client-sts`
|
|
@@ -47,7 +58,7 @@ SDK clients:
|
|
|
47
58
|
Core API calls:
|
|
48
59
|
|
|
49
60
|
- STS: `GetCallerIdentity`
|
|
50
|
-
- EC2: `DescribeRegions`, `DescribeInstances`, `DescribeIamInstanceProfileAssociations`, `AssociateIamInstanceProfile`, `ReplaceIamInstanceProfileAssociation`
|
|
61
|
+
- EC2: `DescribeRegions`, `DescribeInstances`, `StartInstances`, `StopInstances`, `RebootInstances`, `DescribeIamInstanceProfileAssociations`, `AssociateIamInstanceProfile`, `ReplaceIamInstanceProfileAssociation`
|
|
51
62
|
- SSM: `DescribeInstanceInformation`, `SendCommand`, `GetCommandInvocation`
|
|
52
63
|
- Lambda: `ListFunctions`
|
|
53
64
|
- ELBv2: `DescribeLoadBalancers`, `DescribeTargetGroups`
|
|
@@ -70,7 +81,31 @@ Purpose:
|
|
|
70
81
|
|
|
71
82
|
- Automatic recovery when SSO credentials expire.
|
|
72
83
|
|
|
73
|
-
## 5)
|
|
84
|
+
## 5) Manual inventory + SSH(PEM) fallback
|
|
85
|
+
|
|
86
|
+
File:
|
|
87
|
+
|
|
88
|
+
- `bin/mcp-aws-manager.js`
|
|
89
|
+
|
|
90
|
+
Behavior:
|
|
91
|
+
|
|
92
|
+
- When `--manual-server-list` is set, inventory is loaded from JSON/CSV without AWS API auth.
|
|
93
|
+
- Optional runtime snapshot uses local OpenSSH client with PEM keys (`--pem-paths` / per-row `pemPath`).
|
|
94
|
+
- Manual rows are normalized into the same EC2 output schema.
|
|
95
|
+
|
|
96
|
+
## 6) GUI report output
|
|
97
|
+
|
|
98
|
+
File:
|
|
99
|
+
|
|
100
|
+
- `bin/mcp-aws-manager.js`
|
|
101
|
+
|
|
102
|
+
Behavior:
|
|
103
|
+
|
|
104
|
+
- `discover` supports `--html-out <path>` to generate interactive local HTML inventory report.
|
|
105
|
+
- Report supports search/filter and client-side CSV download from current view.
|
|
106
|
+
- Optional `--open-html` tries opening the generated report in default browser.
|
|
107
|
+
|
|
108
|
+
## 7) Local MCP client registration automation
|
|
74
109
|
|
|
75
110
|
Supported clients:
|
|
76
111
|
|
|
@@ -82,7 +117,7 @@ Supported clients:
|
|
|
82
117
|
|
|
83
118
|
The setup flow tries multiple `mcp` command variants (`get/show`, `add`, `remove/rm`, scope variations) to maximize compatibility.
|
|
84
119
|
|
|
85
|
-
##
|
|
120
|
+
## 8) Related docs
|
|
86
121
|
|
|
87
122
|
- `README.md`
|
|
88
123
|
- `MCP_CLIENT_SETUP.md`
|
package/MCP_CLIENT_SETUP.md
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# MCP 클라이언트 설정 가이드 (stdio)
|
|
2
|
+
|
|
3
|
+
이 프로젝트는 `mcp-aws-manager` CLI를 감싸는 MCP stdio 서버를 제공합니다.
|
|
4
|
+
|
|
5
|
+
- 권장 CLI 명령: `mcp-aws-manager`
|
|
6
|
+
- 권장 MCP 서버 명령: `mcp-aws-manager-mcp`
|
|
7
|
+
|
|
8
|
+
## 노출 도구
|
|
9
|
+
|
|
10
|
+
조회:
|
|
11
|
+
|
|
12
|
+
- `discover_ec2_with_ssm`
|
|
13
|
+
- `mcp_aws_discover_cli_help`
|
|
14
|
+
|
|
15
|
+
변경:
|
|
16
|
+
|
|
17
|
+
- `ec2_start_instances`
|
|
18
|
+
- `ec2_stop_instances`
|
|
19
|
+
- `ec2_reboot_instances`
|
|
20
|
+
- `ec2_apply_instance_profile`
|
|
21
|
+
|
|
22
|
+
## 권장 설치(1회)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g mcp-aws-manager
|
|
26
|
+
mcp-aws-manager
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`mcp-aws-manager`를 인자 없이 실행하면 bootstrap이 동작하며, 감지된 클라이언트(`codex`, `claude` 기본)에 MCP 서버를 등록합니다.
|
|
30
|
+
|
|
31
|
+
검증:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
mcp-aws-manager doctor
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 명시적 등록
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
mcp-aws-manager setup
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
이름/명령 커스텀:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
mcp-aws-manager setup --name mcp-aws-manager --mcp-command mcp-aws-manager-mcp --clients codex,claude
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Cursor/Windsurf/Antigravity 예시:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
mcp-aws-manager setup --name mcp-aws-manager --mcp-command mcp-aws-manager-mcp --clients cursor,windsurf,antigravity
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 수동 설정(자동 등록 불가 시)
|
|
56
|
+
|
|
57
|
+
### 1) 로컬 저장소(개발)
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"mcp-aws-manager": {
|
|
63
|
+
"command": "node",
|
|
64
|
+
"args": [
|
|
65
|
+
"C:/Users/mybin/gesia/mcp_aws/bin/mcp-aws-manager-mcp.js"
|
|
66
|
+
],
|
|
67
|
+
"cwd": "C:/Users/mybin/gesia/mcp_aws"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 2) 전역 npm 설치 사용
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"mcpServers": {
|
|
78
|
+
"mcp-aws-manager": {
|
|
79
|
+
"command": "mcp-aws-manager-mcp"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 3) npx 사용(전역 설치 없이)
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"mcp-aws-manager": {
|
|
91
|
+
"command": "npx",
|
|
92
|
+
"args": [
|
|
93
|
+
"-y",
|
|
94
|
+
"-p",
|
|
95
|
+
"mcp-aws-manager",
|
|
96
|
+
"mcp-aws-manager-mcp"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 참고
|
|
104
|
+
|
|
105
|
+
- 런타임 접근 기본은 SSM 우선이며, 필요 시 수동 서버리스트 + PEM SSH 경로를 사용합니다.
|
|
106
|
+
- 실행 경로는 이 패키지 내부 AWS SDK/CLI를 사용합니다(외부 AWS 관리 MCP 백엔드 미의존).
|
|
107
|
+
- 지원 클라이언트: `codex`, `claude`, `cursor`, `windsurf`, `antigravity`.
|