outline-mcp-server 4.2.3 → 4.3.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 +6 -0
- package/bin/cli.js +17 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -38,12 +38,18 @@ OUTLINE_API_KEY=… npx outline-mcp-server
|
|
38
38
|
# or install from npm
|
39
39
|
npm install -g outline-mcp-server
|
40
40
|
OUTLINE_API_KEY=… outline-mcp-server
|
41
|
+
|
42
|
+
# Run with a custom port (default is 6060)
|
43
|
+
OUTLINE_API_KEY=… outline-mcp-server --port 7070
|
41
44
|
```
|
42
45
|
|
43
46
|
### Env
|
44
47
|
- `OUTLINE_API_KEY` (*required*): your API key for outline, duh
|
45
48
|
- `OUTLINE_BASE_URL` (*optional*): Alternative URL for your outline API (if using an alt domain/self-hosting)
|
46
49
|
|
50
|
+
### CLI Options
|
51
|
+
- `--port <number>` (*optional*): Specify the port on which the server will run (default: 6060)
|
52
|
+
|
47
53
|
### Usage
|
48
54
|
|
49
55
|
Once installed, you can use the MCP server with AI assistants that support the Model Context Protocol, such as Claude via Cursor.
|
package/bin/cli.js
CHANGED
@@ -8,6 +8,20 @@ import { dirname, resolve } from 'path';
|
|
8
8
|
const __filename = fileURLToPath(import.meta.url);
|
9
9
|
const __dirname = dirname(__filename);
|
10
10
|
|
11
|
+
// Parse command line arguments
|
12
|
+
const args = process.argv.slice(2);
|
13
|
+
let port = 6060; // Default port
|
14
|
+
|
15
|
+
// Parse --port argument
|
16
|
+
for (let i = 0; i < args.length; i++) {
|
17
|
+
if (args[i] === '--port' && i + 1 < args.length) {
|
18
|
+
port = parseInt(args[i + 1], 10);
|
19
|
+
// Remove these arguments so they don't get passed to supergateway
|
20
|
+
args.splice(i, 2);
|
21
|
+
i--;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
11
25
|
// Path to the built index.js file
|
12
26
|
const serverPath = resolve(__dirname, '../build/index.js');
|
13
27
|
|
@@ -16,7 +30,7 @@ const gateway = spawn('npx', [
|
|
16
30
|
'-y',
|
17
31
|
'supergateway',
|
18
32
|
'--port',
|
19
|
-
|
33
|
+
port.toString(),
|
20
34
|
'--stdio',
|
21
35
|
`node ${serverPath}`
|
22
36
|
], {
|
@@ -26,9 +40,11 @@ const gateway = spawn('npx', [
|
|
26
40
|
|
27
41
|
// Handle process exit
|
28
42
|
process.on('SIGINT', () => {
|
43
|
+
console.log('SIGINT received, killing outline-mcp-server');
|
29
44
|
gateway.kill('SIGINT');
|
30
45
|
});
|
31
46
|
|
32
47
|
gateway.on('close', (code) => {
|
48
|
+
console.log('outline-mcp-server exited with code', code);
|
33
49
|
process.exit(code);
|
34
50
|
});
|