@crowdstrike/aidr-mcp-proxy 1.4.0 → 1.5.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 CHANGED
@@ -104,4 +104,15 @@ environment variable.
104
104
  To identify the calling user by ID in CrowdStrike AIDR, set the
105
105
  `CS_AIDR_USER_ID` environment variable.
106
106
 
107
+ ### Proxies
108
+
109
+ See the [AIDR documentation](https://aidr-docs.crowdstrike.com/docs/aidr#cloud-origins)
110
+ for connectivity requirements.
111
+
112
+ The AIDR MCP Proxy automatically reads proxy configuration from the environment
113
+ variables `http_proxy`, `https_proxy`, and `no_proxy`. Uppercase environment
114
+ variables are also supported: `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`. If
115
+ both the lowercase and uppercase environment variables are set, the uppercase
116
+ environment variables will be ignored.
117
+
107
118
  [mcp-remote]: https://github.com/geelen/mcp-remote
package/dist/proxy.mjs CHANGED
@@ -7,6 +7,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
7
7
  import { CallToolRequestSchema, CompleteRequestSchema, GetPromptRequestSchema, ListPromptsRequestSchema, ListResourceTemplatesRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, LoggingMessageNotificationSchema, ReadResourceRequestSchema, ResourceUpdatedNotificationSchema, SubscribeRequestSchema, UnsubscribeRequestSchema } from "@modelcontextprotocol/sdk/types.js";
8
8
  import { defineCommand, runMain } from "citty";
9
9
  import { consola } from "consola";
10
+ import { EnvHttpProxyAgent } from "undici";
10
11
  //#region src/proxy.ts
11
12
  function isTextContent(x) {
12
13
  return x.type === "text";
@@ -60,9 +61,14 @@ runMain(defineCommand({
60
61
  }
61
62
  }
62
63
  if (serverCapabilities?.tools) {
64
+ const dispatcher = new EnvHttpProxyAgent();
63
65
  const aiGuard = new AIGuard({
64
66
  token: process.env.CS_AIDR_TOKEN,
65
- baseURLTemplate: process.env.CS_AIDR_BASE_URL_TEMPLATE
67
+ baseURLTemplate: process.env.CS_AIDR_BASE_URL_TEMPLATE,
68
+ fetch: (url, init) => fetch(url, {
69
+ ...init,
70
+ dispatcher
71
+ })
66
72
  });
67
73
  server.setRequestHandler(ListToolsRequestSchema, async (args) => {
68
74
  const response = await client.listTools(args.params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdstrike/aidr-mcp-proxy",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Protect any MCP server from malicious entities and confidential PII.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,13 +24,14 @@
24
24
  "@crowdstrike/aidr": "^1.1.1",
25
25
  "@modelcontextprotocol/sdk": "^1.29.0",
26
26
  "citty": "^0.1.6",
27
- "consola": "^3.4.2"
27
+ "consola": "^3.4.2",
28
+ "undici": "^7.25.0"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@biomejs/biome": "2.3.11",
31
32
  "@containerbase/semantic-release-pnpm": "1.3.28",
32
33
  "@tsconfig/node22": "22.0.5",
33
- "@types/node": "22.19.1",
34
+ "@types/node": "22.19.17",
34
35
  "conventional-changelog-conventionalcommits": "9.3.0",
35
36
  "lefthook": "2.0.15",
36
37
  "semantic-release": "25.0.3",