Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/handler/mcp-api-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ export type Config = {
* @default false
*/
disableSse?: boolean;

/**
* sessionIdGenerator for the streamable HTTP transport
*/
sessionIdGenerator?: undefined;
};

/**
Expand Down Expand Up @@ -247,6 +252,7 @@ export function initializeMcpApiHandler(
maxDuration,
verboseLogs,
disableSse,
sessionIdGenerator,
} = config;

const {
Expand All @@ -272,7 +278,7 @@ export function initializeMcpApiHandler(

let statelessServer: McpServer;
const statelessTransport = new StreamableHTTPServerTransport({
sessionIdGenerator: undefined,
sessionIdGenerator: sessionIdGenerator,
});

// Start periodic cleanup if not already running
Expand Down