mcp-word-bridge 3.2.3 → 3.2.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.
Files changed (3) hide show
  1. package/README.md +11 -9
  2. package/index.js +11 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -227,21 +227,23 @@ mcp-word-bridge/
227
227
  5. Changes go through Word's editing pipeline — cursor follows edits like a human typing
228
228
  6. When the MCP client terminates the process, the bridge server stops automatically
229
229
 
230
- ## Regenerating TLS Certificates
230
+ ## TLS Certificate
231
231
 
232
- A self-signed localhost certificate is **auto-generated on first run** if `certs/cert.pem` and `certs/key.pem` don't exist. No manual step needed.
232
+ A self-signed localhost certificate is **auto-generated on first run** if `certs/cert.pem` and `certs/key.pem` don't exist. The server prints the exact trust command with the resolved path:
233
233
 
234
- To trust the cert (required for Word to connect without warnings):
235
-
236
- **macOS:**
237
- ```bash
238
- sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain node_modules/mcp-word-bridge/certs/cert.pem
239
234
  ```
235
+ [mcp-word-bridge] ✓ Certificate generated.
236
+ [mcp-word-bridge]
237
+ [mcp-word-bridge] To trust the certificate (required once for Word to connect):
238
+ [mcp-word-bridge] security add-trusted-cert -r trustRoot -k ~/Library/Keychains/login.keychain-db "/path/to/certs/cert.pem"
239
+ ```
240
+
241
+ Run the printed command once. No `sudo` required — it adds to your user login keychain.
240
242
 
241
- **To regenerate manually:**
243
+ **To regenerate:**
242
244
  ```bash
243
245
  rm certs/cert.pem certs/key.pem
244
- node index.js # will regenerate on startup
246
+ # restart the MCP server — it will regenerate and print the trust command again
245
247
  ```
246
248
 
247
249
  ## Known Limitations & Word API Behavior
package/index.js CHANGED
@@ -40,8 +40,17 @@ function ensureCerts() {
40
40
  ].join('\n'));
41
41
  }
42
42
  execSync('openssl req -x509 -newkey rsa:2048 -keyout "' + keyPath + '" -out "' + certPath + '" -days 3650 -nodes -config "' + confPath + '"', { stdio: 'pipe' });
43
- process.stderr.write('[mcp-word-bridge] Certificate generated at ' + CERTS_DIR + '\n');
44
- process.stderr.write('[mcp-word-bridge] NOTE: You may need to trust this cert in your OS keychain for Word to connect.\n');
43
+ process.stderr.write('[mcp-word-bridge] Certificate generated.\n');
44
+ process.stderr.write('[mcp-word-bridge]\n');
45
+ process.stderr.write('[mcp-word-bridge] To trust the certificate (required once for Word to connect):\n');
46
+ if (process.platform === 'darwin') {
47
+ process.stderr.write('[mcp-word-bridge] security add-trusted-cert -r trustRoot -k ~/Library/Keychains/login.keychain-db "' + certPath + '"\n');
48
+ } else if (process.platform === 'win32') {
49
+ process.stderr.write('[mcp-word-bridge] certutil -user -addstore Root "' + certPath + '"\n');
50
+ } else {
51
+ process.stderr.write('[mcp-word-bridge] sudo cp "' + certPath + '" /usr/local/share/ca-certificates/ && sudo update-ca-certificates\n');
52
+ }
53
+ process.stderr.write('[mcp-word-bridge]\n');
45
54
  }
46
55
 
47
56
  ensureCerts();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-word-bridge",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "description": "MCP server for live Word document editing via Office Add-in",
5
5
  "main": "index.js",
6
6
  "bin": {