@gnaws/mcp 0.1.0 → 0.2.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/README.md +2 -2
- package/dist/app.js +15 -6
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
|
|
|
98
98
|
| `scan` | Scan AWS resources live with a profile | AWS credentials |
|
|
99
99
|
| `load` | Load from a dump directory (offline) | Dump path |
|
|
100
100
|
| `detect` | Find unused/orphaned resources | `scan` or `load` |
|
|
101
|
-
| `export` | Export graph to gexf/json/md | `scan` or `load` |
|
|
101
|
+
| `export` | Export graph to gexf/json/md/csv | `scan` or `load` |
|
|
102
102
|
| `dump` | Save raw data for offline use | `scan` or `load` |
|
|
103
103
|
| `regions` | List enabled AWS regions | `scan` or `load` |
|
|
104
104
|
|
|
@@ -119,7 +119,7 @@ Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
|
|
|
119
119
|
- **Error handling** — every tool returns structured errors with actionable guidance
|
|
120
120
|
- **Workflow guidance** — tool responses tell the agent what to call next
|
|
121
121
|
- **Offline mode** — load from dumps without AWS credentials
|
|
122
|
-
- **
|
|
122
|
+
- **81 AWS services** — EC2, Lambda, S3, RDS, ECS, EKS, DynamoDB, and many more
|
|
123
123
|
|
|
124
124
|
## Log Level
|
|
125
125
|
|
package/dist/app.js
CHANGED
|
@@ -165,7 +165,7 @@ if (existsSync(".env")) {
|
|
|
165
165
|
process.loadEnvFile(".env");
|
|
166
166
|
}
|
|
167
167
|
import { fromIni } from "@aws-sdk/credential-providers";
|
|
168
|
-
import { Inventory, GraphBuilder, MarkdownExporter, GexfExporter, JsonExporter, LiveServiceFactory, CacheServiceFactory, CacheWriter, UnusedDetector } from "@gnaws/core";
|
|
168
|
+
import { Inventory, GraphBuilder, MarkdownExporter, CsvExporter, GexfExporter, JsonExporter, LiveServiceFactory, CacheServiceFactory, CacheWriter, UnusedDetector } from "@gnaws/core";
|
|
169
169
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
170
170
|
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
171
171
|
import * as z from "zod/v4";
|
|
@@ -632,14 +632,15 @@ server.registerTool("detect", {
|
|
|
632
632
|
// ─── Tool: export ────────────────────────────────────────────────────────────
|
|
633
633
|
server.registerTool("export", {
|
|
634
634
|
"title": "Export Graph",
|
|
635
|
-
"description": "Export the resource graph to a file. Requires 'scan' or 'load' to be called first. Supported formats: gexf (Gephi), json (sigma.js viewer), md (markdown report).",
|
|
635
|
+
"description": "Export the resource graph to a file. Requires 'scan' or 'load' to be called first. Supported formats: gexf (Gephi), json (sigma.js viewer), md (markdown report), csv (flat inventory sheet).",
|
|
636
636
|
"inputSchema": z.object({
|
|
637
637
|
"format": z.enum([
|
|
638
638
|
"gexf",
|
|
639
639
|
"json",
|
|
640
|
-
"md"
|
|
641
|
-
|
|
642
|
-
|
|
640
|
+
"md",
|
|
641
|
+
"csv"
|
|
642
|
+
]).describe("Export format: 'gexf' for Gephi, 'json' for sigma.js viewer, 'md' for markdown report, 'csv' for a flat inventory sheet"),
|
|
643
|
+
"path": z.string().optional().describe("Output file path. Defaults to graph.gexf, graph.json, report.md, or inventory.csv")
|
|
643
644
|
})
|
|
644
645
|
}, function(param) {
|
|
645
646
|
var format = param.format, path = param.path;
|
|
@@ -656,7 +657,13 @@ server.registerTool("export", {
|
|
|
656
657
|
}
|
|
657
658
|
try {
|
|
658
659
|
var ext = format === "md" ? ".md" : ".".concat(format);
|
|
659
|
-
var
|
|
660
|
+
var defaultNames = {
|
|
661
|
+
"gexf": "graph.gexf",
|
|
662
|
+
"json": "graph.json",
|
|
663
|
+
"md": "report.md",
|
|
664
|
+
"csv": "inventory.csv"
|
|
665
|
+
};
|
|
666
|
+
var defaultName = defaultNames[format];
|
|
660
667
|
var outputPath = path !== null && path !== void 0 ? path : defaultName;
|
|
661
668
|
if (!outputPath.endsWith(ext)) {
|
|
662
669
|
outputPath += ext;
|
|
@@ -665,6 +672,8 @@ server.registerTool("export", {
|
|
|
665
672
|
new GexfExporter().export(outputPath, inventory, graph);
|
|
666
673
|
} else if (format === "json") {
|
|
667
674
|
new JsonExporter().export(outputPath, inventory, graph);
|
|
675
|
+
} else if (format === "csv") {
|
|
676
|
+
new CsvExporter().export(outputPath, inventory, graph);
|
|
668
677
|
} else {
|
|
669
678
|
new MarkdownExporter().export(outputPath, inventory, graph);
|
|
670
679
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnaws/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "GNAWS MCP server — expose AWS resource scanning and unused resource detection to AI agents",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"keywords": [
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"prepare": "[ -d .git ] && husky || true"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@aws-sdk/credential-providers": "^3.
|
|
50
|
-
"@gnaws/core": "^0.
|
|
49
|
+
"@aws-sdk/credential-providers": "^3.1130.0",
|
|
50
|
+
"@gnaws/core": "^0.2.0",
|
|
51
51
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
52
|
-
"zod": "^4.
|
|
52
|
+
"zod": "^4.6.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@commitlint/cli": "^21.2.2",
|
|
@@ -58,16 +58,16 @@
|
|
|
58
58
|
"@eslint/js": "^10.0.1",
|
|
59
59
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
60
60
|
"@swc/cli": "^0.8.1",
|
|
61
|
-
"@swc/core": "^1.
|
|
62
|
-
"@types/node": "^26.
|
|
63
|
-
"bumpp": "^12.
|
|
61
|
+
"@swc/core": "^1.16.2",
|
|
62
|
+
"@types/node": "^26.5.1",
|
|
63
|
+
"bumpp": "^12.3.0",
|
|
64
64
|
"conventional-changelog": "^8.1.3",
|
|
65
|
-
"eslint": "^10.
|
|
65
|
+
"eslint": "^10.10.0",
|
|
66
66
|
"husky": "^9.1.7",
|
|
67
|
-
"tsx": "^4.23.
|
|
67
|
+
"tsx": "^4.23.13",
|
|
68
68
|
"typescript": "^6.0.3",
|
|
69
|
-
"typescript-eslint": "^8.
|
|
70
|
-
"vitest": "^
|
|
69
|
+
"typescript-eslint": "^8.70.0",
|
|
70
|
+
"vitest": "^5.0.0"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">=24.0.0"
|