firecrawl-mcp 1.7.1 → 1.7.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 +13 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -741,7 +741,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
741
741
|
try {
|
|
742
742
|
const scrapeStartTime = Date.now();
|
|
743
743
|
safeLog('info', `Starting scrape for URL: ${url} with options: ${JSON.stringify(options)}`);
|
|
744
|
-
|
|
744
|
+
//@ts-ignore
|
|
745
|
+
const response = await client.scrapeUrl(url, { ...options, origin: 'mcp-server' });
|
|
745
746
|
// Log performance metrics
|
|
746
747
|
safeLog('info', `Scrape completed in ${Date.now() - scrapeStartTime}ms`);
|
|
747
748
|
if ('success' in response && !response.success) {
|
|
@@ -798,7 +799,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
798
799
|
throw new Error('Invalid arguments for firecrawl_map');
|
|
799
800
|
}
|
|
800
801
|
const { url, ...options } = args;
|
|
801
|
-
|
|
802
|
+
//@ts-ignore
|
|
803
|
+
const response = await client.mapUrl(url, { ...options, origin: 'mcp-server' });
|
|
802
804
|
if ('error' in response) {
|
|
803
805
|
throw new Error(response.error);
|
|
804
806
|
}
|
|
@@ -885,7 +887,9 @@ ${operation.result
|
|
|
885
887
|
throw new Error('Invalid arguments for firecrawl_crawl');
|
|
886
888
|
}
|
|
887
889
|
const { url, ...options } = args;
|
|
888
|
-
const response = await withRetry(
|
|
890
|
+
const response = await withRetry(
|
|
891
|
+
//@ts-ignore
|
|
892
|
+
async () => client.asyncCrawlUrl(url, { ...options, origin: 'mcp-server' }), 'crawl operation');
|
|
889
893
|
if (!response.success) {
|
|
890
894
|
throw new Error(response.error);
|
|
891
895
|
}
|
|
@@ -927,7 +931,7 @@ ${response.data.length > 0 ? '\nResults:\n' + formatResults(response.data) : ''}
|
|
|
927
931
|
throw new Error('Invalid arguments for firecrawl_search');
|
|
928
932
|
}
|
|
929
933
|
try {
|
|
930
|
-
const response = await withRetry(async () => client.search(args.query, args), 'search operation');
|
|
934
|
+
const response = await withRetry(async () => client.search(args.query, { ...args, origin: 'mcp-server' }), 'search operation');
|
|
931
935
|
if (!response.success) {
|
|
932
936
|
throw new Error(`Search failed: ${response.error || 'Unknown error'}`);
|
|
933
937
|
}
|
|
@@ -1036,6 +1040,8 @@ ${result.markdown ? `\nContent:\n${result.markdown}` : ''}`)
|
|
|
1036
1040
|
maxDepth: args.maxDepth,
|
|
1037
1041
|
timeLimit: args.timeLimit,
|
|
1038
1042
|
maxUrls: args.maxUrls,
|
|
1043
|
+
//@ts-ignore
|
|
1044
|
+
origin: 'mcp-server',
|
|
1039
1045
|
},
|
|
1040
1046
|
// Activity callback
|
|
1041
1047
|
(activity) => {
|
|
@@ -1083,7 +1089,9 @@ ${result.markdown ? `\nContent:\n${result.markdown}` : ''}`)
|
|
|
1083
1089
|
const generateStartTime = Date.now();
|
|
1084
1090
|
safeLog('info', `Starting LLMs.txt generation for URL: ${url}`);
|
|
1085
1091
|
// Start the generation process
|
|
1086
|
-
const response = await withRetry(
|
|
1092
|
+
const response = await withRetry(
|
|
1093
|
+
//@ts-ignore
|
|
1094
|
+
async () => client.generateLLMsText(url, { ...params, origin: 'mcp-server' }), 'LLMs.txt generation');
|
|
1087
1095
|
if (!response.success) {
|
|
1088
1096
|
throw new Error(response.error || 'LLMs.txt generation failed');
|
|
1089
1097
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firecrawl-mcp",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "MCP server for FireCrawl web scraping integration. Supports both cloud and self-hosted instances. Features include web scraping, batch processing, structured data extraction, and LLM-powered content analysis.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|