Skip to content

Commit a5800a1

Browse files
authored
Revert the outbound MCP SDK v2 migration (#1697)
* Revert the outbound MCP SDK v2 migration * Drop the v2 MCP packages from the lockfile
1 parent 54cde5e commit a5800a1

91 files changed

Lines changed: 5838 additions & 10032 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"@executor-js/runtime-quickjs": "workspace:*",
3131
"@executor-js/sdk": "workspace:*",
3232
"@jitl/quickjs-wasmfile-release-sync": "catalog:",
33-
"@modelcontextprotocol/client": "2.0.0",
3433
"@modelcontextprotocol/sdk": "^1.29.0",
3534
"@sentry/bun": "^10.57.0",
3635
"effect": "catalog:",

apps/cli/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ import type { PlatformError } from "effect/PlatformError";
7575
import * as Effect from "effect/Effect";
7676
import * as Option from "effect/Option";
7777
import * as Cause from "effect/Cause";
78-
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/client";
78+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
7979
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
8080
import type { JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js";
8181

apps/cloud/src/auth/handlers.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,6 @@ export const CloudSessionAuthHandlers = HttpApiBuilder.group(
631631
Effect.gen(function* () {
632632
const owner = yield* requireSelectedOrganization;
633633
const stub = getMcpSessionStub(params.mcpSessionId);
634-
if (!stub) {
635-
return yield* new McpExecutionNotFoundError({ executionId: params.executionId });
636-
}
637634
const result = yield* Effect.promise(() =>
638635
stub.getPausedExecutionForApproval(params.executionId, {
639636
accountId: owner.accountId,
@@ -655,9 +652,6 @@ export const CloudSessionAuthHandlers = HttpApiBuilder.group(
655652
Effect.gen(function* () {
656653
const owner = yield* requireSelectedOrganization;
657654
const stub = getMcpSessionStub(params.mcpSessionId);
658-
if (!stub) {
659-
return yield* new McpExecutionNotFoundError({ executionId: params.executionId });
660-
}
661655
const result = yield* Effect.promise(() =>
662656
stub.resumeExecutionForApproval(
663657
params.executionId,

apps/cloud/src/env-augment.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ declare global {
9191
MCP_RESOURCE_ORIGIN?: string;
9292
MCP_SESSION_TIMEOUT_MS?: string;
9393
MCP_PAUSED_SESSION_IDLE_TIMEOUT_MS?: string;
94-
/** HMAC key for MCP 2026-07-28 continuation state (32+ byte secret). */
95-
MCP_REQUEST_STATE_KEY?: string;
96-
/** Emergency rollback for inbound MCP 2026-07-28 traffic only. */
97-
MCP_2026_07_28_ENABLED?: string;
9894
NODE_ENV?: string;
9995

10096
// Shared with frontend

apps/cloud/src/mcp-session.e2e.node.test.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// FumaDB/Drizzle handle (the 2026-04-16 prod outage was a schema spread bug
77
// here; see db/db.schema.test.ts)
88
// - `createExecutionEngine` with an in-process code executor
9-
// - `buildMcpServer` for the MCP request surface
9+
// - `createExecutorMcpServer` for the MCP request surface
1010
// - Real `@modelcontextprotocol/sdk` Client → server round-trips
1111
//
1212
// This test replicates the DO's init path (minus the WorkerTransport and
@@ -22,7 +22,7 @@ import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
2222
import { ElicitRequestSchema } from "@modelcontextprotocol/sdk/types.js";
2323
import type { ClientCapabilities } from "@modelcontextprotocol/sdk/types.js";
2424

25-
import { buildMcpServer } from "@executor-js/host-mcp/tool-server";
25+
import { createExecutorMcpServer } from "@executor-js/host-mcp/tool-server";
2626
import { createExecutionEngine } from "@executor-js/execution";
2727
import { makeQuickJsExecutor } from "@executor-js/runtime-quickjs";
2828
import { collectTables } from "@executor-js/api/server";
@@ -138,12 +138,8 @@ const openSession = (
138138
Effect.gen(function* () {
139139
const executor = yield* buildScopedExecutor(organizationId, `Org ${organizationId}`, options);
140140
const engine = createExecutionEngine({ executor, codeExecutor: makeQuickJsExecutor() });
141-
const mcpServer = yield* buildMcpServer({
141+
const mcpServer = yield* createExecutorMcpServer({
142142
engine,
143-
appsEnabled: false,
144-
requestStateSigningKey: new Uint8Array(32).fill(23),
145-
requestStatePrincipal: `cloud-mcp-test:${organizationId}`,
146-
sessionful: true,
147143
elicitationMode: options.elicitationMode ? { mode: options.elicitationMode } : undefined,
148144
});
149145
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();

apps/cloud/src/mcp/agent-handler.test.ts

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)