Skip to content

Commit 37d5e01

Browse files
authored
fix(mcp): increase timeout from 1m to 10m (#3093)
1 parent 2d799b3 commit 37d5e01

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

apps/sim/app/api/mcp/serve/[serverId]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ async function handleToolsCall(
264264
method: 'POST',
265265
headers,
266266
body: JSON.stringify({ input: params.arguments || {}, triggerType: 'mcp' }),
267-
signal: AbortSignal.timeout(300000), // 5 minute timeout
267+
signal: AbortSignal.timeout(600000), // 10 minute timeout
268268
})
269269

270270
const executeResult = await response.json()

apps/sim/lib/mcp/shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function sanitizeHeaders(
3434
* Client-safe MCP constants
3535
*/
3636
export const MCP_CLIENT_CONSTANTS = {
37-
CLIENT_TIMEOUT: 60000,
37+
CLIENT_TIMEOUT: 600000,
3838
MAX_RETRIES: 3,
3939
RECONNECT_DELAY: 1000,
4040
} as const

apps/sim/lib/mcp/utils.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ describe('generateMcpServerId', () => {
8181
})
8282

8383
describe('MCP_CONSTANTS', () => {
84-
it.concurrent('has correct execution timeout', () => {
85-
expect(MCP_CONSTANTS.EXECUTION_TIMEOUT).toBe(60000)
84+
it.concurrent('has correct execution timeout (10 minutes)', () => {
85+
expect(MCP_CONSTANTS.EXECUTION_TIMEOUT).toBe(600000)
8686
})
8787

8888
it.concurrent('has correct cache timeout (5 minutes)', () => {
@@ -107,8 +107,8 @@ describe('MCP_CONSTANTS', () => {
107107
})
108108

109109
describe('MCP_CLIENT_CONSTANTS', () => {
110-
it.concurrent('has correct client timeout', () => {
111-
expect(MCP_CLIENT_CONSTANTS.CLIENT_TIMEOUT).toBe(60000)
110+
it.concurrent('has correct client timeout (10 minutes)', () => {
111+
expect(MCP_CLIENT_CONSTANTS.CLIENT_TIMEOUT).toBe(600000)
112112
})
113113

114114
it.concurrent('has correct auto refresh interval (5 minutes)', () => {

apps/sim/lib/mcp/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { isMcpTool, MCP } from '@/executor/constants'
66
* MCP-specific constants
77
*/
88
export const MCP_CONSTANTS = {
9-
EXECUTION_TIMEOUT: 60000,
9+
EXECUTION_TIMEOUT: 600000,
1010
CACHE_TIMEOUT: 5 * 60 * 1000,
1111
DEFAULT_RETRIES: 3,
1212
DEFAULT_CONNECTION_TIMEOUT: 30000,
@@ -49,7 +49,7 @@ export function sanitizeHeaders(
4949
* Client-safe MCP constants
5050
*/
5151
export const MCP_CLIENT_CONSTANTS = {
52-
CLIENT_TIMEOUT: 60000,
52+
CLIENT_TIMEOUT: 600000,
5353
AUTO_REFRESH_INTERVAL: 5 * 60 * 1000,
5454
} as const
5555

0 commit comments

Comments
 (0)