outline-mcp-server 5.0.1 → 5.2.0

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 CHANGED
@@ -1,12 +1,16 @@
1
1
  # Outline MCP Server
2
2
 
3
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=outline&config=eyJjb21tYW5kIjoibnB4IC15IG91dGxpbmUtbWNwLXNlcnZlci1zdGRpb0BsYXRlc3QiLCJlbnYiOnsiT1VUTElORV9BUElfS0VZIjoiPFJFUExBQ0VfTUU%2BIiwiT1VUTElORV9BUElfVVJMIjoiaHR0cHM6Ly9hcHAuZ2V0b3V0bGluZS5jb20vYXBpIiwiT1VUTElORV9NQ1BfUE9SVCI6IjYwNjAifX0%3D)
4
+
5
+ ![npm](https://img.shields.io/npm/v/outline-mcp-server) • ![downloads](https://img.shields.io/npm/dy/outline-mcp-server)
6
+
3
7
  A Model Context Protocol (MCP) server that provides tools for interacting with [Outline](https://www.getoutline.com/)'s API, enabling AI agents to manage documents, collections, and other entities programmatically through the Outline knowledge base platform.
4
8
 
5
- > **Upgrade Notice:**
9
+ ## 🚨 \***\*Upgrade Notice:\*\*** v5 has introduced several breaking changes: 🚨
6
10
 
7
- - v5 has introduced several breaking changes:
8
- - this server support for both `stdio` and `sse` transport interfaces. It now solely exposes a [Streamable HTTP endpoint](https://modelcontextprotocol.io/specification/draft/basic/transports#streamable-http) at the `/mcp` route. If you require sse/stdio, downgrade to v4
9
- - the `--port` CLI flag has been migrated to an environment variable, `OUTLINE_MCP_PORT`
11
+ - the `--port` CLI flag has been migrated to an environment variable, `OUTLINE_MCP_PORT`
12
+ - Minimum node version has been bumped to 20
13
+ - sse & stdio were removed in 5.0.0 but later re-introduced in 5.1.0 and 5.2.0 respectively
10
14
 
11
15
  ## Features
12
16
 
@@ -47,18 +51,35 @@ A Model Context Protocol (MCP) server that provides tools for interacting with [
47
51
  - Outline API key with appropriate permissions
48
52
  - Note: if you need to use the AI-powered ask feature, you must enable the "AI Answers" feature in your Outline Workspace settings
49
53
 
50
- ### Installation
54
+ ### Running directly
51
55
 
52
56
  ```bash
53
- # (preferred) Run directly with npx
54
- OUTLINE_API_KEY=... npx outline-mcp-server
57
+ # S-HTTP/SSE servers
58
+ OUTLINE_API_KEY=... npx outline-mcp-server@latest -y
55
59
 
56
- # or install from npm
57
- npm install -g outline-mcp-server
58
- OUTLINE_API_KEY=... outline-mcp-server
60
+ # STDIO
61
+ OUTLINE_API_KEY=... npx outline-mcp-server-stdio@latest -y
59
62
  ```
60
63
 
61
- ### Env
64
+ ### Cursor (mcp.json)
65
+
66
+ Add the following MCP definition to your configuration:
67
+
68
+ ```json
69
+ {
70
+ "outline": {
71
+ "command": "npx",
72
+ "args": ["-y", "outline-mcp-server-stdio@latest"],
73
+ "env": {
74
+ "OUTLINE_API_KEY": "<REPLACE_ME>",
75
+ "OUTLINE_API_URL": "https://app.getoutline.com/api",
76
+ "OUTLINE_MCP_PORT": "6060"
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ ### Env vars
62
83
 
63
84
  - `OUTLINE_API_KEY` (_required_): your API key for outline, duh
64
85
  - `OUTLINE_API_URL` (_optional_): Alternative URL for your outline API (if using an alt domain/self-hosting)
@@ -78,16 +99,6 @@ Example queries your AI assistant can now handle:
78
99
  - "Update the content of a document"
79
100
  - "Add a comment to a document"
80
101
 
81
- ### Run the MCP server
82
-
83
- ```bash
84
- # Default port 6060
85
- OUTLINE_API_KEY=... npm run start:http
86
-
87
- # Or specify a custom port
88
- OUTLINE_API_KEY=... OUTLINE_MCP_PORT=9001 npm run start:http
89
- ```
90
-
91
102
  ## Development
92
103
 
93
104
  ```bash
package/build/index.js CHANGED
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env bun
2
2
  import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
3
+ import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
3
4
  import fastify from 'fastify';
4
5
  import { getMcpServer } from './utils/getMcpServer.js';
5
- const server = fastify();
6
+ const mcpServer = await getMcpServer();
7
+ // HTTP mode - default behavior
8
+ const app = fastify();
6
9
  // Stateless mode (default, recommended for most deployments)
7
- server.post('/mcp', async (request, reply) => {
10
+ app.post('/mcp', async (request, reply) => {
8
11
  try {
9
- const mcpServer = await getMcpServer();
10
12
  const httpTransport = new StreamableHTTPServerTransport({
11
13
  sessionIdGenerator: undefined,
12
14
  });
@@ -30,7 +32,7 @@ server.post('/mcp', async (request, reply) => {
30
32
  }
31
33
  }
32
34
  });
33
- server.get('/mcp', async (request, reply) => {
35
+ app.get('/mcp', async (request, reply) => {
34
36
  reply.code(405).send({
35
37
  jsonrpc: '2.0',
36
38
  error: {
@@ -40,7 +42,7 @@ server.get('/mcp', async (request, reply) => {
40
42
  id: null,
41
43
  });
42
44
  });
43
- server.delete('/mcp', async (request, reply) => {
45
+ app.delete('/mcp', async (request, reply) => {
44
46
  reply.code(405).send({
45
47
  jsonrpc: '2.0',
46
48
  error: {
@@ -50,11 +52,44 @@ server.delete('/mcp', async (request, reply) => {
50
52
  id: null,
51
53
  });
52
54
  });
55
+ // Legacy SSE endpoint for older clients
56
+ let sseTransport = null;
57
+ app.get('/sse', async (request, reply) => {
58
+ try {
59
+ // Create SSE transport for legacy clients
60
+ if (!sseTransport) {
61
+ sseTransport = new SSEServerTransport('/messages', reply.raw);
62
+ await mcpServer.connect(sseTransport);
63
+ }
64
+ }
65
+ catch (error) {
66
+ console.error(error);
67
+ if (!reply.sent) {
68
+ reply.code(500).send({
69
+ jsonrpc: '2.0',
70
+ error: {
71
+ code: -32603,
72
+ message: 'Internal server error',
73
+ },
74
+ id: null,
75
+ });
76
+ }
77
+ }
78
+ });
79
+ // Legacy message endpoint for older clients
80
+ app.post('/messages', async (req, res) => {
81
+ if (!sseTransport) {
82
+ res.status(400).send('No transport found');
83
+ return;
84
+ }
85
+ await sseTransport.handlePostMessage(req.raw, res.raw, req.body);
86
+ });
53
87
  const PORT = process.env.OUTLINE_MCP_PORT ? parseInt(process.env.OUTLINE_MCP_PORT, 10) : 6060;
54
- server.listen({ port: PORT }, (err, address) => {
88
+ app.listen({ port: PORT }, (err, address) => {
55
89
  if (err) {
56
90
  console.error(err);
57
91
  process.exit(1);
58
92
  }
59
- console.log(`Outline MCP Server (streamable-http) running at ${address}/mcp`);
93
+ console.log(`\n\nOutline MCP Server running:\n\tstreamable-http: ${address}/mcp\n\tsse (deprecated): ${address}/sse\n\n`);
94
+ console.log('To use this MCP server in stdio mode, run it via `outline-mcp-server-stdio`.');
60
95
  });
@@ -9,7 +9,6 @@ const API_URL = process.env.OUTLINE_API_URL || 'https://app.getoutline.com/api';
9
9
  if (!API_KEY) {
10
10
  throw new Error('OUTLINE_API_KEY environment variable is required');
11
11
  }
12
- console.log('Connecting to API URL:', API_URL);
13
12
  // Create axios client with authentication
14
13
  export const outlineClient = axios.create({
15
14
  baseURL: API_URL,
package/build/stdio.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bun
2
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
+ import { getMcpServer } from './utils/getMcpServer.js';
4
+ const mcpServer = await getMcpServer();
5
+ // STDIO mode - for direct client connections
6
+ const transport = new StdioServerTransport();
7
+ await mcpServer.connect(transport);
8
+ // must not write to stdout according to mcp spec
9
+ console.error('Outline MCP Server running in STDIO mode');
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "outline-mcp-server",
3
- "version": "5.0.1",
3
+ "version": "5.2.0",
4
4
  "description": "An MCP server for interacting with Outline's API",
5
5
  "type": "module",
6
6
  "bin": {
7
- "outline-mcp-server": "./build/index.js"
7
+ "outline-mcp-server": "./build/index.js",
8
+ "outline-mcp-server-stdio": "./build/stdio.js"
8
9
  },
9
10
  "files": [
10
- "build",
11
- "bin"
11
+ "build"
12
12
  ],
13
13
  "author": {
14
14
  "name": "Matt Frey",
@@ -19,30 +19,31 @@
19
19
  "url": "https://github.com/mmmeff/outline-mcp-server"
20
20
  },
21
21
  "scripts": {
22
- "build": "tsc && chmod +x build/index.js",
22
+ "build": "tsc && chmod +x build/index.js && chmod +x build/stdio.js",
23
23
  "prepare": "npm run build",
24
24
  "watch": "bun --watch src/index.ts",
25
+ "watch:stdio": "bun --watch src/stdio.ts",
25
26
  "dev": "concurrently -n 'build,inspector' -c 'blue.bold,green.bold' 'npm run watch' 'npm run inspector'",
26
- "inspector": "npx @modelcontextprotocol/inspector@latest -y",
27
+ "inspector": "npx @modelcontextprotocol/inspector@latest",
27
28
  "start": "bun build/index.js",
28
29
  "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\"",
29
30
  "semantic-release": "semantic-release"
30
31
  },
31
32
  "dependencies": {
32
- "@modelcontextprotocol/sdk": "1.12.1",
33
- "axios": "1.9.0",
34
- "bun": "^1.2.15",
33
+ "@modelcontextprotocol/sdk": "1.13.1",
34
+ "axios": "1.10.0",
35
35
  "dotenv": "16.5.0",
36
- "fastify": "^4.28.1",
36
+ "fastify": "5.4.0",
37
37
  "omit-ts": "^2.0.1",
38
- "zod": "3.25.61"
38
+ "zod": "3.25.67"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@semantic-release/changelog": "^6.0.3",
42
42
  "@semantic-release/git": "^10.0.1",
43
- "@types/node": "20.x",
44
- "concurrently": "^9.1.2",
45
- "prettier": "^3.2.5",
43
+ "@types/node": "20.19.1",
44
+ "bun": "^1.2.17",
45
+ "concurrently": "^9.2.0",
46
+ "prettier": "3.6.0",
46
47
  "semantic-release": "^22.0.12",
47
48
  "typescript": "5.x"
48
49
  },