mcp-aws-manager 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 soybin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,78 @@
1
+ # MCP Client Setup (stdio)
2
+
3
+ This project now includes an MCP stdio server wrapper.
4
+
5
+ - Preferred CLI command: `mcp-aws-manager`
6
+ - Preferred MCP server command: `mcp-aws-manager-mcp`
7
+ - Compatibility aliases still available: `mcp-aws-discover`, `mcp-aws-discover-mcp`
8
+
9
+ The MCP server exposes these tools:
10
+
11
+ - `discover_public_ec2_with_pem`
12
+ - `mcp_aws_discover_cli_help`
13
+
14
+ ## 1) Local Repo (recommended for development)
15
+
16
+ Use this when running directly from this repository.
17
+
18
+ ```json
19
+ {
20
+ "mcpServers": {
21
+ "mcp-aws-manager": {
22
+ "command": "node",
23
+ "args": [
24
+ "C:/Users/mybin/gesia/mcp_aws/bin/mcp-aws-manager-mcp.js"
25
+ ],
26
+ "cwd": "C:/Users/mybin/gesia/mcp_aws"
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ ## 2) Global npm Install
33
+
34
+ After publishing/installing globally:
35
+
36
+ ```bash
37
+ npm install -g @soybin/mcp-aws-manager
38
+ ```
39
+
40
+ Client config:
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "mcp-aws-manager": {
46
+ "command": "mcp-aws-manager-mcp"
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ ## 3) npx (without global install)
53
+
54
+ This can be useful for clients that support `npx` commands.
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "mcp-aws-manager": {
60
+ "command": "npx",
61
+ "args": [
62
+ "-y",
63
+ "-p",
64
+ "@soybin/mcp-aws-manager",
65
+ "mcp-aws-manager-mcp"
66
+ ]
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ## Notes
73
+
74
+ - The current discovery tool is PEM-based and accepts `pemPath` or `pemPaths` (array).
75
+ - If neither is provided, it auto-discovers `.pem` files from the working directory.
76
+ - AWS credentials/profiles must be available on the machine running the MCP server.
77
+ - Do not pass PEM contents through chat; use a local file path in tool arguments.
78
+ - For scoped public npm packages, publish with `npm publish --access public` (or set `publishConfig.access`).
package/README.md ADDED
@@ -0,0 +1,140 @@
1
+ # @soybin/mcp-aws-manager
2
+
3
+ AWS operations CLI and MCP server package (currently discovery-focused).
4
+
5
+ ## What It Provides
6
+
7
+ - CLI: `mcp-aws-manager`
8
+ - MCP stdio server: `mcp-aws-manager-mcp`
9
+
10
+ Current implementation focuses on:
11
+
12
+ - EC2 public IPv4 inventory discovery
13
+ - PEM fingerprint-based EC2 KeyPair matching
14
+ - Optional SSH reachability checks
15
+ - JSON/CSV output (CLI)
16
+ - MCP tool wrapper for AI clients (stdio)
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ npm install -g @soybin/mcp-aws-manager
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ 1. Ensure AWS credentials/profile and a PEM file are available on your machine.
27
+ 2. Run a CLI check (explicit PEM path(s) or auto-discovery from current folder):
28
+
29
+ ```bash
30
+ # explicit PEM path
31
+ mcp-aws-manager --pem-path /path/to/key.pem --profiles default
32
+
33
+ # multiple explicit PEM paths (comma-separated)
34
+ mcp-aws-manager --pem-path /path/to/key1.pem,/path/to/key2.pem --profiles default
35
+
36
+ # no args: auto-uses all *.pem in current directory
37
+ cd /path/that/contains/pem
38
+ mcp-aws-manager
39
+ ```
40
+
41
+ 3. For LLM clients, register the MCP command:
42
+
43
+ ```json
44
+ {
45
+ "mcpServers": {
46
+ "mcp-aws-manager": {
47
+ "command": "mcp-aws-manager-mcp"
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ ## CLI Usage
54
+
55
+ ```bash
56
+ mcp-aws-manager --pem-path /path/to/key.pem --profiles default
57
+
58
+ # if current directory contains .pem files, pemPath is optional
59
+ mcp-aws-manager
60
+ ```
61
+
62
+ Windows PowerShell example:
63
+
64
+ ```powershell
65
+ mcp-aws-manager --pem-path C:\Users\<you>\.ssh\mykey.pem --profiles default
66
+ ```
67
+
68
+ Output format examples:
69
+
70
+ ```bash
71
+ # JSON (default)
72
+ mcp-aws-manager --pem-path /path/to/key.pem --profiles default
73
+
74
+ # CSV
75
+ mcp-aws-manager --pem-path /path/to/key.pem --profiles default --format csv
76
+ ```
77
+
78
+ Optional SSH reachability check:
79
+
80
+ ```bash
81
+ mcp-aws-manager --pem-path /path/to/key.pem --profiles default --ssh-check
82
+ ```
83
+
84
+ ## MCP (LLM Tool) Usage
85
+
86
+ Run as an MCP stdio server:
87
+
88
+ ```bash
89
+ mcp-aws-manager-mcp
90
+ ```
91
+
92
+ Then configure your MCP-compatible client (Claude Desktop, Cursor, Cline, etc.) to launch that command.
93
+
94
+ See `MCP_CLIENT_SETUP.md` for ready-to-copy config examples.
95
+
96
+ ### Exposed MCP Tools
97
+
98
+ - `discover_public_ec2_with_pem`
99
+ - `mcp_aws_discover_cli_help`
100
+
101
+ Example tool arguments:
102
+
103
+ ```json
104
+ {
105
+ "pemPaths": [
106
+ "C:\\Users\\<you>\\.ssh\\key1.pem",
107
+ "C:\\Users\\<you>\\.ssh\\key2.pem"
108
+ ],
109
+ "profiles": ["default"],
110
+ "noProgress": true
111
+ }
112
+ ```
113
+
114
+ ## Requirements
115
+
116
+ - Node.js `>=18`
117
+ - AWS credentials/profile on the machine running the CLI/MCP server
118
+ - Local PEM file path(s) (current discovery tool is PEM-based)
119
+
120
+ ## Security Notes
121
+
122
+ - Do not paste PEM contents into LLM chats.
123
+ - Pass only local file paths (`pemPath` or `pemPaths`) to the MCP tool.
124
+ - Keep AWS credentials and PEM keys on the machine running the tool.
125
+
126
+ ## Compatibility Aliases
127
+
128
+ These legacy commands are also available:
129
+
130
+ - `mcp-aws-discover`
131
+ - `mcp-aws-discover-mcp`
132
+
133
+ ## Keywords
134
+
135
+ - `mcp`
136
+ - `model-context-protocol`
137
+ - `aws`
138
+ - `ec2`
139
+ - `inventory`
140
+ - `cli`