Skip to content

Commit bb85f5f

Browse files
hotlongclaude
andauthored
fix(mcp,runtime)!: the stateless /api/v1/mcp answers GET and DELETE with 405 Allow: POST (#25774)
Clause-②: yes (narrowing) Metadata-protocol: none Closes #25759 Dispatched directly by the maintainer through the cloud ops seat: 「objectstack#25759 你直接派发处理」 (claim: #25759 (comment)). ## What changes `MCPServerRuntime.handleHttpRequest` (`@objectstack/mcp`), the one function every host calls for `/api/v1/mcp`, now answers every verb but `POST` with `405`, `Allow: POST` and the MCP SDK transport's own JSON-RPC 405 body (`{"jsonrpc":"2.0","error":{"code":-32000,"message":"Method not allowed."},"id":null}`). It answers before a server is built, so a refused verb pays for no tool registration. `POST` is untouched. - **GET.** The transport is stateless (`sessionIdGenerator: undefined`, `enableJsonResponse: true`) and closes its per-request server in `finally`. A GET reached the SDK's `handleGetRequest`, which answered `200 text/event-stream` and lost the stream when the server closed. Measured on `5874d25302` through `handleHttpRequest`: `200`, `text/event-stream`, empty body, ~13 ms; through both host doors: `200`. The Streamable HTTP transport says a server that offers no GET stream answers `405`, and the SDK client (`client/streamableHttp.js`, `_startOrAuthSse`) returns quietly on a `405` and does not retry. - **DELETE.** The spec lets a server that does not end sessions answer `405`. This server never issues a session id, the SDK client sends DELETE only for an issued one (`terminateSession` returns early without it, and accepts `405`), and the old answer was `200` for ending nothing. Same treatment, so `Allow: POST` is true. - **Every other verb** was already `405` from the SDK transport, with an `Allow: GET, POST, DELETE` that named two verbs this surface cannot serve. Now `Allow: POST`. - **Hosts.** A `createHonoApp` host's catch-all hands every verb on `/mcp` to `dispatch()`, and cloud's MCP ceiling proxies `handleHttpRequest`, so both reach this function after the dispatcher's anonymous `401` with no change. **The standalone server needed one change** (`@objectstack/runtime`, `dispatcher-plugin.ts`, contract review round 1): it mounts `/mcp` for GET, POST and DELETE only and did not declare the path with `domainDecidesEveryVerb` (#24228), so on `HonoServerPlugin` a `PUT`, a `PATCH` or an `OPTIONS` with CORS off matched no route and the adapter answered it itself (`405`, `Allow: DELETE, GET, HEAD, POST`, a `METHOD_NOT_ALLOWED` envelope), to an anonymous caller too, before the `401` (ADR-0138 D2). `/mcp` is now declared like `/mcp/skill` and `/keys`, so every unrouted verb goes to `dispatch()`: the `401` first, then the transport's `405 Allow: POST`, as on the hosted door. GET and DELETE stay mounted. The resolver-absence warn now names `/mcp`, and the stale mount comment (GET as SSE, DELETE as a session end) is corrected. - **Known clients that need the GET stream:** none. The stateless server never sends a server-initiated message, so nothing was ever delivered on that stream. ## Tests - `packages/mcp/src/mcp-server-runtime.http-verbs.test.ts` (new, 5 tests): GET with claude-code's headers answers `405` `Allow: POST` with the JSON-RPC body and reads no bridge member; DELETE (with and without a session id) the same; PUT/PATCH/OPTIONS/HEAD the same; `POST initialize` → `notifications/initialized` (202) → `tools/list` round trip is `200` with no session id; and the SDK's own `Client` + `StreamableHTTPClientTransport`, connected over the surface with a 5 ms reconnect delay, opens the GET once in 250 ms and raises no error, while `listTools` works. - `packages/qa/http-conformance/src/hono-mcp-stateless-verbs.conformance.test.ts` (new, 29 tests): the REAL `MCPServerRuntime` as the `mcp` service on both doors (`createHonoApp` and `HonoServerPlugin` + dispatcher). Signed in, GET, DELETE, PUT, PATCH and OPTIONS answer `405` `Allow: POST` with the body intact on each door; signed-in `POST initialize` and `tools/list` answer `200`; anonymous GET, PUT, PATCH and OPTIONS answer `401` with no `Allow`; the parity loop holds the two doors to the same status and `Allow` for every one of those rows, including the verbs the standalone router does not mount. The package takes `@objectstack/mcp` as a devDependency and a source alias for it (`check:test-source-alias`). **Ablation.** Each fix disabled by a reversible edit and restored the same way, `git status --porcelain` back to 0 lines, tests green again. (1) The transport's early return, `if (false && …)`. (2) The ``domainDecidesEveryVerb('POST', `${prefix}/mcp`)`` line, commented out, runtime rebuilt (the conformance package reads `@objectstack/runtime` from `dist`). | suite | both fixes in | (1) out | (2) out | |---|---|---|---| | `mcp-server-runtime.http-verbs.test.ts` | 5/5 | 1/5 — the POST control passes; GET is `text/event-stream`, DELETE `200`, `Allow` `GET, POST, DELETE`; the SDK client opened the GET **41 times** in 250 ms | n/a (runtime not involved) | | `hono-mcp-stateless-verbs.conformance.test.ts` | 29/29 | 7/11 at the first head (GET and DELETE answered `200` on both doors) | 17/29 — all 12 failures on the standalone door: signed-in PUT/PATCH/OPTIONS `405` with `Allow: DELETE, GET, HEAD, POST`, anonymous PUT/PATCH/OPTIONS `405` instead of `401`, and the 6 parity rows for those verbs | ## Local runs on `2f378a68b0` - `@objectstack/mcp`: test 43 files / 538 tests pass; typecheck (incl. `check:test-typecheck`) pass. - `@objectstack/http-conformance`: test 20 files / 275 tests pass; typecheck pass. - `@objectstack/runtime`: test 444 files / 7095 tests pass (24 skipped); typecheck pass. Includes `dispatcher-plugin.routes.test.ts`, `dispatcher-plugin.fallback-absence-warn.test.ts` and the `actions`/`keys`/`notifications`/`mcp-skill` every-verb integration suites. - `@objectstack/dogfood`: `showcase-mcp-http-identity.dogfood.test.ts` 6/6. Full suite on `d88a6ae069`: 295 files passed, 3 skipped; 2520 tests passed, 18 skipped; exit 0. Full suite on `2f378a68b0`: 295 files passed, 3 skipped; 2520 tests passed, 18 skipped; exit 0. - ESLint on the touched files: clean. - `node scripts/pm/dispatch-gates.mjs --commands --changed` for the new diff: 81 commands derived, 81 exit 0 (incl. `check-adr-0087-registration --base origin/main`, `check-changeset-no-major`, `check:test-source-alias`, `check:error-status-conformance`, `check:route-envelope`, `check:dispatcher-error-vocabulary`). ## For the contract review - The narrowing: GET `200` (empty stream) → `405`, DELETE `200` (no-op) → `405`, every verb's `Allow` → `POST`. Is DELETE in scope? The card names GET; DELETE is included because otherwise `Allow: POST` is false and the spec gives the same answer for a server with no sessions. - The body is the SDK's JSON-RPC 405 shape, not the dispatcher's `buildApiError` envelope that `domains/*.ts` 405s use: it is the transport answering, like its other non-2xx answers (406, 400 parse error), and it is byte-for-byte what the SDK answered for PUT before. - The anonymous decision comes first on both doors for every verb (`401` before the verb answer). Round 1 found that this was false for unmounted verbs on the standalone door; fixed in `2f378a68b0` as described under **Hosts**. - The changeset now names `@objectstack/runtime` as well as `@objectstack/mcp`. --- _Generated by [Claude Code](https://claude.ai/code/session_6eb9ec2e-0e3f-410b-9123-9dab7a337b9e)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2c86039 commit bb85f5f

9 files changed

Lines changed: 490 additions & 7 deletions
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/mcp': patch
3+
'@objectstack/runtime': patch
4+
---
5+
6+
fix(mcp,runtime)!: the stateless `/api/v1/mcp` surface answers `GET` and `DELETE` with `405` and `Allow: POST`, so an MCP client stops re-opening a GET stream that ends at once
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) A transport verb answer on the MCP HTTP surface: no key of any metadata schema is removed, renamed or re-shaped, no export, type or error code is removed or renamed, and the 405 body is the MCP SDK transport's own. There is nothing for `objectstack migrate meta` to rewrite and no tombstone. -->
12+
13+
**BREAKING** accept-set narrowing at the MCP HTTP transport (`MCPServerRuntime.handleHttpRequest`, `@objectstack/mcp`), and on the standalone server's `/api/v1/mcp` route (`createDispatcherPlugin`, `@objectstack/runtime`).
14+
15+
- **Before.** The transport is stateless (no session id) and closes its per-request server when the request ends. A `GET` still reached the SDK's stream handler, which answered `200 text/event-stream` and then lost the stream when the server closed. An MCP client reads a GET stream that ends as a dropped connection and opens another one: claude-code re-opened it 2–3 times a second for as long as a session stayed connected. A `DELETE` answered `200` and ended nothing, because no session exists. Every other verb answered `405` with `Allow: GET, POST, DELETE`.
16+
- **Now.** Every verb but `POST` that reaches the transport (`OPTIONS` with CORS off; with CORS on the CORS middleware's `204` answers first on both doors) answers `405` with `Allow: POST` and the JSON-RPC body `{"jsonrpc":"2.0","error":{"code":-32000,"message":"Method not allowed."},"id":null}`, before a server is built. This is the Streamable HTTP transport's answer for a server that offers no GET stream and does not end sessions. The MCP SDK client treats a `405` on GET as "no stream offered" and does not retry it.
17+
- **The standalone server.** `createDispatcherPlugin` mounts `/api/v1/mcp` for `GET`, `POST` and `DELETE`, and now also declares it a path whose domain decides every verb (the declaration `/mcp/skill` and `/keys` already carry). Before, a `PUT`, a `PATCH` or an `OPTIONS` with CORS off matched no route there and the HTTP adapter answered it itself: `405` with `Allow: DELETE, GET, HEAD, POST` and a `METHOD_NOT_ALLOWED` envelope, to an anonymous caller too. Now those verbs reach the dispatcher like the mounted ones: an anonymous caller gets `401`, a signed-in one the transport's `405` with `Allow: POST`. A `createHonoApp` host already handed every verb to the dispatcher, so both doors now answer every verb alike.
18+
- **Unchanged.** `POST` (JSON-RPC: `initialize`, `tools/list`, `tools/call`, …) answers exactly as before. An anonymous caller is refused `401` before any verb answer, on every verb and on both doors.
19+
- **Who sees it.** A client that opens the GET stream on `/api/v1/mcp` now gets `405` instead of a `200` stream that ends at once. Nothing was ever sent on that stream. On the standalone server, an anonymous `PUT`, `PATCH` or `OPTIONS` (CORS off; with CORS on the CORS middleware's `204` answers `OPTIONS` first on both doors) on `/api/v1/mcp` now gets `401` instead of `405`.
20+
21+
**The remedy.** None needed for an MCP client: it stops opening the stream. A probe or health check that read `GET /api/v1/mcp` as `200` should send a `POST initialize` instead.
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
/**
4+
* [#25759] The stateless Streamable HTTP surface serves POST alone: GET and
5+
* DELETE (and every other verb) answer `405` with `Allow: POST`.
6+
*
7+
* ## The defect
8+
*
9+
* `handleHttpRequest` builds a stateless transport (`sessionIdGenerator:
10+
* undefined`, `enableJsonResponse: true`) and closes the per-request server in
11+
* `finally`. Before this change a GET went on to the SDK's `handleGetRequest`,
12+
* which answered `200 text/event-stream`, and the stream closed with the
13+
* server. Measured on `5874d25302`: `200`, empty body, ~13 ms. The SDK client
14+
* reads a GET stream that ends as a dropped connection and opens another one;
15+
* production saw ~183 `GET /api/v1/mcp` a minute from one machine with Claude
16+
* Code sessions open (cloud#3103). A DELETE answered `200` and ended nothing,
17+
* because no session exists.
18+
*
19+
* ## What is pinned
20+
*
21+
* 1. GET, DELETE and the other verbs answer `405`, `Allow: POST`, with the
22+
* SDK transport's own JSON-RPC 405 body, and no bridge member is read.
23+
* 2. POST is unchanged: `initialize` and `tools/list` round trips answer
24+
* `200` with no session id.
25+
* 3. The SDK's own client, connected over this surface, opens the GET stream
26+
* once and never again, and its tool calls still work. This is the
27+
* reconnect loop itself: with the 200 stream, the same client re-opens the
28+
* GET every time it closes.
29+
*/
30+
31+
import { describe, it, expect } from 'vitest';
32+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
33+
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
34+
35+
import { MCPServerRuntime } from './mcp-server-runtime.js';
36+
import type { McpDataBridge } from './mcp-http-tools.js';
37+
38+
const URL_ = 'http://localhost/api/v1/mcp';
39+
40+
/** A bridge that records every member read, so a refused verb can be shown to read none. */
41+
function makeBridge(): McpDataBridge & { calls: string[] } {
42+
const calls: string[] = [];
43+
return {
44+
calls,
45+
async listObjects() {
46+
calls.push('listObjects');
47+
return [{ name: 'task', label: 'Task', fieldCount: 1 }];
48+
},
49+
async describeObject() {
50+
calls.push('describeObject');
51+
return { name: 'task', fields: [{ name: 'title', type: 'text' }] };
52+
},
53+
async query(object: string) {
54+
calls.push('query');
55+
return { object, records: [], total: 0 };
56+
},
57+
async get(_object: string, id: string) {
58+
calls.push('get');
59+
return { id };
60+
},
61+
async create(object: string, data: any) {
62+
calls.push('create');
63+
return { object, id: 'n1', record: data };
64+
},
65+
async update(object: string, id: string, data: any) {
66+
calls.push('update');
67+
return { object, id, record: data };
68+
},
69+
async remove(object: string, id: string) {
70+
calls.push('remove');
71+
return { object, id, success: true };
72+
},
73+
};
74+
}
75+
76+
/** The headers a claude-code client sends on its GET (cloud#3103's reading). */
77+
const CLIENT_GET_HEADERS = {
78+
accept: 'text/event-stream',
79+
'mcp-protocol-version': '2025-06-18',
80+
'x-api-key': 'osk_test',
81+
};
82+
83+
const INIT = {
84+
jsonrpc: '2.0',
85+
id: 0,
86+
method: 'initialize',
87+
params: { protocolVersion: '2025-06-18', capabilities: {}, clientInfo: { name: 't', version: '1' } },
88+
};
89+
90+
async function post(runtime: MCPServerRuntime, body: unknown, bridge?: McpDataBridge): Promise<Response> {
91+
return runtime.handleHttpRequest(
92+
new Request(URL_, {
93+
method: 'POST',
94+
headers: { 'content-type': 'application/json', accept: 'application/json, text/event-stream' },
95+
body: JSON.stringify(body),
96+
}),
97+
{ bridge, parsedBody: body },
98+
);
99+
}
100+
101+
async function expectMethodNotAllowed(res: Response): Promise<void> {
102+
expect(res.status).toBe(405);
103+
expect(res.headers.get('allow')).toBe('POST');
104+
expect(res.headers.get('content-type')).toContain('application/json');
105+
expect(res.headers.get('mcp-session-id')).toBeNull();
106+
expect(await res.json()).toEqual({
107+
jsonrpc: '2.0',
108+
error: { code: -32000, message: 'Method not allowed.' },
109+
id: null,
110+
});
111+
}
112+
113+
describe('[#25759] the stateless /api/v1/mcp surface answers every verb but POST with 405', () => {
114+
it('GET answers 405 with Allow: POST, not an SSE stream that ends at once', async () => {
115+
const runtime = new MCPServerRuntime({ name: 'objectstack-test', version: '9.9.9' });
116+
const bridge = makeBridge();
117+
const res = await runtime.handleHttpRequest(new Request(URL_, { method: 'GET', headers: CLIENT_GET_HEADERS }), {
118+
bridge,
119+
});
120+
121+
expect(res.headers.get('content-type')).not.toContain('text/event-stream');
122+
await expectMethodNotAllowed(res);
123+
expect(bridge.calls, 'a refused verb reads no bridge member').toEqual([]);
124+
});
125+
126+
it('DELETE answers 405 with Allow: POST: there is no session to end', async () => {
127+
const runtime = new MCPServerRuntime({ name: 'objectstack-test', version: '9.9.9' });
128+
for (const headers of [{}, { 'mcp-session-id': 'never-issued', 'mcp-protocol-version': '2025-06-18' }]) {
129+
const res = await runtime.handleHttpRequest(new Request(URL_, { method: 'DELETE', headers }), {
130+
bridge: makeBridge(),
131+
});
132+
await expectMethodNotAllowed(res);
133+
}
134+
});
135+
136+
it('every other verb answers 405 with Allow: POST (the SDK used to name GET and DELETE in Allow)', async () => {
137+
const runtime = new MCPServerRuntime({ name: 'objectstack-test', version: '9.9.9' });
138+
for (const method of ['PUT', 'PATCH', 'OPTIONS']) {
139+
const res = await runtime.handleHttpRequest(new Request(URL_, { method }), { bridge: makeBridge() });
140+
await expectMethodNotAllowed(res);
141+
}
142+
const head = await runtime.handleHttpRequest(new Request(URL_, { method: 'HEAD' }), { bridge: makeBridge() });
143+
expect(head.status).toBe(405);
144+
expect(head.headers.get('allow')).toBe('POST');
145+
});
146+
147+
it('POST is unchanged: initialize and tools/list round trips answer 200 with no session id', async () => {
148+
const runtime = new MCPServerRuntime({ name: 'objectstack-test', version: '9.9.9' });
149+
const bridge = makeBridge();
150+
151+
const init = await post(runtime, INIT, bridge);
152+
expect(init.status).toBe(200);
153+
expect(init.headers.get('mcp-session-id')).toBeNull();
154+
const initJson: any = await init.json();
155+
expect(initJson.result.serverInfo).toEqual({ name: 'objectstack-test', version: '9.9.9' });
156+
expect(initJson.result.capabilities.tools).toBeDefined();
157+
158+
const initialized = await post(runtime, { jsonrpc: '2.0', method: 'notifications/initialized' }, bridge);
159+
expect(initialized.status).toBe(202);
160+
161+
const list = await post(runtime, { jsonrpc: '2.0', id: 1, method: 'tools/list' }, bridge);
162+
expect(list.status).toBe(200);
163+
const names = ((await list.json()) as any).result.tools.map((t: any) => t.name);
164+
expect(names).toContain('query_records');
165+
expect(names).toContain('list_objects');
166+
});
167+
168+
it('the SDK client opens the GET stream once and never again, and its calls still work', async () => {
169+
const runtime = new MCPServerRuntime({ name: 'objectstack-test', version: '9.9.9' });
170+
const bridge = makeBridge();
171+
const seen: string[] = [];
172+
173+
// Route the client's fetch straight into the surface, as a host's dispatcher does.
174+
const fetchIntoSurface = async (input: string | URL | Request, init?: RequestInit): Promise<Response> => {
175+
const request = new Request(input, init);
176+
seen.push(request.method);
177+
const text = request.method === 'POST' ? await request.text() : '';
178+
return runtime.handleHttpRequest(request, { bridge, parsedBody: text ? JSON.parse(text) : undefined });
179+
};
180+
181+
const transport = new StreamableHTTPClientTransport(new URL(URL_), {
182+
fetch: fetchIntoSurface as typeof fetch,
183+
// A reconnect as fast as the loop can go, so a dropped GET stream shows
184+
// up as many GETs inside the window below rather than one per second.
185+
reconnectionOptions: {
186+
initialReconnectionDelay: 5,
187+
maxReconnectionDelay: 5,
188+
reconnectionDelayGrowFactor: 1,
189+
maxRetries: 1000,
190+
},
191+
});
192+
const client = new Client({ name: 'verb-test', version: '1.0.0' });
193+
const errors: unknown[] = [];
194+
client.onerror = (err) => errors.push(err);
195+
196+
try {
197+
await client.connect(transport);
198+
const tools = await client.listTools();
199+
expect(tools.tools.map((t) => t.name)).toContain('query_records');
200+
201+
await new Promise((resolve) => setTimeout(resolve, 250));
202+
203+
const gets = seen.filter((m) => m === 'GET').length;
204+
expect(gets, `the client opened the GET stream ${gets} times: ${seen.join(' ')}`).toBe(1);
205+
expect(errors, 'a 405 on GET is the "no stream offered" answer, not a client error').toEqual([]);
206+
} finally {
207+
await client.close();
208+
}
209+
});
210+
});

‎packages/mcp/src/mcp-server-runtime.ts‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,35 @@ export async function buildObjectListResource(
974974
};
975975
}
976976

977+
/**
978+
* The verbs the stateless Streamable HTTP surface serves: POST alone. Sent as
979+
* the `Allow` header of {@link methodNotAllowedResponse}.
980+
*/
981+
const MCP_HTTP_ALLOWED_METHODS = 'POST';
982+
983+
/**
984+
* The stateless transport's answer to any verb but POST (#25759): `405` with
985+
* `Allow: POST`. The body is the SDK transport's own 405 body
986+
* (`handleUnsupportedRequest`), so a client reads the same JSON-RPC error it
987+
* read for an unsupported verb before; only the status of GET and DELETE and
988+
* the `Allow` value change.
989+
*/
990+
function methodNotAllowedResponse(): Response {
991+
return new Response(
992+
// Mirrors `handleUnsupportedRequest` in the SDK's
993+
// `server/webStandardStreamableHttp.js`, `Allow` aside.
994+
JSON.stringify({
995+
jsonrpc: '2.0',
996+
error: { code: -32000, message: 'Method not allowed.' },
997+
id: null,
998+
}),
999+
{
1000+
status: 405,
1001+
headers: { Allow: MCP_HTTP_ALLOWED_METHODS, 'Content-Type': 'application/json' },
1002+
},
1003+
);
1004+
}
1005+
9771006
/**
9781007
* MCPServerRuntime — Bridges ObjectStack kernel services to the Model Context Protocol.
9791008
*
@@ -1624,6 +1653,8 @@ export class MCPServerRuntime {
16241653
* Stateless by design: a fresh {@link McpServer} + transport is built per
16251654
* request (the SDK-recommended pattern for stateless HTTP — it avoids any
16261655
* cross-request session/request-id collision and keeps each call isolated).
1656+
* So it serves POST alone: GET (a server-initiated SSE stream), DELETE (a
1657+
* session end) and every other verb answer `405` with `Allow: POST` (#25759).
16271658
* The tool set is the object-CRUD bridge plus — when the bridge can resolve
16281659
* the framework's action mechanism — the business-action tools
16291660
* (`list_actions` / `run_action`, and `resume_run` when the bridge can
@@ -1660,6 +1691,26 @@ export class MCPServerRuntime {
16601691
toolOptions?: RegisterObjectToolsOptions & RegisterActionToolsOptions;
16611692
} = {},
16621693
): Promise<Response> {
1694+
// [#25759] This transport answers POST and nothing else. It is stateless
1695+
// (no session id) and the per-request server is closed in `finally`, so it
1696+
// can hold no server-initiated SSE stream and has no session to end:
1697+
// - GET used to reach the SDK's `handleGetRequest`, which answered `200
1698+
// text/event-stream` and then lost the stream when `finally` closed the
1699+
// server. The client read a dropped stream and opened another one, 2–3
1700+
// times a second for as long as a session stayed connected. The Streamable
1701+
// HTTP transport gives a server with no GET stream one answer: `405`, and
1702+
// the SDK client then stops opening one (`client/streamableHttp.js`
1703+
// treats 405 on GET as "this server offers no stream").
1704+
// - DELETE ends a session. The SDK client sends it only for a session id
1705+
// the server issued, and this server never issues one; the transport
1706+
// lets a server that does not end sessions answer `405`.
1707+
// Every other verb was a 405 already, with an `Allow` that named GET and
1708+
// DELETE. All of them are answered here, before a server is built, so a
1709+
// refused verb pays for no tool registration.
1710+
if (request.method !== 'POST') {
1711+
return methodNotAllowedResponse();
1712+
}
1713+
16631714
// The prompt surface is wired by capability, like the action tools: a
16641715
// bridge that cannot read skill metadata gets no `prompts` capability and
16651716
// no handlers, rather than a capability that answers nothing.

‎packages/qa/http-conformance/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"devDependencies": {
1818
"@objectstack/driver-sqlite-wasm": "workspace:*",
1919
"@objectstack/hono": "workspace:*",
20+
"@objectstack/mcp": "workspace:*",
2021
"@objectstack/objectql": "workspace:*",
2122
"@objectstack/plugin-approvals": "workspace:*",
2223
"@objectstack/plugin-auth": "workspace:*",

0 commit comments

Comments
 (0)