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

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/OSS.md CHANGED
@@ -39,7 +39,7 @@ machine-readable CycloneDX SBOM (`sbom.json`) is published with each release.
39
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
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
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) |
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, which corresponds to CVE-2026-51995 (OAuth authorization-server metadata, CWE-918, CVSS 7.5) and lists 0.1.39 as the fix; the reporter states the behaviour still reproduces on 0.14.3 and 0.16.5 ([#40](https://github.com/winccoa/winccoa-ae-js-mcpserver/issues/40)), so it is not treated as resolved. Also **not affected** by the older Remote Command Injection vulnerability in versions 0.0.5 to 0.1.15 (fixed in 0.1.16). **Known and not fixed:** CVE-2026-51994 (`resource_metadata`, CVSS 9.1) has no fixed release and is not covered by notification 236904; for CVE-2026-51995 see above. OAuth metadata discovery can be redirected by the server to an origin of its choosing, and the statically configured Bearer token may be sent there. No verified fix is known as of 2026-11-09. Kept at 0.14.3; see the [`mcp-remote` security note](https://github.com/winccoa/winccoa-ae-js-mcpserver/blob/main/README.md#mcp-remote-security-note) for safe-use guidance. | [MIT](https://github.com/geelen/mcp-remote/blob/main/LICENSE) |
43
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
package/README.md CHANGED
@@ -44,7 +44,11 @@ industrial cybersecurity, please visit www.siemens.com/cybersecurity-industry.
44
44
 
45
45
  See [LEGAL_INFO.md](LEGAL_INFO.md) for the full cybersecurity information and the application-example
46
46
  terms of use. Note in particular that this server's HTTP transport is **unencrypted by default** — see
47
- [Transport security](#remote-host-transport-security) below.
47
+ [Transport security](#remote-host-transport-security) below. If you connect through the `mcp-remote`
48
+ bridge, also read the [`mcp-remote` security note](#mcp-remote-security-note).
49
+
50
+ To report a vulnerability in this server, see [SECURITY.md](SECURITY.md): vulnerabilities are reported
51
+ to Siemens ProductCERT only, never through public issues.
48
52
 
49
53
  ## ℹ️ Version Requirements
50
54
 
@@ -77,6 +81,22 @@ Then install the required packages:
77
81
  npm install @etm-professional-control/winccoa-mcp-server
78
82
  ```
79
83
 
84
+ Run the setup step to copy the server files into the project directory:
85
+
86
+ ```bash
87
+ npx winccoa-mcp-install
88
+ ```
89
+
90
+ **npm 12 and later do not run install scripts by default**, so this step is required there; on older npm
91
+ the files are copied automatically and running it again is harmless (it keeps your `.env`, `systemprompt.md` and
92
+ any edited files in `fields/`). Alternatively, approve the package's install script once and re-install:
93
+
94
+ ```bash
95
+ npm install-scripts approve @etm-professional-control/winccoa-mcp-server
96
+ ```
97
+
98
+ (or allow it through the `allowScripts` setting in your npm configuration).
99
+
80
100
  Install the WinCC OA JavaScript Manager package from your local WinCC OA installation. The path depends on your WinCC OA version and installation:
81
101
 
82
102
  **WinCC OA 3.20** (default path):
@@ -170,6 +190,38 @@ Edit the configuration file:
170
190
 
171
191
  **🔒 Transport security:** the `http://localhost:3000/mcp` URL above is plain HTTP. That is acceptable **only** because the traffic never leaves the machine. As soon as the server and the client are on different hosts, the bearer token and every request and response cross the network in clear text — see [Remote Host](#remote-host-transport-security) below and enable TLS.
172
192
 
193
+ <a id="mcp-remote-security-note"></a>
194
+ > **🔒 `mcp-remote` security note.** `mcp-remote` is a third-party bridge with two reported
195
+ > OAuth-discovery issues, both CWE-918 (server-side request forgery): CVE-2026-51994 (critical, CVSS 9.1,
196
+ > `resource_metadata`) and CVE-2026-51995 (high, CVSS 7.5, authorization-server metadata). An endpoint
197
+ > that answers with a `401` challenge can make the bridge fetch metadata from an origin of the
198
+ > endpoint's choosing, and the bridge may send the statically configured `Authorization: Bearer` token
199
+ > along to that origin. The published records list 0.1.32 to 0.1.38. A fix is listed only for
200
+ > CVE-2026-51995 (0.1.39, which according to the reporter changes scope handling only);
201
+ > CVE-2026-51994 has no fixed release. The reporter
202
+ > [states](https://github.com/winccoa/winccoa-ae-js-mcpserver/issues/40) that both behaviours still
203
+ > reproduce on 0.14.3 (the version pinned here) and on the latest 0.16.5. We have not verified this
204
+ > ourselves, so the pin stays at 0.14.3 until a fix is verified.
205
+ >
206
+ > **All clients:**
207
+ >
208
+ > - Use `https://` (TLS) for every non-`localhost` connection. Plain `http://` is only for `localhost`
209
+ > or a network you fully control, because the token travels in clear text (see
210
+ > [Remote Host](#remote-host-transport-security)).
211
+ > - Prefer a client with native Streamable HTTP support, for example `claude mcp add --transport http …`
212
+ > in [Claude Code](#5-connect-claude-code-cli). It avoids the `mcp-remote` bridge and these two CVEs.
213
+ > - Use a dedicated MCP token (`MCP_API_TOKEN`) that is used for nothing else, enable only the tools you
214
+ > need (see the Warning section above), and rotate the token regularly and whenever you suspect
215
+ > exposure.
216
+ >
217
+ > **If you use `mcp-remote` (for example with Claude Desktop):**
218
+ >
219
+ > - Point it only at a WinCC OA MCP server you operate and trust, over `https://`. A malicious endpoint,
220
+ > or an on-path attacker on a plain-HTTP connection, can trigger the discovery.
221
+ > - Avoid `--allow-http` except for `localhost`, where it is not needed. If you still use it on a
222
+ > network you fully control, treat the token as exposed.
223
+ > - Restrict the client host's outbound network access to the WinCC OA server.
224
+
173
225
  **Windows Path Issue:** If you encounter the error `"C:\Program" is either misspelled or could not be found`, use this alternative configuration:
174
226
 
175
227
  ```json
@@ -207,6 +259,8 @@ This method uses `cmd` to properly handle paths with spaces in Windows.
207
259
  > ```
208
260
  >
209
261
  > Use `--allow-http` only on a network you fully control, and treat the token as compromised if you do.
262
+ > Over plain HTTP an on-path attacker can also trigger `mcp-remote`'s OAuth discovery and capture the
263
+ > token — see the [`mcp-remote` security note](#mcp-remote-security-note).
210
264
 
211
265
  If you accept that risk, add the `--allow-http` flag to the `mcp-remote` args:
212
266
 
@@ -273,7 +327,7 @@ See **[🔧 TOOLS.md](docs/TOOLS.md)** for complete tool documentation.
273
327
  ## Support
274
328
 
275
329
  - **Repository:** [GitHub](https://github.com/winccoa/winccoa-ae-js-mcpserver)
276
- - **Issues:** [Report Bug](https://github.com/winccoa/winccoa-ae-js-mcpserver/issues)
330
+ - **Issues:** [Report Bug](https://github.com/winccoa/winccoa-ae-js-mcpserver/issues) (not vulnerabilities: see [SECURITY.md](SECURITY.md))
277
331
  - **WinCC OA Docs:** [Official Documentation](https://www.winccoa.com/product-information/documentation.html)
278
332
 
279
333
  ## License
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@etm-professional-control/winccoa-mcp-server",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "MCP Server for WinCC OA with field-specific configurations",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "winccoa-mcp-stdio": "./build/index_stdio.js",
8
- "winccoa-mcp-http": "./build/index_http.js"
8
+ "winccoa-mcp-http": "./build/index_http.js",
9
+ "winccoa-mcp-install": "./postinstall.cjs"
9
10
  },
10
11
  "scripts": {
11
12
  "build": "node build.mjs",
package/postinstall.cjs CHANGED
@@ -8,14 +8,25 @@ const { buildRuntimeManifest } = require('./manifest.cjs');
8
8
  const packageJson = require('./package.json');
9
9
  const packageName = packageJson.name;
10
10
 
11
- // Determine the installation directory (where npm install was run)
12
- const installDir = process.env.INIT_CWD || process.cwd();
13
- const nodeModulesPath = path.join(installDir, 'node_modules', packageName);
11
+ // The package root is where this script lives. It is inside a node_modules folder
12
+ // whenever the package was installed (also hoisted or with a non-default layout);
13
+ // in a repository checkout it is not.
14
+ const packageRoot = __dirname;
15
+ const isInstalledPackage = packageRoot.split(path.sep).includes('node_modules');
16
+
17
+ // Two entry points share this script:
18
+ // - npm "postinstall" lifecycle (npm 11 and older): INIT_CWD is the directory where
19
+ // `npm install` was run, process.cwd() is the package folder itself.
20
+ // - the "winccoa-mcp-install" bin (`npx winccoa-mcp-install`, required on npm 12+,
21
+ // where install scripts are opt-in): the user's project directory is process.cwd().
22
+ const isLifecycle = process.env.npm_lifecycle_event === 'postinstall';
23
+ const installDir = path.resolve(isLifecycle ? (process.env.INIT_CWD || process.cwd()) : process.cwd());
24
+ const nodeModulesPath = packageRoot;
14
25
  const srcPath = path.join(nodeModulesPath, 'src');
15
26
 
16
- // Skip postinstall if running inside the package itself (development mode)
17
- // Check if we're in the package directory by comparing with process.cwd()
18
- const isDevMode = !fs.existsSync(nodeModulesPath) || process.cwd() === installDir;
27
+ // Skip when running inside the repository itself (development mode): the package is not
28
+ // installed under node_modules, or the target would be the package folder itself.
29
+ const isDevMode = !isInstalledPackage || installDir === path.resolve(packageRoot);
19
30
 
20
31
  if (isDevMode) {
21
32
  console.log('Development mode detected - skipping postinstall.');
@@ -38,6 +49,12 @@ try {
38
49
  const srcPath = path.join(buildDir, file.name);
39
50
  const destPath = path.join(installDir, file.name);
40
51
 
52
+ // User-owned files: never overwrite on a re-run. fields/ is handled below
53
+ // (per file, existing files are kept).
54
+ if (file.name === 'fields' || ((file.name === '.env' || file.name === 'systemprompt.md') && fs.existsSync(destPath))) {
55
+ continue;
56
+ }
57
+
41
58
  if (file.isDirectory()) {
42
59
  // Copy directory recursively
43
60
  fs.cpSync(srcPath, destPath, { recursive: true });
@@ -119,6 +136,7 @@ try {
119
136
 
120
137
 
121
138
  console.log('\n✅ Installation complete!');
139
+ console.log('(Safe to re-run: npx winccoa-mcp-install. Needed on npm 12+, where install scripts are opt-in.)');
122
140
  console.log('\nNext steps:');
123
141
  console.log('1. Copy the environment file: cp .env.example .env');
124
142
  console.log('2. Edit .env with your configuration');
@@ -130,6 +148,6 @@ try {
130
148
  }
131
149
 
132
150
  } catch (error) {
133
- console.error('Error during postinstall:', error.message);
151
+ console.error('Error during setup:', error.message);
134
152
  process.exit(1);
135
153
  }