Skip to content

🎥 Make videos programmatically with React

fix(mcp): abort documentation fetch after 10 seconds

DeryFerdd79efb400d2a
diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts
index a2a5325526..282f728d22 100644
--- a/packages/mcp/src/index.ts
+++ b/packages/mcp/src/index.ts
@@ -25,6 +25,9 @@ server.registerTool(
async ({query}: {query: string}) => {
const res = await fetch(
`${HOST}/mcp/67cad4626afeae106c6ffb50?query=${encodeURIComponent(query)}`,
+ {
+ signal: AbortSignal.timeout(10_000),
+ },
);
return {content: [{type: 'text' as const, text: await res.text()}]};
},