From 32ff03b41d921e0653781e059617f56734f0bcfa Mon Sep 17 00:00:00 2001 From: ColaBJ <450313829@qq.com> Date: Wed, 30 Apr 2025 12:30:30 +0800 Subject: [PATCH] fix-local mode bug arg CLOUD_SERVICE is not boolean but str --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 5134c1e..77bef76 100644 --- a/src/index.ts +++ b/src/index.ts @@ -804,10 +804,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { try { const { name, arguments: args } = request.params; - const apiKey = process.env.CLOUD_SERVICE + const apiKey = process.env.CLOUD_SERVICE==='ture' ? (request.params._meta?.apiKey as string) : FIRECRAWL_API_KEY; - if (process.env.CLOUD_SERVICE && !apiKey) { + if (process.env.CLOUD_SERVICE==='ture' && !apiKey) { throw new Error('No API key provided'); }