@acid-cat/mcp-handshake 0.14.0 → 0.16.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 +13 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @acid-cat/mcp-handshake
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@acid-cat/mcp-handshake` lets an MCP server that speaks only revision `2026-07-28` also serve clients that open with the [`initialize` handshake of earlier revisions](../../spec/bindings/mcp.md#earlier-revisions-through-http) (`2025-11-25` and `2025-06-18`). Many MCP clients still use that handshake.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`mcpHandshake(handler)` wraps a web handler of the [MCP binding through HTTP](../../spec/bindings/mcp.md#http) and returns a new web handler. The wrapper keeps no state. It works in front of any web handler that serves revision `2026-07-28`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The package is part of the TypeScript reference implementation. You usually get it through a core: [`@acid-cat/core-ts`](../core-ts) re-exports it as `mcpHandshake`, and [`@acid-cat/core-effect`](../core-effect) as `Mcp.withHandshake`.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
pnpm add @acid-cat/mcp-handshake
|
|
@@ -12,12 +12,16 @@ pnpm add @acid-cat/mcp-handshake
|
|
|
12
12
|
|
|
13
13
|
## Use
|
|
14
14
|
|
|
15
|
+
With `@acid-cat/core-ts`:
|
|
16
|
+
|
|
15
17
|
```ts
|
|
16
18
|
import { mcpHandler, mcpHandshake } from "@acid-cat/core-ts";
|
|
17
19
|
|
|
18
20
|
const mcp = mcpHandshake(mcpHandler(app, options));
|
|
19
21
|
```
|
|
20
22
|
|
|
23
|
+
With `@acid-cat/core-effect`:
|
|
24
|
+
|
|
21
25
|
```ts
|
|
22
26
|
import { Mcp } from "@acid-cat/core-effect";
|
|
23
27
|
|
|
@@ -26,14 +30,14 @@ const mcp = Mcp.withHandshake(Mcp.toWebHandler(app, layer, options));
|
|
|
26
30
|
|
|
27
31
|
| Option | Default | Use |
|
|
28
32
|
| --- | --- | --- |
|
|
29
|
-
| `maximumBytes` | 1 MiB | The
|
|
33
|
+
| `maximumBytes` | 1 MiB | The largest body that the wrapper reads. The wrapper passes a larger body to the handler unchanged, and the handler rejects it |
|
|
30
34
|
|
|
31
35
|
## How it works
|
|
32
36
|
|
|
33
|
-
- A request of revision `2026-07-28`, and
|
|
34
|
-
- The wrapper
|
|
37
|
+
- A request of revision `2026-07-28`, and any request that is not `POST`, goes to the handler unchanged.
|
|
38
|
+
- The wrapper turns each handshake request into a revision `2026-07-28` request for the handler: `tools/list` and `tools/call` pass as they are, and every other method becomes `server/discover`. The handler therefore still screens each request's origin, media type and size.
|
|
35
39
|
- A response that is not 2xx comes back unchanged.
|
|
36
|
-
- `initialize`
|
|
37
|
-
-
|
|
40
|
+
- `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`.
|
|
41
|
+
- Results carry no `_meta`, `resultType`, `ttlMs` or `cacheScope` member. A JSON-RPC error has HTTP status 200.
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acid-cat/mcp-handshake",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@acid-cat/spec-ts": "0.
|
|
34
|
+
"@acid-cat/spec-ts": "0.16.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "26.6.6",
|