@yawlabs/aws-mcp 1.2.2 → 1.3.1

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.
Files changed (3) hide show
  1. package/README.md +20 -4
  2. package/dist/index.js +26 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -100,23 +100,39 @@ The rest -- SSO device-code re-login, CCAPI CRUD with dry-run diffs, multi-regio
100
100
 
101
101
  ## Install
102
102
 
103
+ Add to your MCP client config (e.g. `.mcp.json`):
104
+
105
+ ```json
106
+ {
107
+ "mcpServers": {
108
+ "aws": {
109
+ "command": "npx",
110
+ "args": ["-y", "@yawlabs/aws-mcp"]
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ The `-y` flag is what gives you **auto-update on each session load**: every time your MCP client spawns the server, `npx` checks the registry for the latest `@yawlabs/aws-mcp` and downloads it if newer. The first launch in a fresh cache adds ~100-500 ms; subsequent launches use npm's cache (typical metadata-freshness window: 5 min) and add ~50 ms or less. Once the server is up, tool calls have zero auto-update overhead -- the check fires only on (re-)spawn. No separate install step is needed; `-y` covers both first-time install and ongoing updates.
117
+
118
+ If you'd rather pin a specific version (no auto-update, but zero startup overhead), install globally and point the config at the installed binary:
119
+
103
120
  ```bash
104
121
  npm install -g @yawlabs/aws-mcp
105
122
  ```
106
123
 
107
- Or add to your MCP client config (e.g. `.mcp.json`):
108
-
109
124
  ```json
110
125
  {
111
126
  "mcpServers": {
112
127
  "aws": {
113
- "command": "npx",
114
- "args": ["-y", "@yawlabs/aws-mcp"]
128
+ "command": "aws-mcp"
115
129
  }
116
130
  }
117
131
  }
118
132
  ```
119
133
 
134
+ You'll need to `npm install -g @yawlabs/aws-mcp@latest` manually when you want a newer version.
135
+
120
136
  ## Example session
121
137
 
122
138
  You ask the assistant to check a staging bucket, but your SSO token just expired. What the assistant does (and what you see):
package/dist/index.js CHANGED
@@ -55458,6 +55458,7 @@ function canonicalizeStatistic(s) {
55458
55458
  for (const stat of SIMPLE_STATS) {
55459
55459
  if (stat.toLowerCase() === lower) return stat;
55460
55460
  }
55461
+ if (EXTENDED_STAT_RE.test(s)) return lower;
55461
55462
  return s;
55462
55463
  }
55463
55464
  var QUERY_ID_RE = /^[a-z][A-Za-z0-9_]*$/;
@@ -56645,6 +56646,12 @@ function defaultScriptHandlers() {
56645
56646
  const callTool = findTool("aws_call", callTools);
56646
56647
  const paginateTool = findTool("aws_paginate", paginateTools);
56647
56648
  const logsTailTool = findTool("aws_logs_tail", logsTools);
56649
+ const metricsQueryTool = findTool("aws_metrics_query", metricsTools);
56650
+ const iamSimulateTool = findTool("aws_iam_simulate", iamSimulateTools);
56651
+ const multiRegionTool = findTool("aws_multi_region", multiRegionTools);
56652
+ const assumeRoleTool = findTool("aws_assume_role", assumeTools);
56653
+ const docsSearchTool = findTool("aws_docs_search", docsTools);
56654
+ const docsReadTool = findTool("aws_docs_read", docsTools);
56648
56655
  const resourceGet = findTool("aws_resource_get", resourceTools);
56649
56656
  const resourceList = findTool("aws_resource_list", resourceTools);
56650
56657
  const resourceCreate = findTool("aws_resource_create", resourceTools);
@@ -56656,6 +56663,10 @@ function defaultScriptHandlers() {
56656
56663
  paginate: (input) => unwrap(paginateTool, input),
56657
56664
  paginateAll: buildPaginateAll(paginateTool),
56658
56665
  logsTail: (input) => unwrap(logsTailTool, input),
56666
+ metricsQuery: (input) => unwrap(metricsQueryTool, input),
56667
+ iamSimulate: (input) => unwrap(iamSimulateTool, input),
56668
+ multiRegion: (input) => unwrap(multiRegionTool, input),
56669
+ assumeRole: (input) => unwrap(assumeRoleTool, input),
56659
56670
  resource: {
56660
56671
  get: (input) => unwrap(resourceGet, input),
56661
56672
  list: (input) => unwrap(resourceList, input),
@@ -56663,6 +56674,10 @@ function defaultScriptHandlers() {
56663
56674
  update: (input) => unwrap(resourceUpdate, input),
56664
56675
  delete: (input) => unwrap(resourceDelete, input),
56665
56676
  status: (input) => unwrap(resourceStatus, input)
56677
+ },
56678
+ docs: {
56679
+ search: (input) => unwrap(docsSearchTool, input),
56680
+ read: (input) => unwrap(docsReadTool, input)
56666
56681
  }
56667
56682
  };
56668
56683
  }
@@ -56716,6 +56731,10 @@ async function runScript(opts, handlers = defaultScriptHandlers()) {
56716
56731
  paginate: wrapForRealm(handlers.paginate),
56717
56732
  paginateAll: wrapForRealm(handlers.paginateAll),
56718
56733
  logsTail: wrapForRealm(handlers.logsTail),
56734
+ metricsQuery: wrapForRealm(handlers.metricsQuery),
56735
+ iamSimulate: wrapForRealm(handlers.iamSimulate),
56736
+ multiRegion: wrapForRealm(handlers.multiRegion),
56737
+ assumeRole: wrapForRealm(handlers.assumeRole),
56719
56738
  resource: {
56720
56739
  get: wrapForRealm(handlers.resource.get),
56721
56740
  list: wrapForRealm(handlers.resource.list),
@@ -56723,6 +56742,10 @@ async function runScript(opts, handlers = defaultScriptHandlers()) {
56723
56742
  update: wrapForRealm(handlers.resource.update),
56724
56743
  delete: wrapForRealm(handlers.resource.delete),
56725
56744
  status: wrapForRealm(handlers.resource.status)
56745
+ },
56746
+ docs: {
56747
+ search: wrapForRealm(handlers.docs.search),
56748
+ read: wrapForRealm(handlers.docs.read)
56726
56749
  }
56727
56750
  };
56728
56751
  Object.assign(ctx, {
@@ -56807,7 +56830,7 @@ ${opts.code}
56807
56830
  var scriptTools = [
56808
56831
  {
56809
56832
  name: "aws_script",
56810
- description: "Run a short JavaScript snippet that orchestrates other aws-mcp tools (aws.call, aws.paginate, aws.paginateAll, aws.resource.*, aws.logsTail) and returns a combined result. Best for batched read+filter+aggregate workflows that would otherwise need N tool round-trips: 'list all Lambdas, fetch each one's config, return those with memory > 1024'. Use `return <value>` at the end to surface a result; console.log lines are captured and returned alongside. Helpers throw Errors on failure -- use try/catch. NOT a security sandbox -- treat the same as any other tool the model can call.",
56833
+ description: "Run a short JavaScript snippet that orchestrates other aws-mcp tools (aws.call, aws.paginate, aws.paginateAll, aws.resource.*, aws.logsTail, aws.metricsQuery, aws.iamSimulate, aws.multiRegion, aws.assumeRole, aws.docs.{search,read}) and returns a combined result. Best for batched read+filter+aggregate workflows that would otherwise need N tool round-trips: 'list all Lambdas, fetch each one's config, return those with memory > 1024'. Use `return <value>` at the end to surface a result; console.log lines are captured and returned alongside. Helpers throw Errors on failure -- use try/catch. NOT a security sandbox -- treat the same as any other tool the model can call.",
56811
56834
  annotations: {
56812
56835
  title: "Run a JS snippet that orchestrates AWS tool calls",
56813
56836
  // The script may invoke destructive tools (resource.create/update/delete)
@@ -56819,7 +56842,7 @@ var scriptTools = [
56819
56842
  },
56820
56843
  inputSchema: external_exports3.object({
56821
56844
  code: external_exports3.string().min(1).describe(
56822
- "JavaScript snippet evaluated inside `(async () => { ... })()`. Use `return <value>` to surface a result. Bound globals: aws.call, aws.paginate, aws.paginateAll, aws.resource.{get,list,create,update,delete,status}, aws.logsTail, console (capture), JSON, Math, Date, Promise, Array, Object, String, Number, Boolean, Error, Intl, Atomics, SharedArrayBuffer, WebAssembly (compile blocked). Intentionally NOT bound (call as sibling MCP tools instead): aws_metrics_query, aws_iam_simulate, aws_multi_region, aws_assume_role, aws_docs_search, aws_docs_read, aws_list_profiles, the auth/session tools, and aws_script itself. Shadowed (undefined): require, import, process, fs, fetch + family, BroadcastChannel, setTimeout/Interval, queueMicrotask, Buffer, global, globalThis. NOT available (ReferenceError if used): URL, URLSearchParams, TextEncoder, TextDecoder, crypto, structuredClone, EventTarget, MessageChannel, performance. eval/Function are disabled (codeGeneration off). Tool helpers throw on failure -- wrap in try/catch when you want to handle errors per-call."
56845
+ "JavaScript snippet evaluated inside `(async () => { ... })()`. Use `return <value>` to surface a result. Bound globals: aws.call, aws.paginate, aws.paginateAll, aws.resource.{get,list,create,update,delete,status}, aws.logsTail, aws.metricsQuery, aws.iamSimulate, aws.multiRegion, aws.assumeRole, aws.docs.{search,read}, console (capture), JSON, Math, Date, Promise, Array, Object, String, Number, Boolean, Error, Intl, Atomics, SharedArrayBuffer, WebAssembly (compile blocked). Intentionally NOT bound (call as sibling MCP tools instead): aws_list_profiles, the auth/session tools, and aws_script itself. Shadowed (undefined): require, import, process, fs, fetch + family, BroadcastChannel, setTimeout/Interval, queueMicrotask, Buffer, global, globalThis. NOT available (ReferenceError if used): URL, URLSearchParams, TextEncoder, TextDecoder, crypto, structuredClone, EventTarget, MessageChannel, performance. eval/Function are disabled (codeGeneration off). Tool helpers throw on failure -- wrap in try/catch when you want to handle errors per-call."
56823
56846
  ),
56824
56847
  timeoutMs: external_exports3.number().int().positive().max(MAX_TIMEOUT_MS).optional().describe(
56825
56848
  `Wall-clock timeout in milliseconds. Default ${DEFAULT_TIMEOUT_MS2}; max ${MAX_TIMEOUT_MS}. Covers evaluation plus every awaited aws.* call. On timeout the script stops being awaited and the tool returns an error, but any aws.* call already in flight is NOT cancelled -- it continues until its own per-call timeout (default 60s). Plan retries accordingly: a script that timed out mid 'resource.delete' may have completed the delete; re-issuing the same script can double-mutate.`
@@ -56920,7 +56943,7 @@ var sessionTools = [
56920
56943
  ];
56921
56944
 
56922
56945
  // src/index.ts
56923
- var version2 = true ? "1.2.2" : (await null).createRequire(import.meta.url)("../package.json").version;
56946
+ var version2 = true ? "1.3.1" : (await null).createRequire(import.meta.url)("../package.json").version;
56924
56947
  var subcommand = process.argv[2];
56925
56948
  if (subcommand === "version" || subcommand === "--version") {
56926
56949
  console.log(version2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/aws-mcp",
3
- "version": "1.2.2",
3
+ "version": "1.3.1",
4
4
  "mcpName": "io.github.YawLabs/aws-mcp",
5
5
  "description": "AWS MCP server — call any AWS API from AI assistants, with first-class SSO re-login (no more 'browser won't open' dead ends)",
6
6
  "license": "MIT",