firecrawl-mcp 3.21.1 → 3.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +23 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1347,7 +1347,7 @@ async function monitorRequest(session, path2, init = {}) {
|
|
|
1347
1347
|
const s = qs.toString();
|
|
1348
1348
|
if (s) url += `?${s}`;
|
|
1349
1349
|
}
|
|
1350
|
-
const headers = { "X-Origin": "mcp" };
|
|
1350
|
+
const headers = { "X-Origin": "mcp-fastmcp" };
|
|
1351
1351
|
if (apiKey) headers.Authorization = `Bearer ${apiKey}`;
|
|
1352
1352
|
if (init.body !== void 0) headers["Content-Type"] = "application/json";
|
|
1353
1353
|
const response = await fetch(url, {
|
|
@@ -2333,6 +2333,7 @@ function createClient(apiKey) {
|
|
|
2333
2333
|
return new FirecrawlApp(config);
|
|
2334
2334
|
}
|
|
2335
2335
|
var ORIGIN = "mcp-fastmcp";
|
|
2336
|
+
var ORIGIN_HEADERS2 = { "X-Origin": ORIGIN };
|
|
2336
2337
|
var SAFE_MODE = process.env.CLOUD_SERVICE === "true";
|
|
2337
2338
|
function getClient(session) {
|
|
2338
2339
|
if (process.env.CLOUD_SERVICE === "true") {
|
|
@@ -2837,6 +2838,7 @@ async function keylessEligible(clientIp) {
|
|
|
2837
2838
|
`${resolveApiBaseUrl()}/v2/keyless/eligibility`,
|
|
2838
2839
|
{
|
|
2839
2840
|
headers: {
|
|
2841
|
+
...ORIGIN_HEADERS2,
|
|
2840
2842
|
"x-firecrawl-keyless-ip": clientIp,
|
|
2841
2843
|
"x-firecrawl-keyless-secret": secret
|
|
2842
2844
|
}
|
|
@@ -2858,6 +2860,7 @@ function isKeylessMode(session) {
|
|
|
2858
2860
|
}
|
|
2859
2861
|
async function keylessPost(path2, body, session) {
|
|
2860
2862
|
const headers = {
|
|
2863
|
+
...ORIGIN_HEADERS2,
|
|
2861
2864
|
"Content-Type": "application/json"
|
|
2862
2865
|
};
|
|
2863
2866
|
if (session?.keylessClientIp && process.env.KEYLESS_PROXY_SECRET) {
|
|
@@ -3024,6 +3027,7 @@ Pass the \`searchId\` returned by \`firecrawl_search\` (the \`id\` field on the
|
|
|
3024
3027
|
}
|
|
3025
3028
|
if (querySuggestions) body.querySuggestions = querySuggestions;
|
|
3026
3029
|
const headers = {
|
|
3030
|
+
...ORIGIN_HEADERS2,
|
|
3027
3031
|
"Content-Type": "application/json"
|
|
3028
3032
|
};
|
|
3029
3033
|
const apiKey = session?.firecrawlApiKey;
|
|
@@ -3127,6 +3131,7 @@ Do not store multi-MB outputs in feedback. Use concise notes, issue codes, URLs,
|
|
|
3127
3131
|
} = args2;
|
|
3128
3132
|
const apiBase = resolveApiBaseUrl();
|
|
3129
3133
|
const headers = {
|
|
3134
|
+
...ORIGIN_HEADERS2,
|
|
3130
3135
|
"Content-Type": "application/json"
|
|
3131
3136
|
};
|
|
3132
3137
|
const apiKey = session?.firecrawlApiKey;
|
|
@@ -3286,8 +3291,12 @@ Check the status of a crawl job.
|
|
|
3286
3291
|
parameters: z4.object({ id: z4.string() }),
|
|
3287
3292
|
execute: async (args2, { session }) => {
|
|
3288
3293
|
const client = getClient(session);
|
|
3289
|
-
const
|
|
3290
|
-
|
|
3294
|
+
const id = args2.id;
|
|
3295
|
+
const res = await client.http.get(
|
|
3296
|
+
`/v2/crawl/${encodeURIComponent(id)}`,
|
|
3297
|
+
ORIGIN_HEADERS2
|
|
3298
|
+
);
|
|
3299
|
+
return asText2(res?.data ?? {});
|
|
3291
3300
|
}
|
|
3292
3301
|
});
|
|
3293
3302
|
server.addTool({
|
|
@@ -3510,8 +3519,11 @@ Check the status of an agent job and retrieve results when complete. Use this to
|
|
|
3510
3519
|
const client = getClient(session);
|
|
3511
3520
|
const { id } = args2;
|
|
3512
3521
|
log.info("Checking agent status", { id });
|
|
3513
|
-
const res = await client.
|
|
3514
|
-
|
|
3522
|
+
const res = await client.http.get(
|
|
3523
|
+
`/v2/agent/${encodeURIComponent(id)}`,
|
|
3524
|
+
ORIGIN_HEADERS2
|
|
3525
|
+
);
|
|
3526
|
+
return asText2(res?.data ?? {});
|
|
3515
3527
|
}
|
|
3516
3528
|
});
|
|
3517
3529
|
server.addTool({
|
|
@@ -3616,8 +3628,11 @@ Stop an interact session for a scraped page. Call this when you are done interac
|
|
|
3616
3628
|
const client = getClient(session);
|
|
3617
3629
|
const { scrapeId } = args2;
|
|
3618
3630
|
log.info("Stopping interact session", { scrapeId });
|
|
3619
|
-
const res = await client.
|
|
3620
|
-
|
|
3631
|
+
const res = await client.http.delete(
|
|
3632
|
+
`/v2/scrape/${encodeURIComponent(scrapeId)}/interact`,
|
|
3633
|
+
ORIGIN_HEADERS2
|
|
3634
|
+
);
|
|
3635
|
+
return asText2(res?.data ?? {});
|
|
3621
3636
|
}
|
|
3622
3637
|
});
|
|
3623
3638
|
if (process.env.CLOUD_SERVICE !== "true") {
|
|
@@ -3789,7 +3804,7 @@ Add \`"parsers": ["pdf"]\` (optionally with \`pdfOptions.maxPages\`) when parsin
|
|
|
3789
3804
|
});
|
|
3790
3805
|
form.append("file", blob, filename);
|
|
3791
3806
|
form.append("options", JSON.stringify(optionsPayload));
|
|
3792
|
-
const headers = {};
|
|
3807
|
+
const headers = { ...ORIGIN_HEADERS2 };
|
|
3793
3808
|
const apiKey = session?.firecrawlApiKey;
|
|
3794
3809
|
if (apiKey) {
|
|
3795
3810
|
headers["Authorization"] = `Bearer ${apiKey}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firecrawl-mcp",
|
|
3
|
-
"version": "3.21.
|
|
3
|
+
"version": "3.21.2",
|
|
4
4
|
"description": "MCP server for Firecrawl — search, scrape, and interact with the web. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, and LLM-powered content analysis.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"mcpName": "io.github.firecrawl/firecrawl-mcp-server",
|