@modelcontextprotocol/server-everything 2026.7.4 → 2026.8.31

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
@@ -113,7 +113,7 @@ npm run start:streamableHttp
113
113
  ### Install
114
114
  ```shell
115
115
  npm install -g @modelcontextprotocol/server-everything@latest
116
- ````
116
+ ```
117
117
 
118
118
  ### Run the default (stdio) server
119
119
  ```shell
@@ -54,7 +54,7 @@
54
54
  - `prompts: {}`
55
55
  - `resources: { subscribe: true }`
56
56
  - **Server Instructions**
57
- - Loaded from the docs folder (`server-instructions.md`).
57
+ - Loaded from the docs folder (`instructions.md`).
58
58
  - **Registrations**
59
59
  - Registers **tools** via `registerTools(server)`.
60
60
  - Registers **resources** via `registerResources(server)`.
@@ -85,9 +85,19 @@ src/everything
85
85
  ### `docs/`
86
86
 
87
87
  - `architecture.md`
88
- - This document.
88
+ - Describes the server architecture, including transport layers, session initialization, and primitive registration.
89
+ - `extension.md`
90
+ - Explains how to extend the server with new tools, prompts, resources, or transports.
91
+ - `features.md`
92
+ - A comprehensive reference listing all implemented prompts, resources, tools, and protocol behaviors.
93
+ - `how-it-works.md`
94
+ - Explains how SSE and Streamable HTTP transports are set up and how sessions are managed.
89
95
  - `instructions.md`
90
96
  - Human‑readable instructions intended to be passed to the client/LLM as guidance on server use. Loaded by the server at startup and returned in the initialize exchange.
97
+ - `startup.md`
98
+ - Describes the server startup sequence, environment checks, and initialization.
99
+ - `structure.md`
100
+ - This document.
91
101
 
92
102
  ### `prompts/`
93
103
 
@@ -65,10 +65,9 @@ export const setSubscriptionHandlers = (server) => {
65
65
  /**
66
66
  * Sends simulated resource update notifications to the subscribed client.
67
67
  *
68
- * This function iterates through all resource URIs stored in the subscriptions
69
- * and checks if the specified session ID is subscribed to them. If so, it sends
70
- * a notification through the provided server. If the session ID is no longer valid
71
- * (disconnected), it removes the session ID from the list of subscribers.
68
+ * Iterates the URIs in `subscriptions` and emits a
69
+ * `notifications/resources/updated` notification for each URI the given
70
+ * sessionId is subscribed to.
72
71
  *
73
72
  * @param {McpServer} server - The server instance used to send notifications.
74
73
  * @param {string | undefined} sessionId - The session ID of the client to check for subscriptions.
@@ -85,9 +84,6 @@ const sendSimulatedResourceUpdates = async (server, sessionId) => {
85
84
  params: { uri },
86
85
  });
87
86
  }
88
- else {
89
- subscribers.delete(sessionId); // subscriber has disconnected
90
- }
91
87
  }
92
88
  };
93
89
  /**
@@ -101,31 +101,26 @@ export const textResourceUri = (resourceId) => new URL(`${textUriBase}/${resourc
101
101
  */
102
102
  export const blobResourceUri = (resourceId) => new URL(`${blobUriBase}/${resourceId}`);
103
103
  /**
104
- * Parses the resource identifier from the provided URI and validates it
105
- * against the given variables. Throws an error if the URI corresponds
106
- * to an unknown resource or if the resource identifier is invalid.
104
+ * Parses the resource identifier from the provided variables and validates
105
+ * that it is a positive integer.
107
106
  *
108
- * @param {URL} uri - The URI of the resource to be parsed.
109
- * @param {Record<string, unknown>} variables - A record containing context-specific variables that include the resourceId.
110
- * @returns {number} The parsed and validated resource identifier as an integer.
111
- * @throws {Error} Throws an error if the URI matches unsupported base URIs or if the resourceId is invalid.
107
+ * The SDK only routes URIs that match the registered template to the
108
+ * resource handler, so by the time we get here the URI prefix is already
109
+ * known to be one of `textUriBase` / `blobUriBase`. Only the resourceId
110
+ * variable still needs validating.
111
+ *
112
+ * @param {URL} uri - The URI of the resource (used in the error message).
113
+ * @param {Record<string, unknown>} variables - Context variables including resourceId.
114
+ * @returns {number} The parsed and validated resource identifier as a positive integer.
115
+ * @throws {Error} If the resourceId is not a finite positive integer.
112
116
  */
113
117
  const parseResourceId = (uri, variables) => {
114
- const uriError = `Unknown resource: ${uri.toString()}`;
115
- if (uri.toString().startsWith(textUriBase) &&
116
- uri.toString().startsWith(blobUriBase)) {
117
- throw new Error(uriError);
118
- }
119
- else {
120
- const idxStr = String(variables.resourceId ?? "");
121
- const idx = Number(idxStr);
122
- if (Number.isFinite(idx) && Number.isInteger(idx) && idx > 0) {
123
- return idx;
124
- }
125
- else {
126
- throw new Error(uriError);
127
- }
118
+ const idxStr = String(variables.resourceId ?? "");
119
+ const idx = Number(idxStr);
120
+ if (Number.isFinite(idx) && Number.isInteger(idx) && idx > 0) {
121
+ return idx;
128
122
  }
123
+ throw new Error(`Unknown resource: ${uri.toString()}`);
129
124
  };
130
125
  /**
131
126
  * Register resource templates with the MCP server.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/server-everything",
3
- "version": "2026.7.4",
3
+ "version": "2026.8.31",
4
4
  "description": "MCP server that exercises all the features of the MCP protocol",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "mcpName": "io.github.modelcontextprotocol/server-everything",
@@ -30,7 +30,7 @@
30
30
  "test": "vitest run --coverage"
31
31
  },
32
32
  "dependencies": {
33
- "@modelcontextprotocol/sdk": "^1.29.0",
33
+ "@modelcontextprotocol/sdk": "^1.30.0",
34
34
  "cors": "^2.8.5",
35
35
  "express": "^5.2.1",
36
36
  "jszip": "^3.10.1",
@@ -41,7 +41,7 @@
41
41
  "@types/express": "^5.0.6",
42
42
  "@vitest/coverage-v8": "^4.1.8",
43
43
  "prettier": "^2.8.8",
44
- "shx": "^0.3.4",
44
+ "shx": "^0.4.0",
45
45
  "typescript": "^5.6.2",
46
46
  "vitest": "^4.1.8"
47
47
  }