mcp-word-bridge 3.2.0 → 3.2.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.
- package/README.md +18 -15
- package/install-manifest.js +45 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -12,14 +12,16 @@ Single process. The MCP client spawns `index.js`, which starts both the HTTPS br
|
|
|
12
12
|
|
|
13
13
|
## Setup
|
|
14
14
|
|
|
15
|
-
### 1.
|
|
16
|
-
|
|
17
|
-
Copy the manifest to Word's sideload directory:
|
|
15
|
+
### 1. Install and sideload the add-in
|
|
18
16
|
|
|
19
17
|
```bash
|
|
20
|
-
|
|
18
|
+
npx mcp-word-bridge-install
|
|
21
19
|
```
|
|
22
20
|
|
|
21
|
+
This copies the manifest into Word's sideload directory. On macOS it's automatic; on Windows it attempts the standard location and prints manual steps if needed.
|
|
22
|
+
|
|
23
|
+
Restart Word → Home → Add-ins → **MCP Word Bridge**
|
|
24
|
+
|
|
23
25
|
### 2. Add MCP config
|
|
24
26
|
|
|
25
27
|
Add to your MCP client configuration (e.g. `.kiro/settings/mcp.json`):
|
|
@@ -28,8 +30,8 @@ Add to your MCP client configuration (e.g. `.kiro/settings/mcp.json`):
|
|
|
28
30
|
{
|
|
29
31
|
"mcpServers": {
|
|
30
32
|
"word-bridge": {
|
|
31
|
-
"command": "
|
|
32
|
-
"args": ["
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "mcp-word-bridge"],
|
|
33
35
|
"disabled": false
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -51,15 +53,16 @@ That's it. The MCP server starts automatically when your MCP client loads the co
|
|
|
51
53
|
## File Layout
|
|
52
54
|
|
|
53
55
|
```
|
|
54
|
-
word-
|
|
55
|
-
├── index.js
|
|
56
|
-
├──
|
|
57
|
-
├── taskpane
|
|
56
|
+
mcp-word-bridge/
|
|
57
|
+
├── index.js # Single entry point (MCP + bridge server)
|
|
58
|
+
├── install-manifest.js # Manifest sideloader (npx mcp-word-bridge-install)
|
|
59
|
+
├── taskpane.html # Served to Word add-in
|
|
60
|
+
├── taskpane-app.js # Client-side Word JS API logic
|
|
58
61
|
├── certs/
|
|
59
|
-
│ ├── cert.pem
|
|
60
|
-
│
|
|
61
|
-
|
|
62
|
-
├──
|
|
62
|
+
│ ├── cert.pem # Self-signed TLS cert
|
|
63
|
+
│ ├── key.pem # TLS private key
|
|
64
|
+
│ └── cert.conf # OpenSSL config for cert regeneration
|
|
65
|
+
├── manifest.xml # Office add-in manifest
|
|
63
66
|
├── package.json
|
|
64
67
|
└── README.md
|
|
65
68
|
```
|
|
@@ -114,7 +117,7 @@ word-addin/
|
|
|
114
117
|
The self-signed cert is required for the HTTPS connection to the taskpane. To regenerate:
|
|
115
118
|
|
|
116
119
|
```bash
|
|
117
|
-
openssl req -x509 -newkey rsa:2048 -keyout certs/key.pem -out certs/cert.pem -days 3650 -nodes -config cert.conf
|
|
120
|
+
openssl req -x509 -newkey rsa:2048 -keyout certs/key.pem -out certs/cert.pem -days 3650 -nodes -config certs/cert.conf
|
|
118
121
|
```
|
|
119
122
|
|
|
120
123
|
Then trust the cert in Keychain Access (macOS) to avoid browser warnings.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Sideload the Word add-in manifest.
|
|
4
|
+
* Run manually: npx mcp-word-bridge-install
|
|
5
|
+
* Or: node node_modules/mcp-word-bridge/install-manifest.js
|
|
6
|
+
*/
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const os = require('os');
|
|
10
|
+
|
|
11
|
+
const manifestSrc = path.join(__dirname, 'manifest.xml');
|
|
12
|
+
|
|
13
|
+
if (process.platform === 'darwin') {
|
|
14
|
+
const wefDir = path.join(os.homedir(), 'Library/Containers/com.microsoft.Word/Data/Documents/wef');
|
|
15
|
+
const dest = path.join(wefDir, 'manifest.xml');
|
|
16
|
+
|
|
17
|
+
if (!fs.existsSync(wefDir)) {
|
|
18
|
+
fs.mkdirSync(wefDir, { recursive: true });
|
|
19
|
+
}
|
|
20
|
+
fs.copyFileSync(manifestSrc, dest);
|
|
21
|
+
console.log('✓ Manifest installed to: ' + dest);
|
|
22
|
+
console.log(' Restart Word, then: Home → Add-ins → MCP Word Bridge');
|
|
23
|
+
} else if (process.platform === 'win32') {
|
|
24
|
+
const wefDir = path.join(os.homedir(), 'AppData', 'Local', 'Microsoft', 'Office', '16.0', 'Wef');
|
|
25
|
+
try {
|
|
26
|
+
if (!fs.existsSync(wefDir)) {
|
|
27
|
+
fs.mkdirSync(wefDir, { recursive: true });
|
|
28
|
+
}
|
|
29
|
+
const dest = path.join(wefDir, 'manifest.xml');
|
|
30
|
+
fs.copyFileSync(manifestSrc, dest);
|
|
31
|
+
console.log('✓ Manifest installed to: ' + dest);
|
|
32
|
+
console.log(' Restart Word, then: Insert → My Add-ins → Developer Add-ins');
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.log('Could not auto-install manifest on Windows.');
|
|
35
|
+
console.log('Manual steps:');
|
|
36
|
+
console.log(' 1. Copy this file to a local folder: ' + manifestSrc);
|
|
37
|
+
console.log(' 2. In Word: File → Options → Trust Center → Trusted Add-in Catalogs');
|
|
38
|
+
console.log(' 3. Add the folder path as a catalog');
|
|
39
|
+
console.log(' 4. Insert → My Add-ins → Shared Folder → MCP Word Bridge');
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
console.log('Platform not supported for local sideloading.');
|
|
43
|
+
console.log('For Word on the Web, upload the manifest via the admin center.');
|
|
44
|
+
console.log('Manifest location: ' + manifestSrc);
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-word-bridge",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "MCP server for live Word document editing via Office Add-in",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"mcp-word-bridge": "index.js"
|
|
7
|
+
"mcp-word-bridge": "index.js",
|
|
8
|
+
"mcp-word-bridge-install": "install-manifest.js"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
|
-
"start": "node index.js"
|
|
11
|
+
"start": "node index.js",
|
|
12
|
+
"install-manifest": "node install-manifest.js"
|
|
11
13
|
},
|
|
12
14
|
"keywords": ["mcp", "word", "office", "add-in", "document", "editing"],
|
|
13
15
|
"author": "Leonid Mokrushin <likelion@gmail.com>",
|