@gnaws/mcp 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/dist/logger.js ADDED
@@ -0,0 +1,84 @@
1
+ function _array_like_to_array(arr, len) {
2
+ if (len == null || len > arr.length) len = arr.length;
3
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4
+ return arr2;
5
+ }
6
+ function _array_without_holes(arr) {
7
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
8
+ }
9
+ function _iterable_to_array(iter) {
10
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
11
+ return Array.from(iter);
12
+ }
13
+ }
14
+ function _non_iterable_spread() {
15
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16
+ }
17
+ function _to_consumable_array(arr) {
18
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
19
+ }
20
+ function _unsupported_iterable_to_array(o, minLen) {
21
+ if (!o) return;
22
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
23
+ var n = Object.prototype.toString.call(o).slice(8, -1);
24
+ if (n === "Object" && o.constructor) n = o.constructor.name;
25
+ if (n === "Map" || n === "Set") return Array.from(n);
26
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
27
+ }
28
+ var levels = [
29
+ "debug",
30
+ "info",
31
+ "warn",
32
+ "error",
33
+ "silent"
34
+ ];
35
+ export function createLogger() {
36
+ var level = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "info";
37
+ var threshold = levels.indexOf(level);
38
+ function buildLogger(prefix) {
39
+ var tag = prefix ? "[".concat(prefix, "]") : "";
40
+ return {
41
+ debug: function debug() {
42
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
43
+ args[_key] = arguments[_key];
44
+ }
45
+ var _console;
46
+ if (threshold <= 0) (_console = console).error.apply(_console, [
47
+ tag
48
+ ].concat(_to_consumable_array(args)));
49
+ },
50
+ info: function info() {
51
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
52
+ args[_key] = arguments[_key];
53
+ }
54
+ var _console;
55
+ if (threshold <= 1) (_console = console).error.apply(_console, [
56
+ tag
57
+ ].concat(_to_consumable_array(args)));
58
+ },
59
+ warn: function warn() {
60
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
61
+ args[_key] = arguments[_key];
62
+ }
63
+ var _console;
64
+ if (threshold <= 2) (_console = console).error.apply(_console, [
65
+ tag
66
+ ].concat(_to_consumable_array(args)));
67
+ },
68
+ error: function error() {
69
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
70
+ args[_key] = arguments[_key];
71
+ }
72
+ var _console;
73
+ if (threshold <= 3) (_console = console).error.apply(_console, [
74
+ tag
75
+ ].concat(_to_consumable_array(args)));
76
+ },
77
+ child: function child(childPrefix) {
78
+ var newPrefix = prefix ? "".concat(prefix, "/").concat(childPrefix) : childPrefix;
79
+ return buildLogger(newPrefix);
80
+ }
81
+ };
82
+ }
83
+ return buildLogger();
84
+ }
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@gnaws/mcp",
3
+ "version": "0.1.0",
4
+ "description": "GNAWS MCP server — expose AWS resource scanning and unused resource detection to AI agents",
5
+ "license": "AGPL-3.0-only",
6
+ "keywords": [
7
+ "aws",
8
+ "aws-sdk",
9
+ "mcp",
10
+ "mcp-server",
11
+ "model-context-protocol",
12
+ "cloud",
13
+ "infrastructure",
14
+ "inventory",
15
+ "unused-resources",
16
+ "cost-optimization",
17
+ "graph",
18
+ "ai-agent"
19
+ ],
20
+ "homepage": "https://github.com/FabioDominio/gnaws-mcp#readme",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/FabioDominio/gnaws-mcp.git",
24
+ "directory": "gnaws-mcp"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/FabioDominio/gnaws-mcp/issues"
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "type": "module",
33
+ "bin": {
34
+ "gnaws-mcp": "./dist/app.js"
35
+ },
36
+ "scripts": {
37
+ "build": "rm -rf dist && swc src/ -d dist --strip-leading-paths",
38
+ "postbuild": "chmod +x dist/app.js",
39
+ "dev": "tsx --env-file=.env src/app.ts",
40
+ "start": "node --env-file=.env dist/app.js",
41
+ "typecheck": "tsc --noEmit",
42
+ "lint": "npx eslint --fix .",
43
+ "test": "vitest run",
44
+ "version": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s && git add CHANGELOG.md",
45
+ "release": "bumpp",
46
+ "prepare": "[ -d .git ] && husky || true"
47
+ },
48
+ "dependencies": {
49
+ "@aws-sdk/credential-providers": "^3.1110.0",
50
+ "@gnaws/core": "^0.1.0",
51
+ "@modelcontextprotocol/server": "^2.0.0",
52
+ "zod": "^4.4.3"
53
+ },
54
+ "devDependencies": {
55
+ "@commitlint/cli": "^21.2.2",
56
+ "@commitlint/config-conventional": "^21.2.2",
57
+ "@commitlint/types": "^21.2.0",
58
+ "@eslint/js": "^10.0.1",
59
+ "@stylistic/eslint-plugin": "^5.10.0",
60
+ "@swc/cli": "^0.8.1",
61
+ "@swc/core": "^1.15.47",
62
+ "@types/node": "^26.2.0",
63
+ "bumpp": "^12.2.1",
64
+ "conventional-changelog": "^8.1.3",
65
+ "eslint": "^10.8.1",
66
+ "husky": "^9.1.7",
67
+ "tsx": "^4.23.12",
68
+ "typescript": "^6.0.3",
69
+ "typescript-eslint": "^8.67.0",
70
+ "vitest": "^4.1.10"
71
+ },
72
+ "engines": {
73
+ "node": ">=24.0.0"
74
+ }
75
+ }