@modelcontextprotocol/server-everything 2025.9.12 → 2025.9.25
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/dist/sse.js +7 -0
- package/dist/streamableHttp.js +12 -0
- package/package.json +3 -1
package/dist/sse.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
|
|
2
2
|
import express from "express";
|
|
3
3
|
import { createServer } from "./everything.js";
|
|
4
|
+
import cors from 'cors';
|
|
4
5
|
console.error('Starting SSE server...');
|
|
5
6
|
const app = express();
|
|
7
|
+
app.use(cors({
|
|
8
|
+
"origin": "*", // use "*" with caution in production
|
|
9
|
+
"methods": "GET,POST",
|
|
10
|
+
"preflightContinue": false,
|
|
11
|
+
"optionsSuccessStatus": 204,
|
|
12
|
+
})); // Enable CORS for all routes so Inspector can connect
|
|
6
13
|
const transports = new Map();
|
|
7
14
|
app.get("/sse", async (req, res) => {
|
|
8
15
|
let transport;
|
package/dist/streamableHttp.js
CHANGED
|
@@ -3,8 +3,20 @@ import { InMemoryEventStore } from '@modelcontextprotocol/sdk/examples/shared/in
|
|
|
3
3
|
import express from "express";
|
|
4
4
|
import { createServer } from "./everything.js";
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
|
+
import cors from 'cors';
|
|
6
7
|
console.error('Starting Streamable HTTP server...');
|
|
7
8
|
const app = express();
|
|
9
|
+
app.use(cors({
|
|
10
|
+
"origin": "*", // use "*" with caution in production
|
|
11
|
+
"methods": "GET,POST,DELETE",
|
|
12
|
+
"preflightContinue": false,
|
|
13
|
+
"optionsSuccessStatus": 204,
|
|
14
|
+
"exposedHeaders": [
|
|
15
|
+
'mcp-session-id',
|
|
16
|
+
'last-event-id',
|
|
17
|
+
'mcp-protocol-version'
|
|
18
|
+
]
|
|
19
|
+
})); // Enable CORS for all routes so Inspector can connect
|
|
8
20
|
const transports = new Map();
|
|
9
21
|
app.post('/mcp', async (req, res) => {
|
|
10
22
|
console.error('Received MCP POST request');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modelcontextprotocol/server-everything",
|
|
3
|
-
"version": "2025.9.
|
|
3
|
+
"version": "2025.9.25",
|
|
4
4
|
"description": "MCP server that exercises all the features of the MCP protocol",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Anthropic, PBC (https://anthropic.com)",
|
|
@@ -23,11 +23,13 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@modelcontextprotocol/sdk": "^1.18.0",
|
|
26
|
+
"cors": "^2.8.5",
|
|
26
27
|
"express": "^4.21.1",
|
|
27
28
|
"zod": "^3.23.8",
|
|
28
29
|
"zod-to-json-schema": "^3.23.5"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
32
|
+
"@types/cors": "^2.8.19",
|
|
31
33
|
"@types/express": "^5.0.0",
|
|
32
34
|
"shx": "^0.3.4",
|
|
33
35
|
"typescript": "^5.6.2"
|