diff --git a/packages/service/core/app/mcp.ts b/packages/service/core/app/mcp.ts index 1d375136a..bc8bec246 100644 --- a/packages/service/core/app/mcp.ts +++ b/packages/service/core/app/mcp.ts @@ -110,10 +110,16 @@ export class MCPClient { const client = await this.getConnection(); addLog.debug(`[MCP Client] Call tool: ${toolName}`, params); - return await client.callTool({ - name: toolName, - arguments: params - }); + return await client.callTool( + { + name: toolName, + arguments: params + }, + undefined, + { + timeout: 300000 + } + ); } catch (error) { addLog.error(`[MCP Client] Failed to call tool ${toolName}:`, error); return Promise.reject(error); diff --git a/projects/app/src/web/core/app/api/plugin.ts b/projects/app/src/web/core/app/api/plugin.ts index 635fadbfc..5359a65b1 100644 --- a/projects/app/src/web/core/app/api/plugin.ts +++ b/projects/app/src/web/core/app/api/plugin.ts @@ -88,7 +88,8 @@ export const postUpdateMCPTools = (data: updateMCPToolsBody) => export const getMCPTools = (data: getMCPToolsBody) => POST('/support/mcp/client/getTools', data); -export const postRunMCPTool = (data: RunMCPToolBody) => POST('/support/mcp/client/runTool', data); +export const postRunMCPTool = (data: RunMCPToolBody) => + POST('/support/mcp/client/runTool', data, { timeout: 300000 }); /* ============ http plugin ============== */ export const postCreateHttpPlugin = (data: createHttpPluginBody) =>