diff --git a/packages/opencode/src/mcp/index.ts b/packages/opencode/src/mcp/index.ts index 3a348abb8ed3..68e21560a5ee 100644 --- a/packages/opencode/src/mcp/index.ts +++ b/packages/opencode/src/mcp/index.ts @@ -166,7 +166,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number return dynamicTool({ description: mcpTool.description ?? "", inputSchema: jsonSchema(schema), - execute: async (args: unknown) => { + execute: async (args: unknown, options) => { return client.callTool( { name: mcpTool.name, @@ -175,6 +175,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number CallToolResultSchema, { resetTimeoutOnProgress: true, + signal: options.abortSignal, timeout, }, )