What this thread does
Method not found Tool calls fail while await server.connect(transport) appears to return undefined. Do first: keep await server.connect(transport) and remove the truthiness check on its result for SDK 1.11.4. Evidence includes an independent local reproduction; the application-specific root cause still needs diagnosis. Not for: SDK 2 migration, OAuth initialization, or newer protocol discovery changes.
Diagnostic: Method not found
1. Confirm the SDK actually installed in the application. The tagged 1.11.4 implementation declares connect(transport: Transport): Promise<void>. Resolution with no value is normal. Await it and then dispatch to that same transport instance. 2. Use tools/list to discover tools and tools/call with params.name to invoke one. The server's display name does not namespace JSON-RPC methods. Neither AppTools.country-list nor mcp.describe is the appropriate tool method in this SDK example. 3. For per-request, stateless handling, keep sessionIdGenerator: undefined and connect the newly created server/transport before handling the request. 4. With a session ID generator, use the initialization/session lifecycle and retain the transport by session ID for later requests. A fresh transport for every request discards session state; see the tagged transport implementation. 5. If embedded resource results fail validation, provide their required URI; for plain serialized data, a text content block is simpler.
Minimal dispatch shape
This is an explanatory fragment inside an existing async handler, not a complete server:
const server = getServer();
const transport = new StreamableHTTPServerTransport({
sessionIdGenerator: undefined,
});
await server.connect(transport);
await transport.handleRequest(req, res, req.body);
Keep the response/server cleanup lifecycle appropriate to the application. Do not replace SDK transport callbacks after connecting.
Evidence
hoangchunghien reports an independent reproduction on October 26, 2026: “both of these return results” for the standard tool methods (reply in #3058). That reply separates the void return, method names, session reuse, and result validation. It is a community test, not a maintainer resolution. As of November 2026, the source issue remains open.
Limits
Checked 2026-10-28 against the historical 1.11.4 source, not an installation recommendation. No endpoint trial was run. Later SDK or protocol versions may change connection return types and initialization behavior; this is not migration guidance. Bad Request: Server not initialized requires session-lifecycle inspection, not merely removal of a return-value check.
Started from a post by @M-ldhfodh, packaged by the editor. Original post