outline-mcp-server 4.2.2 → 4.2.3

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 (2) hide show
  1. package/bin/cli.js +34 -0
  2. package/package.json +5 -4
package/bin/cli.js ADDED
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from 'child_process';
4
+ import { fileURLToPath } from 'url';
5
+ import { dirname, resolve } from 'path';
6
+
7
+ // Get the directory of the current script
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
10
+
11
+ // Path to the built index.js file
12
+ const serverPath = resolve(__dirname, '../build/index.js');
13
+
14
+ // Spawn the supergateway process
15
+ const gateway = spawn('npx', [
16
+ '-y',
17
+ 'supergateway',
18
+ '--port',
19
+ '6060',
20
+ '--stdio',
21
+ `node ${serverPath}`
22
+ ], {
23
+ stdio: 'inherit',
24
+ shell: true
25
+ });
26
+
27
+ // Handle process exit
28
+ process.on('SIGINT', () => {
29
+ gateway.kill('SIGINT');
30
+ });
31
+
32
+ gateway.on('close', (code) => {
33
+ process.exit(code);
34
+ });
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "outline-mcp-server",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "description": "An MCP server for interacting with Outline's API",
5
5
  "type": "module",
6
6
  "bin": {
7
- "outline-mcp-server": "npm run start"
7
+ "outline-mcp-server": "./bin/cli.js"
8
8
  },
9
9
  "files": [
10
- "build"
10
+ "build",
11
+ "bin"
11
12
  ],
12
13
  "author": {
13
14
  "name": "Matt Frey",
@@ -18,7 +19,7 @@
18
19
  "url": "https://github.com/mmmeff/outline-mcp-server"
19
20
  },
20
21
  "scripts": {
21
- "build": "tsc && chmod +x build/index.js",
22
+ "build": "tsc && chmod +x build/index.js && chmod +x bin/cli.js",
22
23
  "prepare": "npm run build",
23
24
  "watch": "tsc --watch",
24
25
  "inspector": "npx @modelcontextprotocol/inspector build/index.js",