@absolutejs/mcp 0.17.1 → 0.17.3
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/CHANGELOG.md +13 -0
- package/canary/results/2026-09-11-claude-web.json +30 -0
- package/canary/results/2026-09-11-vscode.json +28 -0
- package/canary/server.ts +1 -1
- package/changelog.json +24 -0
- package/dist/index.js +23 -7
- package/docs/host-canaries.md +23 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,19 @@ This file is generated by `absolute-changelog` from the entries in
|
|
|
6
6
|
`changelog/`. Edit an entry, not this file — and add new ones under
|
|
7
7
|
`changelog/unreleased/`.
|
|
8
8
|
|
|
9
|
+
## 0.17.3 — 2026-09-11
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Authorize session deletion, recover explicit client initialization after expiry, and preserve typed HTTP failures without replaying tools**
|
|
14
|
+
- **Accept the standard protocol-header compatibility fallback used by VS Code Copilot and record native report rendering evidence**
|
|
15
|
+
|
|
16
|
+
## 0.17.2 — 2026-09-11
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **Record verified Claude web rendering, refresh, pagination and narrow-viewport host canary evidence**
|
|
21
|
+
|
|
9
22
|
## 0.17.1 — 2026-09-11
|
|
10
23
|
|
|
11
24
|
### Added
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"date": "2026-09-11",
|
|
3
|
+
"runtimePackage": "@absolutejs/mcp@0.17.1",
|
|
4
|
+
"host": "Claude web custom connector",
|
|
5
|
+
"browser": "Windows Chrome 152.0.7977.83",
|
|
6
|
+
"data": "synthetic only",
|
|
7
|
+
"protocol": "2025-06-18",
|
|
8
|
+
"appsMimeType": "text/html;profile=mcp-app",
|
|
9
|
+
"successfulCalls": {
|
|
10
|
+
"get_billing_status": 2,
|
|
11
|
+
"get_usage_report": 2,
|
|
12
|
+
"list_receipts": 2
|
|
13
|
+
},
|
|
14
|
+
"observed": [
|
|
15
|
+
"Three native report views rendered",
|
|
16
|
+
"Balance refresh succeeded",
|
|
17
|
+
"Usage refresh and daily row expansion succeeded",
|
|
18
|
+
"Receipt pagination ended with empty page and hidden Older receipts button",
|
|
19
|
+
"No extra tool calls from initial rendering or page reload",
|
|
20
|
+
"390px desktop viewport: app widths 322px; no horizontal document overflow"
|
|
21
|
+
],
|
|
22
|
+
"notVerified": [
|
|
23
|
+
"Native mobile application",
|
|
24
|
+
"OAuth login",
|
|
25
|
+
"Account isolation",
|
|
26
|
+
"Expired-session reconnect",
|
|
27
|
+
"IDE hosts"
|
|
28
|
+
],
|
|
29
|
+
"cleanup": "Temporary connector and development route removed"
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"date": "2026-09-11",
|
|
3
|
+
"runtimePackage": "@absolutejs/mcp@0.17.3 pre-release build",
|
|
4
|
+
"host": "Visual Studio Code 1.135.0, native Windows Copilot Chat",
|
|
5
|
+
"transport": "Streamable HTTP, isolated loopback synthetic workspace",
|
|
6
|
+
"protocol": "2025-11-25",
|
|
7
|
+
"protocolHeader": null,
|
|
8
|
+
"appsMimeType": "text/html;profile=mcp-app",
|
|
9
|
+
"successfulCalls": {
|
|
10
|
+
"get_billing_status": 2,
|
|
11
|
+
"get_usage_report": 2,
|
|
12
|
+
"list_receipts": 2
|
|
13
|
+
},
|
|
14
|
+
"observed": [
|
|
15
|
+
"All three native report views rendered after window reload",
|
|
16
|
+
"Balance and usage refresh succeeded",
|
|
17
|
+
"Daily usage expanded",
|
|
18
|
+
"Receipt pagination reached empty final page and hid Older receipts",
|
|
19
|
+
"Initial render and window reload made no extra report calls",
|
|
20
|
+
"All three app documents measured 242px with no horizontal document overflow"
|
|
21
|
+
],
|
|
22
|
+
"limitations": [
|
|
23
|
+
"Initial balance webview was blank; window reload restored it; cause not isolated",
|
|
24
|
+
"Window reload restores original tool results, including first receipt page",
|
|
25
|
+
"OAuth, real-account isolation and expired-session reconnect against authenticated staging not tested",
|
|
26
|
+
"Host commerce permissions not certified"
|
|
27
|
+
]
|
|
28
|
+
}
|
package/canary/server.ts
CHANGED
|
@@ -49,7 +49,6 @@ const handler = createMcpHandler({
|
|
|
49
49
|
issuer: "http://127.0.0.1:4428",
|
|
50
50
|
path: "/mcp",
|
|
51
51
|
serverInfo: { name: "absolute-billing-canary", version: "1" },
|
|
52
|
-
supportedProtocols: ["2025-06-18"],
|
|
53
52
|
authorize: async () => ({
|
|
54
53
|
ok: true,
|
|
55
54
|
caller: "synthetic-fixture",
|
|
@@ -110,6 +109,7 @@ Bun.serve({
|
|
|
110
109
|
JSON.stringify({
|
|
111
110
|
method: rpc?.method ?? request.method,
|
|
112
111
|
status: response.status,
|
|
112
|
+
protocolHeader: request.headers.get("mcp-protocol-version"),
|
|
113
113
|
...(rpc?.method === "initialize"
|
|
114
114
|
? {
|
|
115
115
|
client: rpc.params?.clientInfo?.name,
|
package/changelog.json
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
"contract": 1,
|
|
3
3
|
"name": "@absolutejs/mcp",
|
|
4
4
|
"releases": [
|
|
5
|
+
{
|
|
6
|
+
"version": "0.17.3",
|
|
7
|
+
"date": "2026-09-11",
|
|
8
|
+
"changes": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "fixed",
|
|
11
|
+
"summary": "Authorize session deletion, recover explicit client initialization after expiry, and preserve typed HTTP failures without replaying tools"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"kind": "fixed",
|
|
15
|
+
"summary": "Accept the standard protocol-header compatibility fallback used by VS Code Copilot and record native report rendering evidence"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"version": "0.17.2",
|
|
21
|
+
"date": "2026-09-11",
|
|
22
|
+
"changes": [
|
|
23
|
+
{
|
|
24
|
+
"kind": "added",
|
|
25
|
+
"summary": "Record verified Claude web rendering, refresh, pagination and narrow-viewport host canary evidence"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
5
29
|
{
|
|
6
30
|
"version": "0.17.1",
|
|
7
31
|
"date": "2026-09-11",
|
package/dist/index.js
CHANGED
|
@@ -735,14 +735,25 @@ var createMcpClient = (options) => {
|
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
const captured = response.headers.get("mcp-session-id");
|
|
739
|
-
if (captured)
|
|
740
|
-
sessionId = captured;
|
|
741
738
|
if (response.status === 401) {
|
|
742
739
|
throw new McpClientError("The MCP server rejected the credentials", {
|
|
743
740
|
status: 401
|
|
744
741
|
});
|
|
745
742
|
}
|
|
743
|
+
if (!response.ok) {
|
|
744
|
+
if (response.status === 404 && sessionId === headers["mcp-session-id"]) {
|
|
745
|
+
sessionId = null;
|
|
746
|
+
}
|
|
747
|
+
const failure = await parseBody(response, maxBytes).catch(() => null);
|
|
748
|
+
const error = isRecord(failure) && isRecord(failure.error) ? failure.error : null;
|
|
749
|
+
throw new McpClientError(typeof error?.message === "string" ? error.message : `MCP HTTP request failed (${response.status})`, {
|
|
750
|
+
status: response.status,
|
|
751
|
+
code: typeof error?.code === "number" ? error.code : undefined
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
const captured = response.headers.get("mcp-session-id");
|
|
755
|
+
if (captured)
|
|
756
|
+
sessionId = captured;
|
|
746
757
|
const isStream = (response.headers.get("content-type") ?? "").includes("text/event-stream");
|
|
747
758
|
const payload = isStream ? await consumeSseStream(response, maxBytes, answerServer) : await parseBody(response, maxBytes);
|
|
748
759
|
if (!isRecord(payload)) {
|
|
@@ -776,6 +787,7 @@ var createMcpClient = (options) => {
|
|
|
776
787
|
});
|
|
777
788
|
};
|
|
778
789
|
const initialize = async () => {
|
|
790
|
+
sessionId = null;
|
|
779
791
|
const result2 = await rpc("initialize", {
|
|
780
792
|
capabilities: {
|
|
781
793
|
...options.onElicit ? { elicitation: { form: {}, url: {} } } : {},
|
|
@@ -2197,15 +2209,15 @@ var runMcpPost = async (config, request, body) => {
|
|
|
2197
2209
|
return rpcError(null, JSONRPC_INVALID_REQUEST, "Batching is not supported");
|
|
2198
2210
|
}
|
|
2199
2211
|
const isInitialize = typeof body === "object" && body !== null && "method" in body && body.method === "initialize";
|
|
2200
|
-
const protocolVersion = request.headers.get("mcp-protocol-version");
|
|
2212
|
+
const protocolVersion = request.headers.get("mcp-protocol-version") ?? "2025-03-26";
|
|
2201
2213
|
const supportedProtocols = config.supportedProtocols ?? [
|
|
2202
2214
|
MCP_LATEST_PROTOCOL_VERSION,
|
|
2203
2215
|
"2025-06-18",
|
|
2204
2216
|
"2025-03-26",
|
|
2205
2217
|
"2024-11-05"
|
|
2206
2218
|
];
|
|
2207
|
-
if (!isInitialize &&
|
|
2208
|
-
return new Response("
|
|
2219
|
+
if (!isInitialize && !supportedProtocols.includes(protocolVersion)) {
|
|
2220
|
+
return new Response("Unsupported MCP-Protocol-Version", {
|
|
2209
2221
|
status: 400
|
|
2210
2222
|
});
|
|
2211
2223
|
}
|
|
@@ -2215,13 +2227,17 @@ var runMcpPost = async (config, request, body) => {
|
|
|
2215
2227
|
return new Response(null, { status: HTTP_NOT_FOUND });
|
|
2216
2228
|
}
|
|
2217
2229
|
return dispatchMcp(config, auth.caller, auth.scopes ?? [], body, {
|
|
2218
|
-
protocolVersion
|
|
2230
|
+
protocolVersion,
|
|
2219
2231
|
requestSignal: request.signal,
|
|
2220
2232
|
sessionId,
|
|
2221
2233
|
sessions
|
|
2222
2234
|
}).catch(() => rpcError(null, JSONRPC_INVALID_REQUEST, "Internal error"));
|
|
2223
2235
|
};
|
|
2224
2236
|
var runMcpDelete = async (config, request) => {
|
|
2237
|
+
const auth = await config.authorize(request);
|
|
2238
|
+
if (!auth.ok) {
|
|
2239
|
+
return unauthorized(`${config.issuer}${metadataPathFor(config.path)}`, auth.reason);
|
|
2240
|
+
}
|
|
2225
2241
|
const sessions = registryFor(config);
|
|
2226
2242
|
const sessionId = request.headers.get("mcp-session-id");
|
|
2227
2243
|
if (!sessions || !sessionId) {
|
package/docs/host-canaries.md
CHANGED
|
@@ -4,7 +4,7 @@ The package ships `canary/server.ts`: a loopback-only, synthetic billing endpoin
|
|
|
4
4
|
|
|
5
5
|
From an installed package, run `bun node_modules/@absolutejs/mcp/canary/server.ts`. From this repository, build first, then `bun run canary`. The fixed endpoint is `http://127.0.0.1:4428/mcp`. Startup validates all four report calls before listening. Stop it with Ctrl-C after the test. A port conflict fails startup rather than replacing another service.
|
|
6
6
|
|
|
7
|
-
The JSONL log records protocol methods, status, client name/version, negotiated protocol, advertised Apps MIME types and tool success. It omits headers, session IDs, tool arguments and report bodies. Keep host transcripts local: host logs can contain unrelated account or environment information. Commit only reviewed evidence.
|
|
7
|
+
The JSONL log records protocol methods, status, client name/version, negotiated protocol, advertised Apps MIME types and tool success. It records only the MCP protocol-version header and omits all other headers, session IDs, tool arguments and report bodies. Keep host transcripts local: host logs can contain unrelated account or environment information. Commit only reviewed evidence.
|
|
8
8
|
|
|
9
9
|
## Host connections
|
|
10
10
|
|
|
@@ -42,19 +42,37 @@ Record the exact host version/surface, transport, requested and negotiated proto
|
|
|
42
42
|
|
|
43
43
|
## Observed September 11, 2026
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Terminal tests ran against the built `0.17.0` runtime. The later Claude web test used the published `0.17.1` canary.
|
|
46
46
|
|
|
47
47
|
| Host | Negotiation | Observed result |
|
|
48
48
|
| ------------------------------------------------ | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
49
49
|
| Claude Code 2.1.265, print mode, Streamable HTTP | Requested 2025-11-25; accepted server 2025-06-18; no Apps MIME extension | Four read calls passed, including cursor pagination; text/structured fallback; no embedded rendering claim |
|
|
50
50
|
| Codex CLI 0.154.0, exec mode, Streamable HTTP | Requested and accepted 2025-06-18; no Apps MIME extension | Four read calls passed, including cursor pagination; text/structured fallback; no embedded rendering claim |
|
|
51
|
-
| Claude web
|
|
52
|
-
| VS Code 1.135.0 |
|
|
51
|
+
| Claude web, Windows Chrome 152.0.7977.83 | Apps MIME advertised; accepted 2025-06-18 | Three native views, refresh and pagination passed |
|
|
52
|
+
| VS Code 1.135.0 | Apps MIME advertised; negotiated 2025-11-25; omitted protocol header | Three views, refresh and pagination verified after compatibility fix; initial balance required reload |
|
|
53
53
|
| Cursor, Gemini CLI, goose | Executables unavailable in this environment | Not tested |
|
|
54
54
|
| ChatGPT hosted surfaces | No host canary performed | Not tested |
|
|
55
55
|
|
|
56
56
|
Both tested terminal clients tolerated GET 405 (no standalone SSE stream) and discovered all three tools. Claude Code also sent a `server/discover` probe that received 400 before successful initialization. These observations do not establish support in other versions or distributions. Initial fixture-development attempts failed receipt validation; the final fixture uses the billing package cursor encoder, supplies a valid receipt ID, and validates its records before listening.
|
|
57
57
|
|
|
58
|
-
The remaining release gates are
|
|
58
|
+
The remaining release gates are other host surfaces including IDE rendering, authenticated staging reconnect/isolation, then the product's migration and commerce approval gates. This evidence does not enable any host commerce profile.
|
|
59
59
|
|
|
60
60
|
Sources: [Codex MCP configuration](https://learn.chatgpt.com/docs/extend/mcp?surface=cli), [VS Code MCP servers](https://code.visualstudio.com/docs/copilot/customization/mcp-servers), and the installed `claude --help` / `claude mcp --help` output. Host observations above come from actual local runs, not documentation claims.
|
|
61
|
+
|
|
62
|
+
## Claude web rendering evidence
|
|
63
|
+
|
|
64
|
+
The signed-in custom-connector test used the published 0.17.1 synthetic canary and native Windows Chrome 152.0.7977.83. Claude identified the reports as three interactive tools. All three HTML resource reads and initial tool calls succeeded. There were exactly three initial report calls; loading/reloading the views did not issue extra tool calls. Explicit balance refresh, usage refresh and Older receipts produced three further successful read calls. Daily usage expanded correctly. The final receipt page was empty and the Older receipts button disappeared. At a 390-pixel desktop viewport the embedded views had 322-pixel widths and no horizontal document overflow. This is not a native mobile-app check.
|
|
65
|
+
|
|
66
|
+
A temporary public tunnel allowed discovery but failed tool execution before reaching the handler. The passing run used a dedicated HTTPS development endpoint forwarding to the unchanged synthetic fixture. The temporary connector and route were removed afterward. No production application, billing data, OAuth grants or commerce profiles were changed. Reviewed aggregate evidence is in `canary/results/2026-09-11-claude-web.json`; it includes no endpoint addresses, headers, session IDs, credentials or chat transcripts. Patch 0.17.2 distributes this evidence; report runtime code is unchanged.
|
|
67
|
+
|
|
68
|
+
For Windows/WSL testing, a headed Linux browser may not appear on the Windows desktop. Use a native Windows test browser with a separate persistent profile and loopback CDP endpoint. Reuse one Playwright CDP connection. If existing cross-origin frames are missing from automation, reload with that connection established; Claude uses a wrapper frame and a nested `about:blank` app frame. Never commit browser profiles or credentials.
|
|
69
|
+
|
|
70
|
+
Conversational rendering is verified for this exact surface. Cursor interactive rendering and authenticated staging reconnect/account-isolation remain separate open gates.
|
|
71
|
+
|
|
72
|
+
## VS Code Copilot and session compatibility (0.17.3)
|
|
73
|
+
|
|
74
|
+
Native Windows VS Code 1.135.0 advertised Apps MIME support but omitted MCP-Protocol-Version on subsequent requests. The shared handler now applies the specified 2025-03-26 fallback for an absent header; explicitly unsupported values still return 400. The fixture now uses default supported protocols instead of forcing a downgrade. See the [MCP transport specification](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#protocol-version-header).
|
|
75
|
+
|
|
76
|
+
Three report views rendered in the signed-in isolated Copilot workspace. Balance and usage refresh, daily expansion and receipt pagination passed. There were six report calls: three initial calls and three explicit button actions. Reloading restored the original report results with no extra report calls. All app documents measured 242px without horizontal document overflow. The first balance webview was blank until a window reload; its cause is not isolated, so this is a qualified rendering result, not proof of reliable first-load behavior. Reviewed aggregate evidence: `canary/results/2026-09-11-vscode.json`.
|
|
77
|
+
|
|
78
|
+
Package regressions verify authorization before session deletion, per-request account selection, expired-session HTTP 404, and fresh explicit client initialization. HTTP failures now produce McpClientError with status (and a JSON-RPC code when available), including empty/non-JSON responses. After a session 404, call client.initialize() to negotiate a fresh session before further operations. The failed tool is never automatically replayed; callers must decide whether retrying is appropriate. Synthetic credentials prove handler behavior, not OAuth correctness or real-tenant isolation. Authenticated staging remains a separate release gate.
|
package/package.json
CHANGED