@modelcontextprotocol/server-everything 2025.4.28 → 2025.5.12

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
@@ -173,7 +173,7 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
173
173
  }
174
174
  ```
175
175
 
176
- ## Run with [HTTP+SSE Transport](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse) (deprecated as of [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports))
176
+ ## Running from source with [HTTP+SSE Transport](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse) (deprecated as of [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports))
177
177
 
178
178
  ```shell
179
179
  cd src/everything
@@ -181,10 +181,37 @@ npm install
181
181
  npm run start:sse
182
182
  ```
183
183
 
184
- ## Run with [Streamable HTTP Transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http)
184
+ ## Run from source with [Streamable HTTP Transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http)
185
185
 
186
186
  ```shell
187
187
  cd src/everything
188
188
  npm install
189
189
  npm run start:streamableHttp
190
190
  ```
191
+
192
+ ## Running as an installed package
193
+ ### Install
194
+ ```shell
195
+ npm install -g @modelcontextprotocol/server-everything@latest
196
+ ````
197
+
198
+ ### Run the default (stdio) server
199
+ ```shell
200
+ npx @modelcontextprotocol/server-everything
201
+ ```
202
+
203
+ ### Or specify stdio explicitly
204
+ ```shell
205
+ npx @modelcontextprotocol/server-everything stdio
206
+ ```
207
+
208
+ ### Run the SSE server
209
+ ```shell
210
+ npx @modelcontextprotocol/server-everything sse
211
+ ```
212
+
213
+ ### Run the streamable HTTP server
214
+ ```shell
215
+ npx @modelcontextprotocol/server-everything streamableHttp
216
+ ```
217
+
package/dist/index.js CHANGED
@@ -1,18 +1,36 @@
1
1
  #!/usr/bin/env node
2
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
- import { createServer } from "./everything.js";
4
- async function main() {
5
- const transport = new StdioServerTransport();
6
- const { server, cleanup } = createServer();
7
- await server.connect(transport);
8
- // Cleanup on exit
9
- process.on("SIGINT", async () => {
10
- await cleanup();
11
- await server.close();
12
- process.exit(0);
13
- });
2
+ // Parse command line arguments first
3
+ const args = process.argv.slice(2);
4
+ const scriptName = args[0] || 'stdio';
5
+ async function run() {
6
+ try {
7
+ // Dynamically import only the requested module to prevent all modules from initializing
8
+ switch (scriptName) {
9
+ case 'stdio':
10
+ // Import and run the default server
11
+ await import('./stdio.js');
12
+ break;
13
+ case 'sse':
14
+ // Import and run the SSE server
15
+ await import('./sse.js');
16
+ break;
17
+ case 'streamableHttp':
18
+ // Import and run the streamable HTTP server
19
+ await import('./streamableHttp.js');
20
+ break;
21
+ default:
22
+ console.error(`Unknown script: ${scriptName}`);
23
+ console.log('Available scripts:');
24
+ console.log('- stdio');
25
+ console.log('- sse');
26
+ console.log('- streamableHttp');
27
+ process.exit(1);
28
+ }
29
+ }
30
+ catch (error) {
31
+ console.error('Error running script:', error);
32
+ process.exit(1);
33
+ }
14
34
  }
15
- main().catch((error) => {
16
- console.error("Server error:", error);
17
- process.exit(1);
18
- });
35
+ run();
36
+ export {};
package/dist/sse.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
2
2
  import express from "express";
3
3
  import { createServer } from "./everything.js";
4
+ console.error('Starting SSE server...');
4
5
  const app = express();
5
6
  const { server, cleanup } = createServer();
6
7
  let transport;
package/dist/stdio.js ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
+ import { createServer } from "./everything.js";
4
+ console.error('Starting default (STDIO) server...');
5
+ async function main() {
6
+ const transport = new StdioServerTransport();
7
+ const { server, cleanup } = createServer();
8
+ await server.connect(transport);
9
+ // Cleanup on exit
10
+ process.on("SIGINT", async () => {
11
+ await cleanup();
12
+ await server.close();
13
+ process.exit(0);
14
+ });
15
+ }
16
+ main().catch((error) => {
17
+ console.error("Server error:", error);
18
+ process.exit(1);
19
+ });
@@ -3,6 +3,7 @@ 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
+ console.error('Starting Streamable HTTP server...');
6
7
  const app = express();
7
8
  const { server, cleanup } = createServer();
8
9
  const transports = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/server-everything",
3
- "version": "2025.4.28",
3
+ "version": "2025.5.12",
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)",
@@ -22,7 +22,7 @@
22
22
  "start:streamableHttp": "node dist/streamableHttp.js"
23
23
  },
24
24
  "dependencies": {
25
- "@modelcontextprotocol/sdk": "^1.10.1",
25
+ "@modelcontextprotocol/sdk": "^1.11.0",
26
26
  "express": "^4.21.1",
27
27
  "zod": "^3.23.8",
28
28
  "zod-to-json-schema": "^3.23.5"