Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mcp): answer MCP 2026-07-28 discovery instead of a 400 #28683

MergedPhicks-debug(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/28683/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 119 additions and 1 deletion.

x
0 of 2 viewed, 2 left
117 additions and 0 deletionsapps/server/src/mcp/McpHttpServer.test.tsModified
View file
@@ -994,6 +994,123 @@
).pipe(Effect.provide(NodeHttpServer.layerTest)),
​
+it.effect("answers 2026-07-28 discovery and keeps 2025-06-18 as the initialize fallback", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const token = "providerTokenWithoutDots";
+ const scope: McpInvocationContext.McpInvocationScope = {
+ environmentId,
+ requestNamespace: "provider-session",
+ thread: {
+ threadId: ThreadId.make("thread-provider"),
+ providerSessionId: "provider-session",
+ providerInstanceId: ProviderInstanceId.make("codex"),
+ },
+ client: undefined,
+ capabilities: new Set(["orchestration"]),
+ issuedAt: 1,
+ };
+ const ProbeToolkit = Toolkit.make(
+ Tool.make("probe", {
+ description: "Reports success.",
+ success: Schema.Struct({ ok: Schema.Boolean }),
+ }),
+ );
+ const layerServer = McpHttpServer.layerMcpTransport(
+ McpHttpServer.toolkitRegistration(
+ ProbeToolkit,
+ McpToolAccess.toLayer(ProbeToolkit, {