diff --git a/apps/sim/app/api/mcp/serve/[serverId]/route.ts b/apps/sim/app/api/mcp/serve/[serverId]/route.ts index baa33e205..1bc217177 100644 --- a/apps/sim/app/api/mcp/serve/[serverId]/route.ts +++ b/apps/sim/app/api/mcp/serve/[serverId]/route.ts @@ -264,7 +264,7 @@ async function handleToolsCall( method: 'POST', headers, body: JSON.stringify({ input: params.arguments || {}, triggerType: 'mcp' }), - signal: AbortSignal.timeout(300000), // 5 minute timeout + signal: AbortSignal.timeout(600000), // 10 minute timeout }) const executeResult = await response.json() diff --git a/apps/sim/lib/mcp/shared.ts b/apps/sim/lib/mcp/shared.ts index e865aae6e..3f3bdae66 100644 --- a/apps/sim/lib/mcp/shared.ts +++ b/apps/sim/lib/mcp/shared.ts @@ -34,7 +34,7 @@ export function sanitizeHeaders( * Client-safe MCP constants */ export const MCP_CLIENT_CONSTANTS = { - CLIENT_TIMEOUT: 60000, + CLIENT_TIMEOUT: 600000, MAX_RETRIES: 3, RECONNECT_DELAY: 1000, } as const diff --git a/apps/sim/lib/mcp/utils.test.ts b/apps/sim/lib/mcp/utils.test.ts index 518e0bb23..1b0cabf98 100644 --- a/apps/sim/lib/mcp/utils.test.ts +++ b/apps/sim/lib/mcp/utils.test.ts @@ -81,8 +81,8 @@ describe('generateMcpServerId', () => { }) describe('MCP_CONSTANTS', () => { - it.concurrent('has correct execution timeout', () => { - expect(MCP_CONSTANTS.EXECUTION_TIMEOUT).toBe(60000) + it.concurrent('has correct execution timeout (10 minutes)', () => { + expect(MCP_CONSTANTS.EXECUTION_TIMEOUT).toBe(600000) }) it.concurrent('has correct cache timeout (5 minutes)', () => { @@ -107,8 +107,8 @@ describe('MCP_CONSTANTS', () => { }) describe('MCP_CLIENT_CONSTANTS', () => { - it.concurrent('has correct client timeout', () => { - expect(MCP_CLIENT_CONSTANTS.CLIENT_TIMEOUT).toBe(60000) + it.concurrent('has correct client timeout (10 minutes)', () => { + expect(MCP_CLIENT_CONSTANTS.CLIENT_TIMEOUT).toBe(600000) }) it.concurrent('has correct auto refresh interval (5 minutes)', () => { diff --git a/apps/sim/lib/mcp/utils.ts b/apps/sim/lib/mcp/utils.ts index a732dc382..ab28a66ee 100644 --- a/apps/sim/lib/mcp/utils.ts +++ b/apps/sim/lib/mcp/utils.ts @@ -6,7 +6,7 @@ import { isMcpTool, MCP } from '@/executor/constants' * MCP-specific constants */ export const MCP_CONSTANTS = { - EXECUTION_TIMEOUT: 60000, + EXECUTION_TIMEOUT: 600000, CACHE_TIMEOUT: 5 * 60 * 1000, DEFAULT_RETRIES: 3, DEFAULT_CONNECTION_TIMEOUT: 30000, @@ -49,7 +49,7 @@ export function sanitizeHeaders( * Client-safe MCP constants */ export const MCP_CLIENT_CONSTANTS = { - CLIENT_TIMEOUT: 60000, + CLIENT_TIMEOUT: 600000, AUTO_REFRESH_INTERVAL: 5 * 60 * 1000, } as const