@acid-cat/mcp-handshake 0.23.0 → 0.25.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
@@ -39,7 +39,7 @@ const mcp = Mcp.withHandshake(Mcp.toWebHandler(app, layer, options));
39
39
  - Each request gets the [headers](../../spec/surfaces/mcp.md#headers) that the handler checks: `Mcp-Method`, and for `tools/call` `Mcp-Name` and one `Mcp-Param-*` header for each argument whose property has `x-mcp-header`. To find these properties, the wrapper first asks the handler for `tools/list`, because it keeps no state.
40
40
  - A response that is not 2xx comes back unchanged.
41
41
  - A `GET` request of the [Server Card](../../spec/surfaces/mcp.md#server-card) (`<MCP URL>/server-card`) goes to the handler. The wrapper adds `2025-11-25` and `2025-06-18` to the `supportedProtocolVersions` of each remote of the card, gives the card a new `ETag`, and answers `If-None-Match` itself.
42
- - `initialize` returns the result of `server/discover` in the handshake's shape. `ping` returns an empty result. A notification gets 202. Any other method gets the JSON-RPC error `-32601`.
42
+ - `initialize` returns the result of `server/discover` in the handshake's shape, without the events extension, the skills extension and `resources`, which are only for revision `2026-07-28`. `ping` returns an empty result. A notification gets 202. Any other method gets the JSON-RPC error `-32601`.
43
43
  - Results carry no `_meta`, `resultType`, `ttlMs` or `cacheScope` member. A JSON-RPC error has HTTP status 200.
44
44
 
45
45
  Because the wrapper keeps no session, it never sends `notifications/tools/list_changed`, and it declares `"tools": { "listChanged": false }`. A client that needs to see tool changes must use revision `2026-07-28` or MCP through stdio.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { MCP_EVENTS_EXTENSION, MCP_PROTOCOL_VERSION, MCP_PROTOCOL_VERSION_KEY, MCP_SERVER_CARD_MEDIA_TYPE, isJsonObject, mcpDiscovered, mcpParamHeaders, mcpServerCardResponse, mcpServerUrlOfCardRequest, mcpWrappedRequest } from "@acid-cat/spec-ts";
1
+ import { MCP_EVENTS_EXTENSION, MCP_PROTOCOL_VERSION, MCP_PROTOCOL_VERSION_KEY, MCP_SERVER_CARD_MEDIA_TYPE, MCP_SKILLS_EXTENSION, isJsonObject, mcpDiscovered, mcpParamHeaders, mcpServerCardResponse, mcpServerUrlOfCardRequest, mcpWrappedRequest } from "@acid-cat/spec-ts";
2
2
  // ../shared-ts/src/request-body.ts
3
3
  async function readBounded(request, maximumBytes) {
4
4
  if (request.body === null) return { text: "" };
@@ -147,15 +147,15 @@ function asCurrentRevisionRequest(request, method, params, paramHeaders = {}) {
147
147
  }
148
148
  /**
149
149
  * The result of `initialize`, from the result of `server/discover`. The wrapper keeps no session, so it cannot send
150
- * `notifications/tools/list_changed`. The events extension is only for revision 2026-07-28, so the capabilities do not
151
- * have it (spec/surfaces/mcp.md#events).
150
+ * `notifications/tools/list_changed`. The events and skills extensions are only for revision 2026-07-28, so the
151
+ * capabilities do not have them, nor the resources of the skills (spec/surfaces/mcp.md#events, spec/surfaces/mcp.md#methods).
152
152
  */
153
153
  function initializeResult(offered, discovered) {
154
154
  const { name = "", version = "", instructions, capabilities = {} } = mcpDiscovered(discovered);
155
155
  return {
156
156
  protocolVersion: HANDSHAKE_VERSIONS.find((each) => each === offered) ?? LATEST_HANDSHAKE_VERSION,
157
157
  capabilities: {
158
- ...withoutEvents(capabilities),
158
+ ...withoutExtensions(capabilities),
159
159
  tools: { listChanged: false }
160
160
  },
161
161
  serverInfo: {
@@ -165,10 +165,10 @@ function initializeResult(offered, discovered) {
165
165
  ...instructions === void 0 ? {} : { instructions }
166
166
  };
167
167
  }
168
- function withoutEvents(capabilities) {
169
- const { extensions, ...rest } = capabilities;
170
- if (!isJsonObject(extensions)) return capabilities;
171
- const { [MCP_EVENTS_EXTENSION]: _, ...others } = extensions;
168
+ function withoutExtensions(capabilities) {
169
+ const { extensions, resources: _resources, ...rest } = capabilities;
170
+ if (!isJsonObject(extensions)) return rest;
171
+ const { [MCP_EVENTS_EXTENSION]: _events, [MCP_SKILLS_EXTENSION]: _skills, ...others } = extensions;
172
172
  return Object.keys(others).length === 0 ? rest : {
173
173
  ...rest,
174
174
  extensions: others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acid-cat/mcp-handshake",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "Serve MCP clients of the revisions with an initialize handshake from an AcidCat MCP server through HTTP, with no state. Part of the TypeScript reference implementation.",
5
5
  "keywords": [
6
6
  "acidcat",
@@ -31,10 +31,10 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@acid-cat/spec-ts": "0.23.0"
34
+ "@acid-cat/spec-ts": "0.25.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@acid-cat/shared-ts": "0.23.0",
37
+ "@acid-cat/shared-ts": "0.25.0",
38
38
  "@types/node": "26.6.6",
39
39
  "tsdown": "0.23.7",
40
40
  "typescript": "7.0.2"