outline-mcp-server 5.0.1 → 5.1.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 +9 -5
- package/build/index.js +39 -6
- package/package.json +2 -2
package/README.md
CHANGED
@@ -2,11 +2,15 @@
|
|
2
2
|
|
3
3
|
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
4
|
|
5
|
-
|
6
|
-
|
7
|
-
-
|
8
|
-
-
|
9
|
-
|
5
|
+
## 🚨 \***\*Upgrade Notice:\*\*** v5 has introduced several breaking changes: 🚨
|
6
|
+
|
7
|
+
- support has been dropped for the `stdio` transport interfaces.
|
8
|
+
- This server now exposes:
|
9
|
+
- a [Streamable-HTTP endpoint](https://modelcontextprotocol.io/specification/draft/basic/transports#streamable-http) at the `/mcp` route.
|
10
|
+
- an SSE endpoint at `/sse`
|
11
|
+
- If you require stdio, downgrade to v4
|
12
|
+
- the `--port` CLI flag has been migrated to an environment variable, `OUTLINE_MCP_PORT`
|
13
|
+
- Minimum node version has been bumped to 20
|
10
14
|
|
11
15
|
## Features
|
12
16
|
|
package/build/index.js
CHANGED
@@ -1,12 +1,13 @@
|
|
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
|
6
|
+
const app = fastify();
|
7
|
+
const mcpServer = await getMcpServer();
|
6
8
|
// Stateless mode (default, recommended for most deployments)
|
7
|
-
|
9
|
+
app.post('/mcp', async (request, reply) => {
|
8
10
|
try {
|
9
|
-
const mcpServer = await getMcpServer();
|
10
11
|
const httpTransport = new StreamableHTTPServerTransport({
|
11
12
|
sessionIdGenerator: undefined,
|
12
13
|
});
|
@@ -30,7 +31,7 @@ server.post('/mcp', async (request, reply) => {
|
|
30
31
|
}
|
31
32
|
}
|
32
33
|
});
|
33
|
-
|
34
|
+
app.get('/mcp', async (request, reply) => {
|
34
35
|
reply.code(405).send({
|
35
36
|
jsonrpc: '2.0',
|
36
37
|
error: {
|
@@ -40,7 +41,7 @@ server.get('/mcp', async (request, reply) => {
|
|
40
41
|
id: null,
|
41
42
|
});
|
42
43
|
});
|
43
|
-
|
44
|
+
app.delete('/mcp', async (request, reply) => {
|
44
45
|
reply.code(405).send({
|
45
46
|
jsonrpc: '2.0',
|
46
47
|
error: {
|
@@ -50,8 +51,40 @@ server.delete('/mcp', async (request, reply) => {
|
|
50
51
|
id: null,
|
51
52
|
});
|
52
53
|
});
|
54
|
+
// Legacy SSE endpoint for older clients
|
55
|
+
let sseTransport = null;
|
56
|
+
app.get('/sse', async (request, reply) => {
|
57
|
+
try {
|
58
|
+
// Create SSE transport for legacy clients
|
59
|
+
if (!sseTransport) {
|
60
|
+
sseTransport = new SSEServerTransport('/messages', reply.raw);
|
61
|
+
await mcpServer.connect(sseTransport);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
catch (error) {
|
65
|
+
console.error(error);
|
66
|
+
if (!reply.sent) {
|
67
|
+
reply.code(500).send({
|
68
|
+
jsonrpc: '2.0',
|
69
|
+
error: {
|
70
|
+
code: -32603,
|
71
|
+
message: 'Internal server error',
|
72
|
+
},
|
73
|
+
id: null,
|
74
|
+
});
|
75
|
+
}
|
76
|
+
}
|
77
|
+
});
|
78
|
+
// Legacy message endpoint for older clients
|
79
|
+
app.post('/messages', async (req, res) => {
|
80
|
+
if (!sseTransport) {
|
81
|
+
res.status(400).send('No transport found');
|
82
|
+
return;
|
83
|
+
}
|
84
|
+
await sseTransport.handlePostMessage(req.raw, res.raw, req.body);
|
85
|
+
});
|
53
86
|
const PORT = process.env.OUTLINE_MCP_PORT ? parseInt(process.env.OUTLINE_MCP_PORT, 10) : 6060;
|
54
|
-
|
87
|
+
app.listen({ port: PORT }, (err, address) => {
|
55
88
|
if (err) {
|
56
89
|
console.error(err);
|
57
90
|
process.exit(1);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "outline-mcp-server",
|
3
|
-
"version": "5.0
|
3
|
+
"version": "5.1.0",
|
4
4
|
"description": "An MCP server for interacting with Outline's API",
|
5
5
|
"type": "module",
|
6
6
|
"bin": {
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"prepare": "npm run build",
|
24
24
|
"watch": "bun --watch src/index.ts",
|
25
25
|
"dev": "concurrently -n 'build,inspector' -c 'blue.bold,green.bold' 'npm run watch' 'npm run inspector'",
|
26
|
-
"inspector": "npx @modelcontextprotocol/inspector@latest
|
26
|
+
"inspector": "npx @modelcontextprotocol/inspector@latest",
|
27
27
|
"start": "bun build/index.js",
|
28
28
|
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\"",
|
29
29
|
"semantic-release": "semantic-release"
|