Skip to content

Commit ef4dac4

Browse files
committed
Nick: origin experiement
1 parent 9972143 commit ef4dac4

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firecrawl-mcp",
3-
"version": "1.7.1",
3+
"version": "1.7.2",
44
"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.",
55
"type": "module",
66
"bin": {

src/index.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
996996
`Starting scrape for URL: ${url} with options: ${JSON.stringify(options)}`
997997
);
998998

999-
const response = await client.scrapeUrl(url, options);
999+
//@ts-ignore
1000+
const response = await client.scrapeUrl(url, { ...options, origin: 'mcp-server' });
10001001

10011002
// Log performance metrics
10021003
safeLog(
@@ -1066,7 +1067,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
10661067
throw new Error('Invalid arguments for firecrawl_map');
10671068
}
10681069
const { url, ...options } = args;
1069-
const response = await client.mapUrl(url, options);
1070+
//@ts-ignore
1071+
const response = await client.mapUrl(url, { ...options, origin: 'mcp-server' });
10701072
if ('error' in response) {
10711073
throw new Error(response.error);
10721074
}
@@ -1173,9 +1175,9 @@ ${
11731175
throw new Error('Invalid arguments for firecrawl_crawl');
11741176
}
11751177
const { url, ...options } = args;
1176-
11771178
const response = await withRetry(
1178-
async () => client.asyncCrawlUrl(url, options),
1179+
//@ts-ignore
1180+
async () => client.asyncCrawlUrl(url, { ...options, origin: 'mcp-server' }),
11791181
'crawl operation'
11801182
);
11811183

@@ -1229,7 +1231,7 @@ ${
12291231
}
12301232
try {
12311233
const response = await withRetry(
1232-
async () => client.search(args.query, args),
1234+
async () => client.search(args.query, { ...args, origin: 'mcp-server' }),
12331235
'search operation'
12341236
);
12351237

@@ -1385,6 +1387,8 @@ ${result.markdown ? `\nContent:\n${result.markdown}` : ''}`
13851387
maxDepth: args.maxDepth as number,
13861388
timeLimit: args.timeLimit as number,
13871389
maxUrls: args.maxUrls as number,
1390+
//@ts-ignore
1391+
origin: 'mcp-server',
13881392
},
13891393
// Activity callback
13901394
(activity) => {
@@ -1451,7 +1455,8 @@ ${result.markdown ? `\nContent:\n${result.markdown}` : ''}`
14511455

14521456
// Start the generation process
14531457
const response = await withRetry(
1454-
async () => client.generateLLMsText(url, params),
1458+
//@ts-ignore
1459+
async () => client.generateLLMsText(url, { ...params, origin: 'mcp-server' }),
14551460
'LLMs.txt generation'
14561461
);
14571462

0 commit comments

Comments
 (0)