@etm-professional-control/winccoa-mcp-server 1.5.0 → 1.5.2

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 (63) hide show
  1. package/.env.example +12 -2
  2. package/OSS.md +20 -20
  3. package/README.md +10 -14
  4. package/build/config/limits.d.ts +35 -0
  5. package/build/config/limits.d.ts.map +1 -0
  6. package/build/config/limits.js +70 -0
  7. package/build/config/limits.js.map +1 -0
  8. package/build/config/server.config.d.ts.map +1 -1
  9. package/build/config/server.config.js +2 -1
  10. package/build/config/server.config.js.map +1 -1
  11. package/build/helpers/icons/IX_ICONS_LIST.txt +1407 -0
  12. package/build/helpers/icons/IconGenerator.d.ts +54 -3
  13. package/build/helpers/icons/IconGenerator.d.ts.map +1 -1
  14. package/build/helpers/icons/IconGenerator.js +104 -22
  15. package/build/helpers/icons/IconGenerator.js.map +1 -1
  16. package/build/helpers/icons/IconList.d.ts +17 -2
  17. package/build/helpers/icons/IconList.d.ts.map +1 -1
  18. package/build/helpers/icons/IconList.js +41 -19
  19. package/build/helpers/icons/IconList.js.map +1 -1
  20. package/build/index_http.d.ts.map +1 -1
  21. package/build/index_http.js +32 -2
  22. package/build/index_http.js.map +1 -1
  23. package/build/server.d.ts.map +1 -1
  24. package/build/server.js +8 -1
  25. package/build/server.js.map +1 -1
  26. package/build/tool_loader.d.ts +21 -1
  27. package/build/tool_loader.d.ts.map +1 -1
  28. package/build/tool_loader.js +49 -8
  29. package/build/tool_loader.js.map +1 -1
  30. package/build/tools/archive/archive_query.d.ts.map +1 -1
  31. package/build/tools/archive/archive_query.js +2 -5
  32. package/build/tools/archive/archive_query.js.map +1 -1
  33. package/build/tools/common/common_query.d.ts.map +1 -1
  34. package/build/tools/common/common_query.js +2 -5
  35. package/build/tools/common/common_query.js.map +1 -1
  36. package/build/tools/dashboards/widget.d.ts.map +1 -1
  37. package/build/tools/dashboards/widget.js +4 -6
  38. package/build/tools/dashboards/widget.js.map +1 -1
  39. package/build/tools/datapoints/dp_basic.d.ts.map +1 -1
  40. package/build/tools/datapoints/dp_basic.js +62 -38
  41. package/build/tools/datapoints/dp_basic.js.map +1 -1
  42. package/build/tools/datapoints/dp_types.d.ts.map +1 -1
  43. package/build/tools/datapoints/dp_types.js +15 -9
  44. package/build/tools/datapoints/dp_types.js.map +1 -1
  45. package/build/tools/icons/icon.d.ts.map +1 -1
  46. package/build/tools/icons/icon.js +52 -7
  47. package/build/tools/icons/icon.js.map +1 -1
  48. package/build/tools/pv_range/pv_range_query.d.ts +12 -0
  49. package/build/tools/pv_range/pv_range_query.d.ts.map +1 -1
  50. package/build/tools/pv_range/pv_range_query.js +63 -31
  51. package/build/tools/pv_range/pv_range_query.js.map +1 -1
  52. package/build/utils/helpers.d.ts +56 -4
  53. package/build/utils/helpers.d.ts.map +1 -1
  54. package/build/utils/helpers.js +144 -14
  55. package/build/utils/helpers.js.map +1 -1
  56. package/build/utils/projectPath.d.ts +52 -0
  57. package/build/utils/projectPath.d.ts.map +1 -0
  58. package/build/utils/projectPath.js +102 -0
  59. package/build/utils/projectPath.js.map +1 -0
  60. package/manifest.cjs +50 -0
  61. package/package.json +7 -6
  62. package/postinstall.cjs +10 -4
  63. package/sbom.json +615 -615
package/.env.example CHANGED
@@ -37,6 +37,12 @@ IP_FILTER_ENABLED=false
37
37
  IP_WHITELIST=
38
38
  IP_BLACKLIST=
39
39
 
40
+ # Request size limits (GHSA-46jr-4wx8-v453)
41
+ # Max array elements + object keys in one tool call's arguments (all transports)
42
+ MCP_MAX_TOOL_INPUT_ELEMENTS=1000
43
+ # Max HTTP request body: bytes, or with kb/mb suffix (HTTP mode only)
44
+ MCP_MAX_REQUEST_BODY=1mb
45
+
40
46
  # CORS Configuration
41
47
  MCP_CORS_ENABLED=false
42
48
  MCP_CORS_ORIGINS=*
@@ -55,12 +61,16 @@ MCP_SSL_CA_PATH=/path/to/ca.pem
55
61
  # Field Configuration
56
62
  WINCCOA_FIELD=default
57
63
 
64
+ # Project path (optional override). Default: the project path reported by the
65
+ # WinCC OA manager. Used by the icon tools (<project>/data/WebUI/icons).
66
+ # WINCCOA_PROJ_PATH=/path/to/your/project
67
+
58
68
  # Project Instructions (optional)
59
69
  # IMPORTANT: Path must be relative to the WinCC OA project directory (not the MCP server directory)
60
70
  # For demo/testing: Use the included demo project instructions
61
- # WINCCOA_PROJECT_INSTRUCTIONS=./javascript/mcpServer/demo-project-instructions.md
71
+ # WINCCOA_PROJECT_INSTRUCTIONS=./javascript/mcpWinCCOA/demo-project-instructions.md
62
72
  # For production: Create your own project-specific instructions
63
- # WINCCOA_PROJECT_INSTRUCTIONS=javascript/mcpServer/project-instructions.md
73
+ # WINCCOA_PROJECT_INSTRUCTIONS=javascript/mcpWinCCOA/project-instructions.md
64
74
 
65
75
  # ====================
66
76
  # PMON CONFIGURATION
package/OSS.md CHANGED
@@ -34,13 +34,13 @@ machine-readable CycloneDX SBOM (`sbom.json`) is published with each release.
34
34
 
35
35
  | Component | Open Source Software [Yes/No] | Acknowledgements/Comment | License conditions and copyright notices |
36
36
  |-----------|------------------------------|-------------------------|----------------------------------------|
37
- | @modelcontextprotocol/sdk 1.30.0 | Yes | Model Context Protocol server/client SDK. Under Siemens vulnerability monitoring as of 2026-09-01; no known vulnerabilities. Pinned above the advisory range 1.10.0-1.25.3 (cross-client data leak via shared server/transport instance reuse). | [MIT](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/LICENSE) |
38
- | cors 2.8.6 | Yes | Express CORS middleware. Under Siemens vulnerability monitoring as of 2026-09-01; no known vulnerabilities. | [MIT](https://github.com/expressjs/cors/blob/master/LICENSE) |
39
- | dotenv 16.6.1 | Yes | Loads `.env` configuration. Under Siemens vulnerability monitoring as of 2026-09-01; no known vulnerabilities. | [BSD-2-Clause](https://github.com/motdotla/dotenv/blob/master/LICENSE) |
40
- | express 5.2.1 | Yes | HTTP server for the streamable HTTP transport. Under Siemens vulnerability monitoring as of 2026-09-01; no known vulnerabilities. | [MIT](https://github.com/expressjs/express/blob/master/LICENSE) |
41
- | express-rate-limit 7.5.1 | Yes | Request rate limiting. Under Siemens vulnerability monitoring as of 2026-09-01; no known vulnerabilities. | [MIT](https://github.com/express-rate-limit/express-rate-limit/blob/main/LICENSE) |
42
- | mcp-remote 0.1.37 | Yes | Remote MCP client bridge. Under Siemens vulnerability monitoring as of 2026-09-01. The pinned 0.1.37 is **not affected** by the known Remote Command Injection vulnerability in versions 0.0.5 to 0.1.15, which was fixed in 0.1.16. | [MIT](https://github.com/geelen/mcp-remote/blob/main/LICENSE) |
43
- | zod 3.25.76 | Yes | Runtime schema validation for tool inputs. Under Siemens vulnerability monitoring as of 2026-09-01; no known vulnerabilities. | [MIT](https://github.com/colinhacks/zod/blob/main/LICENSE) |
37
+ | @modelcontextprotocol/sdk 1.32.0 | Yes | Model Context Protocol server/client SDK. Under Siemens vulnerability monitoring (vilocify) as of 2026-09-01. Updated from 1.30.0 to 1.32.0 for GHSA-f897-62hf-6gxq, GHSA-6qxp-vccf-f47h, GHSA-46jr-4wx8-v453 and GHSA-22jm-h49p-29qw (fixed in 1.30.1, 1.31.0 and 1.32.0). Pinned above the advisory range 1.10.0-1.25.3 (cross-client data leak via shared server/transport instance reuse). | [MIT](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/LICENSE) |
38
+ | cors 2.8.6 | Yes | Express CORS middleware. Under Siemens vulnerability monitoring (vilocify) as of 2026-09-01; no known vulnerabilities. | [MIT](https://github.com/expressjs/cors/blob/master/LICENSE) |
39
+ | dotenv 16.6.1 | Yes | Loads `.env` configuration. Under Siemens vulnerability monitoring (vilocify) as of 2026-09-01; no known vulnerabilities. | [BSD-2-Clause](https://github.com/motdotla/dotenv/blob/master/LICENSE) |
40
+ | express 5.2.1 | Yes | HTTP server for the streamable HTTP transport. Under Siemens vulnerability monitoring (vilocify) as of 2026-09-01; no known vulnerabilities. | [MIT](https://github.com/expressjs/express/blob/master/LICENSE) |
41
+ | express-rate-limit 7.5.1 | Yes | Request rate limiting. Under Siemens vulnerability monitoring (vilocify) as of 2026-09-01; no known vulnerabilities. | [MIT](https://github.com/express-rate-limit/express-rate-limit/blob/main/LICENSE) |
42
+ | mcp-remote 0.14.3 | Yes | Remote MCP client bridge. Under Siemens vulnerability monitoring (vilocify) as of 2026-09-30. Updated from 0.1.37 to 0.14.3 for Siemens SVM notification 236904 (Remote Information Disclosure in OAuth scope handling, versions 0.1.32 to 0.1.38, fixed in 0.1.39). Also **not affected** by the older Remote Command Injection vulnerability in versions 0.0.5 to 0.1.15 (fixed in 0.1.16). | [MIT](https://github.com/geelen/mcp-remote/blob/main/LICENSE) |
43
+ | zod 4.6.6 | Yes | Runtime schema validation for tool inputs. Under Siemens vulnerability monitoring (vilocify) as of 2026-09-01. Updated from 3.25.76 to 4.6.6 for GHSA-mrhx-c7xc-m3w5 (memory exhaustion validating oversized collections, versions before 4.6.6; no fixed 3.x release). | [MIT](https://github.com/colinhacks/zod/blob/main/LICENSE) |
44
44
 
45
45
  ### Not distributed
46
46
 
@@ -52,7 +52,7 @@ machine-readable CycloneDX SBOM (`sbom.json`) is published with each release.
52
52
 
53
53
  Development dependencies are not part of the delivered artifact and are excluded from `sbom.json`
54
54
  (`--omit dev`). Listed for completeness: `@cyclonedx/cyclonedx-npm` 6.0.1 (Apache-2.0), `typescript`
55
- 5.9.3 (Apache-2.0), `vitest` 4.1.11 (MIT), `@vitest/coverage-v8` 4.1.11 (MIT), `@types/node` 20.19.43
55
+ 5.9.3 (Apache-2.0), `vitest` 4.1.11 (MIT), `@vitest/coverage-v8` 4.1.11 (MIT), `@types/node` 24.19.0
56
56
  (MIT), `@types/express` 5.0.6 (MIT).
57
57
 
58
58
  <!-- BEGIN GENERATED COMPONENT LIST - edit gen-oss.mjs, not this block -->
@@ -63,13 +63,13 @@ Licence summary: MIT (100), ISC (7), BSD-2-Clause (2), BSD-3-Clause (2). All are
63
63
 
64
64
  | Component | Version | Licence | Direct dependency |
65
65
  |-----------|---------|---------|-------------------|
66
- | @hono/node-server | 2.1.1 | [MIT](https://opensource.org/license/mit) | no |
67
- | @modelcontextprotocol/sdk | 1.30.0 | [MIT](https://opensource.org/license/mit) | yes |
66
+ | @hono/node-server | 2.1.6 | [MIT](https://opensource.org/license/mit) | no |
67
+ | @modelcontextprotocol/sdk | 1.32.0 | [MIT](https://opensource.org/license/mit) | yes |
68
68
  | accepts | 2.0.0 | [MIT](https://opensource.org/license/mit) | no |
69
69
  | ajv | 8.20.0 | [MIT](https://opensource.org/license/mit) | no |
70
70
  | ajv-formats | 3.0.1 | [MIT](https://opensource.org/license/mit) | no |
71
71
  | array-flatten | 1.1.1 | [MIT](https://opensource.org/license/mit) | no |
72
- | body-parser | 2.3.0 | [MIT](https://opensource.org/license/mit) | no |
72
+ | body-parser | 2.4.0 | [MIT](https://opensource.org/license/mit) | no |
73
73
  | bundle-name | 4.1.0 | [MIT](https://opensource.org/license/mit) | no |
74
74
  | bytes | 3.1.2 | [MIT](https://opensource.org/license/mit) | no |
75
75
  | call-bind-apply-helpers | 1.0.2 | [MIT](https://opensource.org/license/mit) | no |
@@ -100,7 +100,7 @@ Licence summary: MIT (100), ISC (7), BSD-2-Clause (2), BSD-3-Clause (2). All are
100
100
  | express | 5.2.1 | [MIT](https://opensource.org/license/mit) | yes |
101
101
  | express-rate-limit | 7.5.1 | [MIT](https://opensource.org/license/mit) | yes |
102
102
  | fast-deep-equal | 3.1.3 | [MIT](https://opensource.org/license/mit) | no |
103
- | fast-uri | 3.1.6 | [BSD-3-Clause](https://opensource.org/license/bsd-3-clause) | no |
103
+ | fast-uri | 3.1.9 | [BSD-3-Clause](https://opensource.org/license/bsd-3-clause) | no |
104
104
  | finalhandler | 2.1.1 | [MIT](https://opensource.org/license/mit) | no |
105
105
  | forwarded | 0.2.0 | [MIT](https://opensource.org/license/mit) | no |
106
106
  | fresh | 2.0.0 | [MIT](https://opensource.org/license/mit) | no |
@@ -110,11 +110,11 @@ Licence summary: MIT (100), ISC (7), BSD-2-Clause (2), BSD-3-Clause (2). All are
110
110
  | gopd | 1.2.0 | [MIT](https://opensource.org/license/mit) | no |
111
111
  | has-symbols | 1.1.0 | [MIT](https://opensource.org/license/mit) | no |
112
112
  | hasown | 2.0.2 | [MIT](https://opensource.org/license/mit) | no |
113
- | hono | 4.13.5 | [MIT](https://opensource.org/license/mit) | no |
113
+ | hono | 4.13.12 | [MIT](https://opensource.org/license/mit) | no |
114
114
  | http-errors | 2.0.1 | [MIT](https://opensource.org/license/mit) | no |
115
- | iconv-lite | 0.7.2 | [MIT](https://opensource.org/license/mit) | no |
115
+ | iconv-lite | 0.7.3 | [MIT](https://opensource.org/license/mit) | no |
116
116
  | inherits | 2.0.4 | [ISC](https://opensource.org/license/isc-license-txt) | no |
117
- | ip-address | 10.7.0 | [MIT](https://opensource.org/license/mit) | no |
117
+ | ip-address | 10.7.6 | [MIT](https://opensource.org/license/mit) | no |
118
118
  | ipaddr.js | 1.9.1 | [MIT](https://opensource.org/license/mit) | no |
119
119
  | is-docker | 3.0.0 | [MIT](https://opensource.org/license/mit) | no |
120
120
  | is-inside-container | 1.0.0 | [MIT](https://opensource.org/license/mit) | no |
@@ -125,7 +125,7 @@ Licence summary: MIT (100), ISC (7), BSD-2-Clause (2), BSD-3-Clause (2). All are
125
125
  | json-schema-traverse | 1.0.0 | [MIT](https://opensource.org/license/mit) | no |
126
126
  | json-schema-typed | 8.0.2 | [BSD-2-Clause](https://opensource.org/license/bsd-2-clause) | no |
127
127
  | math-intrinsics | 1.1.0 | [MIT](https://opensource.org/license/mit) | no |
128
- | mcp-remote | 0.1.37 | [MIT](https://opensource.org/license/mit) | yes |
128
+ | mcp-remote | 0.14.3 | [MIT](https://opensource.org/license/mit) | yes |
129
129
  | media-typer | 1.1.0 | [MIT](https://opensource.org/license/mit) | no |
130
130
  | merge-descriptors | 2.0.0 | [MIT](https://opensource.org/license/mit) | no |
131
131
  | methods | 1.1.2 | [MIT](https://opensource.org/license/mit) | no |
@@ -143,8 +143,8 @@ Licence summary: MIT (100), ISC (7), BSD-2-Clause (2), BSD-3-Clause (2). All are
143
143
  | path-key | 3.1.1 | [MIT](https://opensource.org/license/mit) | no |
144
144
  | path-to-regexp | 8.4.2 | [MIT](https://opensource.org/license/mit) | no |
145
145
  | pkce-challenge | 5.0.1 | [MIT](https://opensource.org/license/mit) | no |
146
- | proxy-addr | 2.0.7 | [MIT](https://opensource.org/license/mit) | no |
147
- | qs | 6.15.3 | [BSD-3-Clause](https://opensource.org/license/bsd-3-clause) | no |
146
+ | proxy-addr | 2.0.8 | [MIT](https://opensource.org/license/mit) | no |
147
+ | qs | 6.16.2 | [BSD-3-Clause](https://opensource.org/license/bsd-3-clause) | no |
148
148
  | range-parser | 1.2.1 | [MIT](https://opensource.org/license/mit) | no |
149
149
  | raw-body | 3.0.2 | [MIT](https://opensource.org/license/mit) | no |
150
150
  | require-from-string | 2.0.2 | [MIT](https://opensource.org/license/mit) | no |
@@ -165,14 +165,14 @@ Licence summary: MIT (100), ISC (7), BSD-2-Clause (2), BSD-3-Clause (2). All are
165
165
  | strict-url-sanitise | 0.0.1 | [MIT](https://opensource.org/license/mit) | no |
166
166
  | toidentifier | 1.0.1 | [MIT](https://opensource.org/license/mit) | no |
167
167
  | type-is | 2.1.0 | [MIT](https://opensource.org/license/mit) | no |
168
- | undici | 7.29.0 | [MIT](https://opensource.org/license/mit) | no |
168
+ | undici | 7.30.2 | [MIT](https://opensource.org/license/mit) | no |
169
169
  | unpipe | 1.0.0 | [MIT](https://opensource.org/license/mit) | no |
170
170
  | utils-merge | 1.0.1 | [MIT](https://opensource.org/license/mit) | no |
171
171
  | vary | 1.1.2 | [MIT](https://opensource.org/license/mit) | no |
172
172
  | which | 2.0.2 | [ISC](https://opensource.org/license/isc-license-txt) | no |
173
173
  | wrappy | 1.0.2 | [ISC](https://opensource.org/license/isc-license-txt) | no |
174
174
  | wsl-utils | 0.1.0 | [MIT](https://opensource.org/license/mit) | no |
175
- | zod | 3.25.76 | [MIT](https://opensource.org/license/mit) | yes |
175
+ | zod | 4.6.6 | [MIT](https://opensource.org/license/mit) | yes |
176
176
  | zod-to-json-schema | 3.25.1 | [ISC](https://opensource.org/license/isc-license-txt) | no |
177
177
 
178
178
  <!-- END GENERATED COMPONENT LIST -->
package/README.md CHANGED
@@ -62,13 +62,13 @@ For detailed prerequisites, see **[📋 Prerequisites Guide](docs/PREREQUISITES.
62
62
 
63
63
  ### 1. Install
64
64
 
65
- Navigate to your WinCC OA projects javascript directory and create a folder for the MCP server. You can choose any name for this folder - we'll use `mcpServer` in this guide:
65
+ Navigate to your WinCC OA projects javascript directory and create a folder for the MCP server. We use `mcpWinCCOA` as the folder name throughout this documentation:
66
66
 
67
67
  **Windows & Linux:**
68
68
  ```cmd
69
69
  cd <OA_ProjPath>\javascript
70
- mkdir mcpServer
71
- cd mcpServer
70
+ mkdir mcpWinCCOA
71
+ cd mcpWinCCOA
72
72
  ```
73
73
 
74
74
  Then install the required packages:
@@ -142,7 +142,7 @@ TOOLS=datapoints/dp_basic,datapoints/dp_types,archive/archive_query,common/commo
142
142
 
143
143
  Add JavaScript Manager in WinCC OA:
144
144
  - **Manager Type:** JavaScript Manager
145
- - **Script Path:** `mcpServer/index_http.js`
145
+ - **Script Path:** `mcpWinCCOA/index_http.js`
146
146
 
147
147
  ### 4. Connect Claude Desktop
148
148
 
@@ -160,7 +160,7 @@ Edit the configuration file:
160
160
  "mcpServers": {
161
161
  "winccoa": {
162
162
  "command": "npx",
163
- "args": ["mcp-remote", "http://localhost:3000/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE"]
163
+ "args": ["mcp-remote@0.14.3", "http://localhost:3000/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE"]
164
164
  }
165
165
  }
166
166
  }
@@ -177,7 +177,7 @@ Edit the configuration file:
177
177
  "mcpServers": {
178
178
  "winccoa": {
179
179
  "command": "cmd",
180
- "args": ["/c", "npx", "mcp-remote", "http://localhost:3000/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE"]
180
+ "args": ["/c", "npx", "mcp-remote@0.14.3", "http://localhost:3000/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE"]
181
181
  }
182
182
  }
183
183
  }
@@ -203,7 +203,7 @@ This method uses `cmd` to properly handle paths with spaces in Windows.
203
203
  > `--allow-http`**:
204
204
  >
205
205
  > ```json
206
- > "args": ["mcp-remote", "https://winccoaserver:3000/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE"]
206
+ > "args": ["mcp-remote@0.14.3", "https://winccoaserver:3000/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE"]
207
207
  > ```
208
208
  >
209
209
  > Use `--allow-http` only on a network you fully control, and treat the token as compromised if you do.
@@ -215,7 +215,7 @@ If you accept that risk, add the `--allow-http` flag to the `mcp-remote` args:
215
215
  "mcpServers": {
216
216
  "winccoa": {
217
217
  "command": "npx",
218
- "args": ["mcp-remote", "http://winccoaserver:3000/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE", "--allow-http"]
218
+ "args": ["mcp-remote@0.14.3", "http://winccoaserver:3000/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE", "--allow-http"]
219
219
  }
220
220
  }
221
221
  }
@@ -235,13 +235,9 @@ claude mcp add --transport http winccoa http://localhost:3000/mcp --header "Auth
235
235
  claude mcp add --transport http winccoa https://winccoaserver:3000/mcp --header "Authorization: Bearer your-secure-token-here"
236
236
  ```
237
237
 
238
- > **🔒** Only if the server has no TLS, and only on a network you fully control, add `--allow-http`.
239
- > The token then crosses the network in clear text — see the warning under
240
- > [Remote Host](#remote-host-transport-security) above.
238
+ `claude mcp add` also accepts an `http://` URL without an extra flag.
241
239
 
242
- ```bash
243
- claude mcp add --transport http winccoa http://winccoaserver:3000/mcp --header "Authorization: Bearer your-secure-token-here" --allow-http
244
- ```
240
+ > **🔒** Over plain HTTP the bearer token and all traffic cross the network in clear text. Only do this on a network you fully control; otherwise enable TLS and use `https://`.
245
241
 
246
242
  ## Documentation
247
243
 
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Request size limits (GHSA-46jr-4wx8-v453).
3
+ *
4
+ * Two independent caps protect the server from a single oversized request:
5
+ *
6
+ * - MCP_MAX_TOOL_INPUT_ELEMENTS: handed to McpServer as `maxToolInputElements`.
7
+ * It counts every array element and object key in a tool call's arguments
8
+ * (nested, summed) and rejects the call before schema validation runs.
9
+ * - MCP_MAX_REQUEST_BODY: the byte limit of the express JSON body parser (HTTP
10
+ * mode only). It bounds everything the element cap does not, such as long
11
+ * strings, and JSON that tools accept as a string.
12
+ *
13
+ * Read lazily from the environment (not snapshotted at import) because the
14
+ * stdio entry point imports the server before dotenv has run.
15
+ */
16
+ /** Default element cap. Fits a 300-datapoint dpSet (about 900 elements); see CONFIGURATION.md. */
17
+ export declare const DEFAULT_MAX_TOOL_INPUT_ELEMENTS = 1000;
18
+ /** Default body cap in bytes: 1 MiB. */
19
+ export declare const DEFAULT_MAX_REQUEST_BODY_BYTES: number;
20
+ export interface RequestLimits {
21
+ maxToolInputElements: number;
22
+ maxRequestBodyBytes: number;
23
+ /** One message per invalid variable; empty when everything parsed. */
24
+ errors: string[];
25
+ }
26
+ /** Parse a positive integer, e.g. "1000". Returns undefined if invalid. */
27
+ export declare function parseElementLimit(raw: string): number | undefined;
28
+ /** Parse a byte size: "524288", "512kb" or "2mb" (binary multiples). */
29
+ export declare function parseByteSize(raw: string): number | undefined;
30
+ /**
31
+ * Resolve both limits from the environment. Invalid values fall back to the
32
+ * default AND are reported in `errors`; a limit is never silently disabled.
33
+ */
34
+ export declare function resolveRequestLimits(env?: NodeJS.ProcessEnv): RequestLimits;
35
+ //# sourceMappingURL=limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/config/limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,kGAAkG;AAClG,eAAO,MAAM,+BAA+B,OAAQ,CAAC;AAErD,wCAAwC;AACxC,eAAO,MAAM,8BAA8B,QAAc,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKjE;AAED,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAO7D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,aAAa,CAgCf"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Request size limits (GHSA-46jr-4wx8-v453).
3
+ *
4
+ * Two independent caps protect the server from a single oversized request:
5
+ *
6
+ * - MCP_MAX_TOOL_INPUT_ELEMENTS: handed to McpServer as `maxToolInputElements`.
7
+ * It counts every array element and object key in a tool call's arguments
8
+ * (nested, summed) and rejects the call before schema validation runs.
9
+ * - MCP_MAX_REQUEST_BODY: the byte limit of the express JSON body parser (HTTP
10
+ * mode only). It bounds everything the element cap does not, such as long
11
+ * strings, and JSON that tools accept as a string.
12
+ *
13
+ * Read lazily from the environment (not snapshotted at import) because the
14
+ * stdio entry point imports the server before dotenv has run.
15
+ */
16
+ /** Default element cap. Fits a 300-datapoint dpSet (about 900 elements); see CONFIGURATION.md. */
17
+ export const DEFAULT_MAX_TOOL_INPUT_ELEMENTS = 1000;
18
+ /** Default body cap in bytes: 1 MiB. */
19
+ export const DEFAULT_MAX_REQUEST_BODY_BYTES = 1024 * 1024;
20
+ /** Parse a positive integer, e.g. "1000". Returns undefined if invalid. */
21
+ export function parseElementLimit(raw) {
22
+ const value = raw.trim();
23
+ if (!/^\d+$/.test(value))
24
+ return undefined;
25
+ const n = Number(value);
26
+ return Number.isSafeInteger(n) && n >= 1 ? n : undefined;
27
+ }
28
+ /** Parse a byte size: "524288", "512kb" or "2mb" (binary multiples). */
29
+ export function parseByteSize(raw) {
30
+ const m = /^(\d+)\s*(kb|mb)?$/i.exec(raw.trim());
31
+ if (!m)
32
+ return undefined;
33
+ const unit = (m[2] ?? '').toLowerCase();
34
+ const factor = unit === 'mb' ? 1024 * 1024 : unit === 'kb' ? 1024 : 1;
35
+ const n = Number(m[1]) * factor;
36
+ return Number.isSafeInteger(n) && n >= 1 ? n : undefined;
37
+ }
38
+ /**
39
+ * Resolve both limits from the environment. Invalid values fall back to the
40
+ * default AND are reported in `errors`; a limit is never silently disabled.
41
+ */
42
+ export function resolveRequestLimits(env = process.env) {
43
+ const errors = [];
44
+ let maxToolInputElements = DEFAULT_MAX_TOOL_INPUT_ELEMENTS;
45
+ let maxRequestBodyBytes = DEFAULT_MAX_REQUEST_BODY_BYTES;
46
+ const rawElements = env.MCP_MAX_TOOL_INPUT_ELEMENTS;
47
+ if (rawElements !== undefined && rawElements.trim() !== '') {
48
+ const parsed = parseElementLimit(rawElements);
49
+ if (parsed === undefined) {
50
+ errors.push(`MCP_MAX_TOOL_INPUT_ELEMENTS is set to "${rawElements}" but must be a positive integer ` +
51
+ `(default ${DEFAULT_MAX_TOOL_INPUT_ELEMENTS}).`);
52
+ }
53
+ else {
54
+ maxToolInputElements = parsed;
55
+ }
56
+ }
57
+ const rawBody = env.MCP_MAX_REQUEST_BODY;
58
+ if (rawBody !== undefined && rawBody.trim() !== '') {
59
+ const parsed = parseByteSize(rawBody);
60
+ if (parsed === undefined) {
61
+ errors.push(`MCP_MAX_REQUEST_BODY is set to "${rawBody}" but must be a positive size in bytes, ` +
62
+ `or with a kb/mb suffix, e.g. 1mb (default 1mb).`);
63
+ }
64
+ else {
65
+ maxRequestBodyBytes = parsed;
66
+ }
67
+ }
68
+ return { maxToolInputElements, maxRequestBodyBytes, errors };
69
+ }
70
+ //# sourceMappingURL=limits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.js","sourceRo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AAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,YAAY,EAAE,YAuD1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,aAAa,IAAI,eAAe,GAAG,IAAI,CAmBtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQpD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAiDzC"}
1
+ {"version":3,"file":"server.config.d.ts","sourceRoot":"","sources":["../../src/config/server.config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,YAAY,EAAE,YAuD1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,aAAa,IAAI,eAAe,GAAG,IAAI,CAmBtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQpD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAiDzC"}
@@ -4,6 +4,7 @@
4
4
  * Configuration for HTTP/STDIO server modes, authentication, CORS, SSL, and security.
5
5
  */
6
6
  import { readFileSync } from 'fs';
7
+ import { resolveRequestLimits } from './limits.js';
7
8
  // Server deployment configuration
8
9
  export const serverConfig = {
9
10
  // Server mode configuration
@@ -104,7 +105,7 @@ export function isLoopbackHost(host) {
104
105
  * @returns Array of validation error messages (empty if valid)
105
106
  */
106
107
  export function validateConfig() {
107
- const errors = [];
108
+ const errors = [...resolveRequestLimits().errors];
108
109
  // Always require an API token.
109
110
  if (!serverConfig.http.auth.token) {
110
111
  errors.push('MCP_API_TOKEN must be set in the environment or .env file. ' +
@@ -1 +1 @@
1
- {"version":3,"file":"server.config.js","sourceRoot":"","sources":["../../src/config/server.config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,E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