scrapeless-mcp-server 0.4.7 → 0.4.9
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/README.md +1 -5
- package/build/tools/browser/browser.js +46 -41
- package/build/tools/deepserp/googleSearch.js +15 -253
- package/build/tools/universal/scrapeMarkdown.js +14 -7
- package/package.json +1 -1
- package/build/logs/.8929a066e1e20cab48ddbfa9c509b48984514299-audit.json +0 -15
- package/build/tools/deepserp/googleFlights.js +0 -209
- package/build/tools/deepserp/googleScholar.js +0 -74
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Built on the open MCP standard, Scrapeless MCP Server seamlessly connects models like **ChatGPT**, **Claude**, and tools like **Cursor** and **Windsurf** to a wide range of external capabilities, including:
|
|
8
8
|
|
|
9
|
-
- **Google services integration** (Search,
|
|
9
|
+
- **Google services integration** (Search, Trends)
|
|
10
10
|
- **Browser automation** for page-level navigation and interaction
|
|
11
11
|
- **Scrape** dynamic, JS-heavy sites—export as HTML, Markdown, or screenshots
|
|
12
12
|
|
|
@@ -42,8 +42,6 @@ Here are some additional examples of how to use these servers:
|
|
|
42
42
|
|
|
43
43
|
| Example |
|
|
44
44
|
| --------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
-
| Please help me with my flight ticket from Chicago to New York on November 20, 2025. |
|
|
46
|
-
| Find papers by "Yoshua Bengio" on deep learning. |
|
|
47
45
|
| Search scrapeless by Google search. |
|
|
48
46
|
| Find the search interest for "AI" over the last year. |
|
|
49
47
|
| Use a browser to visit [chatgpt.com](http://chatgpt.com), search for "What's the weather like today?", and summarize the results. |
|
|
@@ -134,9 +132,7 @@ Customize browser session behavior with optional parameters. These can be set vi
|
|
|
134
132
|
| Name | Description |
|
|
135
133
|
| ------------------ | ------------------------------------------------- |
|
|
136
134
|
| google_search | Universal information search engine. |
|
|
137
|
-
| google_flights | Exclusive flight information query tool. |
|
|
138
135
|
| google_trends | Get trending search data from Google Trends. |
|
|
139
|
-
| google_scholar | Search for academic papers on Google Scholar. |
|
|
140
136
|
| browser_goto | Navigate browser to a specified URL. |
|
|
141
137
|
| browser_go_back | Go back one step in browser history. |
|
|
142
138
|
| browser_go_forward | Go forward one step in browser history. |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { defineTool, wrapMcpBrowserResponse, snapshot } from "../utils.js";
|
|
2
|
+
import { defineTool, wrapMcpBrowserResponse, snapshot, } from "../utils.js";
|
|
3
3
|
export const browserCreate = defineTool({
|
|
4
4
|
name: "browser_create",
|
|
5
5
|
description: "Create or reuse a cloud browser session using Scrapeless. Updates the active session.",
|
|
@@ -46,12 +46,8 @@ export const browserGoto = defineTool({
|
|
|
46
46
|
content: [
|
|
47
47
|
{
|
|
48
48
|
type: "text",
|
|
49
|
-
text:
|
|
49
|
+
text: accessibilitySnapshot,
|
|
50
50
|
},
|
|
51
|
-
{
|
|
52
|
-
type: "text",
|
|
53
|
-
text: accessibilitySnapshot
|
|
54
|
-
}
|
|
55
51
|
],
|
|
56
52
|
};
|
|
57
53
|
},
|
|
@@ -77,10 +73,6 @@ export const browserGoBack = defineTool({
|
|
|
77
73
|
const accessibilitySnapshot = await snapshot(session.page);
|
|
78
74
|
return {
|
|
79
75
|
content: [
|
|
80
|
-
{
|
|
81
|
-
type: "text",
|
|
82
|
-
text: "Navigated back.",
|
|
83
|
-
},
|
|
84
76
|
{
|
|
85
77
|
type: "text",
|
|
86
78
|
text: accessibilitySnapshot,
|
|
@@ -110,10 +102,6 @@ export const browserGoForward = defineTool({
|
|
|
110
102
|
const accessibilitySnapshot = await snapshot(session.page);
|
|
111
103
|
return {
|
|
112
104
|
content: [
|
|
113
|
-
{
|
|
114
|
-
type: "text",
|
|
115
|
-
text: "Navigated forward.",
|
|
116
|
-
},
|
|
117
105
|
{
|
|
118
106
|
type: "text",
|
|
119
107
|
text: accessibilitySnapshot,
|
|
@@ -147,13 +135,9 @@ export const browserClick = defineTool({
|
|
|
147
135
|
content: [
|
|
148
136
|
{
|
|
149
137
|
type: "text",
|
|
150
|
-
text:
|
|
138
|
+
text: accessibilitySnapshot,
|
|
151
139
|
},
|
|
152
|
-
|
|
153
|
-
type: "text",
|
|
154
|
-
text: accessibilitySnapshot
|
|
155
|
-
}
|
|
156
|
-
]
|
|
140
|
+
],
|
|
157
141
|
};
|
|
158
142
|
}
|
|
159
143
|
catch (error) {
|
|
@@ -187,13 +171,9 @@ export const browserType = defineTool({
|
|
|
187
171
|
content: [
|
|
188
172
|
{
|
|
189
173
|
type: "text",
|
|
190
|
-
text:
|
|
174
|
+
text: accessibilitySnapshot,
|
|
191
175
|
},
|
|
192
|
-
|
|
193
|
-
type: "text",
|
|
194
|
-
text: accessibilitySnapshot
|
|
195
|
-
}
|
|
196
|
-
]
|
|
176
|
+
],
|
|
197
177
|
};
|
|
198
178
|
}
|
|
199
179
|
catch (error) {
|
|
@@ -256,6 +236,38 @@ export const browserWait = defineTool({
|
|
|
256
236
|
return wrapMcpBrowserResponse(`Waited for ${params.time ?? 30000} milliseconds`);
|
|
257
237
|
},
|
|
258
238
|
});
|
|
239
|
+
export const browserSnapshot = defineTool({
|
|
240
|
+
name: "browser_snapshot",
|
|
241
|
+
description: `Capture the complete structure of a webpage, including DOM and resources, for inspection and analysis.`,
|
|
242
|
+
inputSchema: {
|
|
243
|
+
sessionId: z
|
|
244
|
+
.string()
|
|
245
|
+
.optional()
|
|
246
|
+
.describe("Optional session ID to use/reuse. If not provided or invalid, the active session is used."),
|
|
247
|
+
},
|
|
248
|
+
handle: async (context, params) => {
|
|
249
|
+
const session = context.getSession(params.sessionId);
|
|
250
|
+
if (!session?.page) {
|
|
251
|
+
return wrapMcpBrowserResponse("No active browser session found. Please create a browser session first.");
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
const accessibilitySnapshot = await snapshot(session.page);
|
|
255
|
+
return {
|
|
256
|
+
content: [
|
|
257
|
+
{
|
|
258
|
+
type: "text",
|
|
259
|
+
text: accessibilitySnapshot,
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
catch (error) {
|
|
265
|
+
return {
|
|
266
|
+
content: [],
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
});
|
|
259
271
|
export const browserScreenshot = defineTool({
|
|
260
272
|
name: "browser_screenshot",
|
|
261
273
|
description: `Capture a screenshot of the current page.
|
|
@@ -297,7 +309,7 @@ export const browserScreenshot = defineTool({
|
|
|
297
309
|
{
|
|
298
310
|
type: "text",
|
|
299
311
|
text: accessibilitySnapshot,
|
|
300
|
-
}
|
|
312
|
+
},
|
|
301
313
|
],
|
|
302
314
|
};
|
|
303
315
|
}
|
|
@@ -384,10 +396,6 @@ export const browserScroll = defineTool({
|
|
|
384
396
|
const accessibilitySnapshot = await snapshot(session.page);
|
|
385
397
|
return {
|
|
386
398
|
content: [
|
|
387
|
-
{
|
|
388
|
-
type: "text",
|
|
389
|
-
text: `Scrolled to the bottom of the page.`,
|
|
390
|
-
},
|
|
391
399
|
{
|
|
392
400
|
type: "text",
|
|
393
401
|
text: accessibilitySnapshot,
|
|
@@ -426,10 +434,6 @@ export const browserScrollTo = defineTool({
|
|
|
426
434
|
const accessibilitySnapshot = await snapshot(session.page);
|
|
427
435
|
return {
|
|
428
436
|
content: [
|
|
429
|
-
{
|
|
430
|
-
type: "text",
|
|
431
|
-
text: `Scrolled to position (${params.x}, ${params.y})`,
|
|
432
|
-
},
|
|
433
437
|
{
|
|
434
438
|
type: "text",
|
|
435
439
|
text: accessibilitySnapshot,
|
|
@@ -449,8 +453,13 @@ export const browserPressKey = defineTool({
|
|
|
449
453
|
Valid: Press Enter in #search.
|
|
450
454
|
Invalid: Press a key without specifying the key name.`,
|
|
451
455
|
inputSchema: {
|
|
452
|
-
selector: z
|
|
453
|
-
|
|
456
|
+
selector: z
|
|
457
|
+
.string()
|
|
458
|
+
.describe("The CSS selector of the element to focus.")
|
|
459
|
+
.optional(),
|
|
460
|
+
key: z
|
|
461
|
+
.string()
|
|
462
|
+
.describe("Name of the key to press or a character to generate, such as `ArrowLeft` or `a`"),
|
|
454
463
|
},
|
|
455
464
|
handle: async (context, params) => {
|
|
456
465
|
const session = context.getSession(params.sessionId);
|
|
@@ -465,10 +474,6 @@ export const browserPressKey = defineTool({
|
|
|
465
474
|
const accessibilitySnapshot = await snapshot(session.page);
|
|
466
475
|
return {
|
|
467
476
|
content: [
|
|
468
|
-
{
|
|
469
|
-
type: "text",
|
|
470
|
-
text: params.selector ? `Focus on the ${params.selector} and press ${params.key}` : `press ${params.key}`,
|
|
471
|
-
},
|
|
472
477
|
{
|
|
473
478
|
type: "text",
|
|
474
479
|
text: accessibilitySnapshot,
|
|
@@ -16,260 +16,22 @@ export const googleSearch = defineTool({
|
|
|
16
16
|
.string()
|
|
17
17
|
.describe("Parameter defines the country to use for the Google search. It's a two-letter country code. (e.g., us for the United States, uk for United Kingdom, or fr for France).")
|
|
18
18
|
.default("us"),
|
|
19
|
-
google_domain: z
|
|
20
|
-
.union([
|
|
21
|
-
z.literal("google.com"),
|
|
22
|
-
z.literal("google.ad"),
|
|
23
|
-
z.literal("google.ae"),
|
|
24
|
-
z.literal("google.com.af"),
|
|
25
|
-
z.literal("google.com.ag"),
|
|
26
|
-
z.literal("google.com.ai"),
|
|
27
|
-
z.literal("google.al"),
|
|
28
|
-
z.literal("google.am"),
|
|
29
|
-
z.literal("google.co.ao"),
|
|
30
|
-
z.literal("google.com.ar"),
|
|
31
|
-
z.literal("google.as"),
|
|
32
|
-
z.literal("google.at"),
|
|
33
|
-
z.literal("google.com.au"),
|
|
34
|
-
z.literal("google.az"),
|
|
35
|
-
z.literal("google.ba"),
|
|
36
|
-
z.literal("google.com.bd"),
|
|
37
|
-
z.literal("google.be"),
|
|
38
|
-
z.literal("google.bf"),
|
|
39
|
-
z.literal("google.bg"),
|
|
40
|
-
z.literal("google.com.bh"),
|
|
41
|
-
z.literal("google.bi"),
|
|
42
|
-
z.literal("google.bj"),
|
|
43
|
-
z.literal("google.com.bn"),
|
|
44
|
-
z.literal("google.com.bo"),
|
|
45
|
-
z.literal("google.com.br"),
|
|
46
|
-
z.literal("google.bs"),
|
|
47
|
-
z.literal("google.bt"),
|
|
48
|
-
z.literal("google.co.bw"),
|
|
49
|
-
z.literal("google.by"),
|
|
50
|
-
z.literal("google.com.bz"),
|
|
51
|
-
z.literal("google.ca"),
|
|
52
|
-
z.literal("google.com.kh"),
|
|
53
|
-
z.literal("google.cd"),
|
|
54
|
-
z.literal("google.cf"),
|
|
55
|
-
z.literal("google.cg"),
|
|
56
|
-
z.literal("google.ch"),
|
|
57
|
-
z.literal("google.ci"),
|
|
58
|
-
z.literal("google.co.ck"),
|
|
59
|
-
z.literal("google.cl"),
|
|
60
|
-
z.literal("google.cm"),
|
|
61
|
-
z.literal("google.com.co"),
|
|
62
|
-
z.literal("google.co.cr"),
|
|
63
|
-
z.literal("google.com.cu"),
|
|
64
|
-
z.literal("google.cv"),
|
|
65
|
-
z.literal("google.com.cy"),
|
|
66
|
-
z.literal("google.cz"),
|
|
67
|
-
z.literal("google.de"),
|
|
68
|
-
z.literal("google.dj"),
|
|
69
|
-
z.literal("google.dk"),
|
|
70
|
-
z.literal("google.dm"),
|
|
71
|
-
z.literal("google.com.do"),
|
|
72
|
-
z.literal("google.dz"),
|
|
73
|
-
z.literal("google.com.ec"),
|
|
74
|
-
z.literal("google.ee"),
|
|
75
|
-
z.literal("google.com.eg"),
|
|
76
|
-
z.literal("google.es"),
|
|
77
|
-
z.literal("google.com.et"),
|
|
78
|
-
z.literal("google.fi"),
|
|
79
|
-
z.literal("google.fm"),
|
|
80
|
-
z.literal("google.com.fj"),
|
|
81
|
-
z.literal("google.fr"),
|
|
82
|
-
z.literal("google.ga"),
|
|
83
|
-
z.literal("google.ge"),
|
|
84
|
-
z.literal("google.com.gh"),
|
|
85
|
-
z.literal("google.com.gi"),
|
|
86
|
-
z.literal("google.gl"),
|
|
87
|
-
z.literal("google.gm"),
|
|
88
|
-
z.literal("google.gp"),
|
|
89
|
-
z.literal("google.gr"),
|
|
90
|
-
z.literal("google.com.gt"),
|
|
91
|
-
z.literal("google.gy"),
|
|
92
|
-
z.literal("google.com.hk"),
|
|
93
|
-
z.literal("google.hn"),
|
|
94
|
-
z.literal("google.hr"),
|
|
95
|
-
z.literal("google.ht"),
|
|
96
|
-
z.literal("google.hu"),
|
|
97
|
-
z.literal("google.co.id"),
|
|
98
|
-
z.literal("google.iq"),
|
|
99
|
-
z.literal("google.ie"),
|
|
100
|
-
z.literal("google.co.il"),
|
|
101
|
-
z.literal("google.co.in"),
|
|
102
|
-
z.literal("google.is"),
|
|
103
|
-
z.literal("google.it"),
|
|
104
|
-
z.literal("google.je"),
|
|
105
|
-
z.literal("google.com.jm"),
|
|
106
|
-
z.literal("google.jo"),
|
|
107
|
-
z.literal("google.co.jp"),
|
|
108
|
-
z.literal("google.co.ke"),
|
|
109
|
-
z.literal("google.ki"),
|
|
110
|
-
z.literal("google.kg"),
|
|
111
|
-
z.literal("google.co.kr"),
|
|
112
|
-
z.literal("google.com.kw"),
|
|
113
|
-
z.literal("google.kz"),
|
|
114
|
-
z.literal("google.la"),
|
|
115
|
-
z.literal("google.com.lb"),
|
|
116
|
-
z.literal("google.li"),
|
|
117
|
-
z.literal("google.lk"),
|
|
118
|
-
z.literal("google.co.ls"),
|
|
119
|
-
z.literal("google.lt"),
|
|
120
|
-
z.literal("google.lu"),
|
|
121
|
-
z.literal("google.lv"),
|
|
122
|
-
z.literal("google.com.ly"),
|
|
123
|
-
z.literal("google.co.ma"),
|
|
124
|
-
z.literal("google.md"),
|
|
125
|
-
z.literal("google.mg"),
|
|
126
|
-
z.literal("google.mk"),
|
|
127
|
-
z.literal("google.ml"),
|
|
128
|
-
z.literal("google.com.mm"),
|
|
129
|
-
z.literal("google.mn"),
|
|
130
|
-
z.literal("google.ms"),
|
|
131
|
-
z.literal("google.com.mt"),
|
|
132
|
-
z.literal("google.mu"),
|
|
133
|
-
z.literal("google.mv"),
|
|
134
|
-
z.literal("google.mw"),
|
|
135
|
-
z.literal("google.com.mx"),
|
|
136
|
-
z.literal("google.com.my"),
|
|
137
|
-
z.literal("google.co.mz"),
|
|
138
|
-
z.literal("google.com.na"),
|
|
139
|
-
z.literal("google.ne"),
|
|
140
|
-
z.literal("google.com.ng"),
|
|
141
|
-
z.literal("google.com.ni"),
|
|
142
|
-
z.literal("google.nl"),
|
|
143
|
-
z.literal("google.no"),
|
|
144
|
-
z.literal("google.com.np"),
|
|
145
|
-
z.literal("google.nr"),
|
|
146
|
-
z.literal("google.nu"),
|
|
147
|
-
z.literal("google.co.nz"),
|
|
148
|
-
z.literal("google.com.om"),
|
|
149
|
-
z.literal("google.com.pk"),
|
|
150
|
-
z.literal("google.com.pa"),
|
|
151
|
-
z.literal("google.com.pe"),
|
|
152
|
-
z.literal("google.com.ph"),
|
|
153
|
-
z.literal("google.pl"),
|
|
154
|
-
z.literal("google.com.pg"),
|
|
155
|
-
z.literal("google.com.pr"),
|
|
156
|
-
z.literal("google.ps"),
|
|
157
|
-
z.literal("google.pt"),
|
|
158
|
-
z.literal("google.com.py"),
|
|
159
|
-
z.literal("google.com.qa"),
|
|
160
|
-
z.literal("google.ro"),
|
|
161
|
-
z.literal("google.rs"),
|
|
162
|
-
z.literal("google.ru"),
|
|
163
|
-
z.literal("google.rw"),
|
|
164
|
-
z.literal("google.com.sa"),
|
|
165
|
-
z.literal("google.com.sb"),
|
|
166
|
-
z.literal("google.sc"),
|
|
167
|
-
z.literal("google.se"),
|
|
168
|
-
z.literal("google.com.sg"),
|
|
169
|
-
z.literal("google.sh"),
|
|
170
|
-
z.literal("google.si"),
|
|
171
|
-
z.literal("google.sk"),
|
|
172
|
-
z.literal("google.com.sl"),
|
|
173
|
-
z.literal("google.sn"),
|
|
174
|
-
z.literal("google.sm"),
|
|
175
|
-
z.literal("google.so"),
|
|
176
|
-
z.literal("google.sr"),
|
|
177
|
-
z.literal("google.com.sv"),
|
|
178
|
-
z.literal("google.td"),
|
|
179
|
-
z.literal("google.tg"),
|
|
180
|
-
z.literal("google.co.th"),
|
|
181
|
-
z.literal("google.com.tj"),
|
|
182
|
-
z.literal("google.tk"),
|
|
183
|
-
z.literal("google.tl"),
|
|
184
|
-
z.literal("google.tm"),
|
|
185
|
-
z.literal("google.tn"),
|
|
186
|
-
z.literal("google.to"),
|
|
187
|
-
z.literal("google.com.tr"),
|
|
188
|
-
z.literal("google.tt"),
|
|
189
|
-
z.literal("google.com.tw"),
|
|
190
|
-
z.literal("google.co.tz"),
|
|
191
|
-
z.literal("google.com.ua"),
|
|
192
|
-
z.literal("google.co.ug"),
|
|
193
|
-
z.literal("google.co.uk"),
|
|
194
|
-
z.literal("google.com.uy"),
|
|
195
|
-
z.literal("google.co.uz"),
|
|
196
|
-
z.literal("google.com.vc"),
|
|
197
|
-
z.literal("google.co.ve"),
|
|
198
|
-
z.literal("google.vg"),
|
|
199
|
-
z.literal("google.co.vi"),
|
|
200
|
-
z.literal("google.com.vn"),
|
|
201
|
-
z.literal("google.vu"),
|
|
202
|
-
z.literal("google.ws"),
|
|
203
|
-
])
|
|
204
|
-
.describe("Parameter defines the Google domain to use. It defaults to google.com.")
|
|
205
|
-
.default("google.com"),
|
|
206
|
-
start: z
|
|
207
|
-
.number()
|
|
208
|
-
.describe("Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 10 is the 2nd page of results, 20 is the 3rd page of results, etc.).")
|
|
209
|
-
.default(0),
|
|
210
|
-
num: z
|
|
211
|
-
.number()
|
|
212
|
-
.describe("Parameter defines the maximum number of results to return. (e.g., 10 (default) returns 10 results, 40 returns 40 results, and 100 returns 100 results).")
|
|
213
|
-
.default(10),
|
|
214
|
-
ludocid: z
|
|
215
|
-
.string()
|
|
216
|
-
.describe("Parameter defines the id (CID) of the Google My Business listing you want to scrape. Also known as Google Place ID.")
|
|
217
|
-
.optional(),
|
|
218
|
-
kgmid: z
|
|
219
|
-
.string()
|
|
220
|
-
.describe("Parameter defines the id (KGMID) of the Google Knowledge Graph listing you want to scrape. Also known as Google Knowledge Graph ID. Searches with kgmid parameter will return results for the originally encrypted search parameters. For some searches, kgmid may override all other parameters except start, and num parameters.")
|
|
221
|
-
.optional(),
|
|
222
|
-
ibp: z
|
|
223
|
-
.string()
|
|
224
|
-
.describe("Parameter is responsible for rendering layouts and expansions for some elements (e.g., gwp;0,7 to expand searches with ludocid for expanded knowledge graph).")
|
|
225
|
-
.optional(),
|
|
226
|
-
cr: z
|
|
227
|
-
.string()
|
|
228
|
-
.describe("Parameter defines one or multiple countries to limit the search to. It uses country{two-letter upper-case country code} to specify countries and | as a delimiter. (e.g., countryFR|countryDE will only search French and German pages).")
|
|
229
|
-
.optional(),
|
|
230
|
-
lr: z
|
|
231
|
-
.string()
|
|
232
|
-
.describe("Parameter defines one or multiple languages to limit the search to. It uses lang_{two-letter language code} to specify languages and | as a delimiter. (e.g., lang_fr|lang_de will only search French and German pages).")
|
|
233
|
-
.optional(),
|
|
234
|
-
tbs: z
|
|
235
|
-
.string()
|
|
236
|
-
.describe("(to be searched) parameter defines advanced search parameters that aren't possible in the regular query field. (e.g., advanced search for patents, dates, news, videos, images, apps, or text contents).")
|
|
237
|
-
.optional(),
|
|
238
|
-
safe: z
|
|
239
|
-
.union([
|
|
240
|
-
z.literal("active").describe("Active"),
|
|
241
|
-
z.literal("off").describe("Off"),
|
|
242
|
-
])
|
|
243
|
-
.optional()
|
|
244
|
-
.describe("Parameter defines the level of filtering for adult content. It can be set to active or off, by default Google will blur explicit content."),
|
|
245
|
-
nfpr: z
|
|
246
|
-
.union([z.literal("1").describe("1"), z.literal("0").describe("0")])
|
|
247
|
-
.optional()
|
|
248
|
-
.describe("Parameter defines the exclusion of results from an auto-corrected query when the original query is spelled wrong. It can be set to 1 to exclude these results, or 0 to include them (default). Note that this parameter may not prevent Google from returning results for an auto-corrected query if no other results are available."),
|
|
249
|
-
filter: z
|
|
250
|
-
.union([
|
|
251
|
-
z.literal("1").describe("1(enable filters)"),
|
|
252
|
-
z.literal("0").describe("0(disable filters)"),
|
|
253
|
-
])
|
|
254
|
-
.optional()
|
|
255
|
-
.describe("Parameter defines if the filters for 'Similar Results' and 'Omitted Results' are on or off. It can be set to 1 (default) to enable these filters, or 0 to disable these filters."),
|
|
256
|
-
tbm: z
|
|
257
|
-
.union([
|
|
258
|
-
z.literal("isch").describe("isch - Google Images"),
|
|
259
|
-
z.literal("lcl").describe("lcl - Google Local"),
|
|
260
|
-
z.literal("nws").describe("nws - Google News"),
|
|
261
|
-
z.literal("shop").describe("shop - Google Shopping"),
|
|
262
|
-
z.literal("vid").describe("vid - Google Videos"),
|
|
263
|
-
z.literal("pts").describe("pts - Google Patents"),
|
|
264
|
-
z.literal("jobs").describe("jobs - Google Jobs"),
|
|
265
|
-
])
|
|
266
|
-
.optional()
|
|
267
|
-
.describe("(to be matched) parameter defines the type of search you want to do.\n\nIt can be set to:\n(no tbm parameter): regular Google Search,\nisch: Google Images API,\nlcl - Google Local API\nvid: Google Videos API,\nnws: Google News API,\nshop: Google Shopping API,\npts: Google Patents API,\nor any other Google service."),
|
|
268
19
|
},
|
|
269
20
|
handle: async (params, client) => {
|
|
270
|
-
return wrapMcpResponse(() =>
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
21
|
+
return wrapMcpResponse(async () => {
|
|
22
|
+
const data = await client.deepserp.scrape({
|
|
23
|
+
actor: "scraper.google.search",
|
|
24
|
+
input: params,
|
|
25
|
+
});
|
|
26
|
+
return (data?.organic_results?.map((i) => ({
|
|
27
|
+
position: i.position,
|
|
28
|
+
title: i.title,
|
|
29
|
+
link: i.link,
|
|
30
|
+
redirect_link: i.redirect_link,
|
|
31
|
+
snippet: i.snippet,
|
|
32
|
+
snippet_highlighted_words: i.snippet_highlighted_words,
|
|
33
|
+
source: i.source,
|
|
34
|
+
})) ?? []);
|
|
35
|
+
});
|
|
274
36
|
},
|
|
275
37
|
});
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
import { defineTool, wrapMcpResponse } from "../utils.js";
|
|
2
2
|
import z from "zod";
|
|
3
3
|
export const scrapeMarkdown = defineTool({
|
|
4
|
-
name:
|
|
4
|
+
name: "scrape_markdown",
|
|
5
5
|
description: `Scrape a URL and return its content as Markdown.
|
|
6
6
|
Restrictions: Best for articles, blog posts, and other text-heavy pages.
|
|
7
7
|
Valid: Scrape a news article to get its readable content.
|
|
8
8
|
Invalid: Scrape a complex web application dashboard.`,
|
|
9
9
|
inputSchema: {
|
|
10
|
-
url: z.string().url().describe(
|
|
10
|
+
url: z.string().url().describe("target URL"),
|
|
11
11
|
},
|
|
12
12
|
handle: async (params, client) => {
|
|
13
13
|
return wrapMcpResponse(() => client.universal.scrape({
|
|
14
|
-
actor:
|
|
14
|
+
actor: "unlocker.webunlocker",
|
|
15
15
|
input: {
|
|
16
16
|
url: params.url,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
redirect: true,
|
|
18
|
+
jsRender: {
|
|
19
|
+
enabled: true,
|
|
20
|
+
headless: true,
|
|
21
|
+
waitUntil: "domcontentloaded",
|
|
22
|
+
instructions: [],
|
|
23
|
+
block: { resources: [], urls: [] },
|
|
24
|
+
response: { type: "markdown", options: { selector: "" } },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
20
27
|
}));
|
|
21
|
-
}
|
|
28
|
+
},
|
|
22
29
|
});
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"keep": {
|
|
3
|
-
"days": false,
|
|
4
|
-
"amount": 5
|
|
5
|
-
},
|
|
6
|
-
"auditLog": "logs/.8929a066e1e20cab48ddbfa9c509b48984514299-audit.json",
|
|
7
|
-
"files": [
|
|
8
|
-
{
|
|
9
|
-
"date": 1758002645284,
|
|
10
|
-
"name": "logs/scrapeless-2025-09-16.log",
|
|
11
|
-
"hash": "420a4884014fec02915075dd83086ff92cbd6584fe2157bf99056d478c1ce079"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"hashType": "sha256"
|
|
15
|
-
}
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { defineTool, wrapMcpResponse } from "../utils.js";
|
|
2
|
-
import z from "zod";
|
|
3
|
-
export const googleFlights = defineTool({
|
|
4
|
-
name: "google_flights",
|
|
5
|
-
description: `Exclusive Flight Information Query Tool.
|
|
6
|
-
Activated only when requests include departure city, arrival city, and specific date/date range.
|
|
7
|
-
Valid:Check flights from Beijing to Shanghai on July 15.
|
|
8
|
-
Invalid:Compare airline service quality (use google_search instead)`,
|
|
9
|
-
inputSchema: {
|
|
10
|
-
gl: z
|
|
11
|
-
.string()
|
|
12
|
-
.describe("Parameter defines the country to use for the Google search. It's a two-letter country code. (e.g., us for the United States, uk for United Kingdom, or fr for France).")
|
|
13
|
-
.default("us"),
|
|
14
|
-
hl: z
|
|
15
|
-
.string()
|
|
16
|
-
.describe("Parameter defines the language to use for the Google search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French).")
|
|
17
|
-
.default("en"),
|
|
18
|
-
currency: z
|
|
19
|
-
.union([
|
|
20
|
-
z.literal("ALL"),
|
|
21
|
-
z.literal("DZD"),
|
|
22
|
-
z.literal("ARS"),
|
|
23
|
-
z.literal("AMD"),
|
|
24
|
-
z.literal("AWG"),
|
|
25
|
-
z.literal("AUD"),
|
|
26
|
-
z.literal("AZN"),
|
|
27
|
-
z.literal("BSD"),
|
|
28
|
-
z.literal("BHD"),
|
|
29
|
-
z.literal("BYN"),
|
|
30
|
-
z.literal("BMD"),
|
|
31
|
-
z.literal("BAM"),
|
|
32
|
-
z.literal("BRL"),
|
|
33
|
-
z.literal("GBP"),
|
|
34
|
-
z.literal("BGN"),
|
|
35
|
-
z.literal("XPF"),
|
|
36
|
-
z.literal("CAD"),
|
|
37
|
-
z.literal("CLP"),
|
|
38
|
-
z.literal("CNY"),
|
|
39
|
-
z.literal("COP"),
|
|
40
|
-
z.literal("CRC"),
|
|
41
|
-
z.literal("CUP"),
|
|
42
|
-
z.literal("CZK"),
|
|
43
|
-
z.literal("DKK"),
|
|
44
|
-
z.literal("DOP"),
|
|
45
|
-
z.literal("EGP"),
|
|
46
|
-
z.literal("EUR"),
|
|
47
|
-
z.literal("GEL"),
|
|
48
|
-
z.literal("HKD"),
|
|
49
|
-
z.literal("HUF"),
|
|
50
|
-
z.literal("ISK"),
|
|
51
|
-
z.literal("INR"),
|
|
52
|
-
z.literal("IDR"),
|
|
53
|
-
z.literal("IRR"),
|
|
54
|
-
z.literal("ILS"),
|
|
55
|
-
z.literal("JMD"),
|
|
56
|
-
z.literal("JPY"),
|
|
57
|
-
z.literal("JOD"),
|
|
58
|
-
z.literal("KZT"),
|
|
59
|
-
z.literal("KWD"),
|
|
60
|
-
z.literal("LBP"),
|
|
61
|
-
z.literal("MKD"),
|
|
62
|
-
z.literal("MYR"),
|
|
63
|
-
z.literal("MXN"),
|
|
64
|
-
z.literal("MDL"),
|
|
65
|
-
z.literal("MAD"),
|
|
66
|
-
z.literal("TWD"),
|
|
67
|
-
z.literal("NZD"),
|
|
68
|
-
z.literal("NOK"),
|
|
69
|
-
z.literal("OMR"),
|
|
70
|
-
z.literal("PKR"),
|
|
71
|
-
z.literal("PAB"),
|
|
72
|
-
z.literal("PEN"),
|
|
73
|
-
z.literal("PHP"),
|
|
74
|
-
z.literal("PLN"),
|
|
75
|
-
z.literal("QAR"),
|
|
76
|
-
z.literal("RON"),
|
|
77
|
-
z.literal("RUB"),
|
|
78
|
-
z.literal("SAR"),
|
|
79
|
-
z.literal("RSD"),
|
|
80
|
-
z.literal("SGD"),
|
|
81
|
-
z.literal("ZAR"),
|
|
82
|
-
z.literal("KRW"),
|
|
83
|
-
z.literal("SEK"),
|
|
84
|
-
z.literal("CHF"),
|
|
85
|
-
z.literal("THB"),
|
|
86
|
-
z.literal("TRY"),
|
|
87
|
-
z.literal("USD"),
|
|
88
|
-
z.literal("UAH"),
|
|
89
|
-
z.literal("AED"),
|
|
90
|
-
z.literal("VND"),
|
|
91
|
-
])
|
|
92
|
-
.describe("Parameter defines the currency of the returned prices. Default to USD.")
|
|
93
|
-
.optional(),
|
|
94
|
-
departure_id: z
|
|
95
|
-
.string()
|
|
96
|
-
.describe("Departure airport code or location kgmid. An airport code is an uppercase 3-letter code. You can search for it on Google Flights or IATA. For example, CDG is Paris Charles de Gaulle Airport, /m/0vzm is the location kgmid for Austin.You can specify multiple departure airports by separating them with a comma. For example, CDG,ORY,/m/04jpl.")
|
|
97
|
-
.default("ORY"),
|
|
98
|
-
arrival_id: z
|
|
99
|
-
.string()
|
|
100
|
-
.describe("An airport code is an uppercase 3-letter code. You can search for it on Google Flights or IATA.")
|
|
101
|
-
.default("BCN"),
|
|
102
|
-
data_type: z
|
|
103
|
-
.number()
|
|
104
|
-
.describe("Parameter defines the type of the flights.\nAvailable options:\n1 - Round trip (default)\n2 - One way\n3 - Multi-city\n\nWhen this parameter is set to 3, use multi_city_json to set the flight information.\n\nTo obtain the returning flight information for Round Trip (1), you need to make another request using a departure_token.")
|
|
105
|
-
.default(1),
|
|
106
|
-
travel_class: z
|
|
107
|
-
.union([
|
|
108
|
-
z.literal(1).describe("Economy(default) - 1"),
|
|
109
|
-
z.literal(2).describe("Premium economy - 2"),
|
|
110
|
-
z.literal(3).describe("Business - 3"),
|
|
111
|
-
z.literal(4).describe("First - 4"),
|
|
112
|
-
])
|
|
113
|
-
.describe("Parameter defines the travel class.\nAvailable options:\n1 - Economy (default)\n2 - Premium economy\n3 - Business\n4 - First")
|
|
114
|
-
.default(1),
|
|
115
|
-
multi_city_json: z
|
|
116
|
-
.any()
|
|
117
|
-
.describe("Parameter defines the flight information for multi-city flights. It's a JSON string containing multiple flight information objects. Each object should contain the following fields: departure_id, arrival_id, date, times (optional). See schema for details.")
|
|
118
|
-
.optional(),
|
|
119
|
-
adults: z
|
|
120
|
-
.number()
|
|
121
|
-
.describe("Parameter defines the number of adults. Default to 1.")
|
|
122
|
-
.default(1),
|
|
123
|
-
children: z
|
|
124
|
-
.number()
|
|
125
|
-
.describe("Parameter defines the number of children. Default to 0.")
|
|
126
|
-
.default(0),
|
|
127
|
-
infants_in_seat: z
|
|
128
|
-
.number()
|
|
129
|
-
.describe("Parameter defines the number of infants in seat. Default to 0.")
|
|
130
|
-
.default(0),
|
|
131
|
-
infants_on_lap: z
|
|
132
|
-
.number()
|
|
133
|
-
.describe("Parameter defines the number of infants on lap. Default to 0.")
|
|
134
|
-
.default(0),
|
|
135
|
-
outbound_date: z
|
|
136
|
-
.string()
|
|
137
|
-
.describe("Parameter defines the outbound date. The format is YYYY-MM-DD. e.g. 2025-03-09")
|
|
138
|
-
.default("next_1d"),
|
|
139
|
-
return_date: z
|
|
140
|
-
.string()
|
|
141
|
-
.describe("Parameter defines the return date. The format is YYYY-MM-DD. e.g. 2025-03-15\n\nParameter is required if type parameter is set to: 1 (Round trip)")
|
|
142
|
-
.default("next_1w"),
|
|
143
|
-
stops: z
|
|
144
|
-
.union([
|
|
145
|
-
z.literal(0).describe("Any number of stops (default) - 0"),
|
|
146
|
-
z.literal(1).describe("Nonstop only - 1"),
|
|
147
|
-
z.literal(2).describe("1 stop or fewer - 2"),
|
|
148
|
-
z.literal(3).describe("2 stops or fewer - 3"),
|
|
149
|
-
])
|
|
150
|
-
.describe("Parameter defines the number of stops during the flight.\nAvailable options:\n0 - Any number of stops (default)\n1 - Nonstop only\n2 - 1 stop or fewer\n3 - 2 stops or fewer")
|
|
151
|
-
.default(0),
|
|
152
|
-
include_airlines: z
|
|
153
|
-
.string()
|
|
154
|
-
.describe("Parameter defines the airline codes to be included. Split multiple airlines with comma. It can't be used together with exclude_airlines. Each airline code should be a 2-character IATA code consisting of either two uppercase letters or one uppercase letter and one digit. Alliances can also be included. See schema for details.")
|
|
155
|
-
.optional()
|
|
156
|
-
.optional(),
|
|
157
|
-
bags: z
|
|
158
|
-
.number()
|
|
159
|
-
.describe("Parameter defines the number of carry-on bags. Default to 0.")
|
|
160
|
-
.default(0),
|
|
161
|
-
max_price: z
|
|
162
|
-
.number()
|
|
163
|
-
.describe("Parameter defines the maximum ticket price. Default to unlimited.")
|
|
164
|
-
.default(0),
|
|
165
|
-
outbound_times: z
|
|
166
|
-
.string()
|
|
167
|
-
.describe("Parameter defines the outbound times range. See schema for details.")
|
|
168
|
-
.optional()
|
|
169
|
-
.optional(),
|
|
170
|
-
return_times: z
|
|
171
|
-
.string()
|
|
172
|
-
.describe("Parameter defines the return times range. See schema for details.")
|
|
173
|
-
.optional()
|
|
174
|
-
.optional(),
|
|
175
|
-
emissions: z
|
|
176
|
-
.union([
|
|
177
|
-
z.literal(0).describe("reset"),
|
|
178
|
-
z.literal(1).describe("Less emissions only - ·"),
|
|
179
|
-
])
|
|
180
|
-
.describe("Parameter defines the emission level of the flight.\nAvailable options:\n1 - Less emissions only")
|
|
181
|
-
.default(0),
|
|
182
|
-
layover_duration: z
|
|
183
|
-
.string()
|
|
184
|
-
.describe("Parameter defines the layover duration, in minutes. It's a string containing two comma-separated numbers. See schema for details.")
|
|
185
|
-
.optional()
|
|
186
|
-
.optional(),
|
|
187
|
-
exclude_conns: z
|
|
188
|
-
.string()
|
|
189
|
-
.describe("Parameter defines the connecting airport codes to be excluded. See schema for details.")
|
|
190
|
-
.optional()
|
|
191
|
-
.optional(),
|
|
192
|
-
max_duration: z
|
|
193
|
-
.number()
|
|
194
|
-
.describe("Parameter defines the maximum flight duration, in minutes. For example, specify 1500 for 25 hours.")
|
|
195
|
-
.default(0)
|
|
196
|
-
.optional(),
|
|
197
|
-
departure_token: z
|
|
198
|
-
.string()
|
|
199
|
-
.describe("Parameter is used to select the flight and get returning flights (for Round trip) or flights for the next leg of itinerary (for Multi-city). Find this token in the departure flight results.")
|
|
200
|
-
.optional()
|
|
201
|
-
.optional(),
|
|
202
|
-
},
|
|
203
|
-
handle: async (params, client) => {
|
|
204
|
-
return wrapMcpResponse(() => client.deepserp.scrape({
|
|
205
|
-
actor: "scraper.google.flights",
|
|
206
|
-
input: params,
|
|
207
|
-
}));
|
|
208
|
-
},
|
|
209
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { defineTool, wrapMcpResponse } from "../utils.js";
|
|
2
|
-
import z from "zod";
|
|
3
|
-
export const googleScholar = defineTool({
|
|
4
|
-
name: 'google_scholar',
|
|
5
|
-
description: `Search for academic papers on Google Scholar.
|
|
6
|
-
Restrictions: Activated only for academic or scientific research queries.
|
|
7
|
-
Valid: Find papers by "Yoshua Bengio" on deep learning.
|
|
8
|
-
Invalid: Search for news articles about "Yoshua Bengio" (use google_search).`,
|
|
9
|
-
inputSchema: {
|
|
10
|
-
q: z
|
|
11
|
-
.string()
|
|
12
|
-
.describe('Parameter defines the query you want to search. You can also use helpers in your query such as: author:, or source:. Usage of cites parameter makes q optional. Usage of cites together with q triggers search within citing articles. Usage of cluster together with q and cites parameters is prohibited. Use cluster parameter only.')
|
|
13
|
-
.default('Coffee'),
|
|
14
|
-
cites: z
|
|
15
|
-
.string()
|
|
16
|
-
.describe('Parameter defines unique ID for an article to trigger Cited By searches. Usage of cites will bring up a list of citing documents in Google Scholar. Example value: cites=1275980731835430123. Usage of cites and q parameters triggers search within citing articles.')
|
|
17
|
-
.optional(),
|
|
18
|
-
as_ylo: z
|
|
19
|
-
.string()
|
|
20
|
-
.describe('Parameter defines the year from which you want the results to be included. (e.g. if you set as_ylo parameter to the year 2018, the results before that year will be omitted.). This parameter can be combined with the as_yhi parameter.')
|
|
21
|
-
.optional(),
|
|
22
|
-
as_yhi: z
|
|
23
|
-
.string()
|
|
24
|
-
.describe('Parameter defines the year until which you want the results to be included. (e.g. if you set as_yhi parameter to the year 2018, the results after that year will be omitted.). This parameter can be combined with the as_ylo parameter.')
|
|
25
|
-
.optional(),
|
|
26
|
-
scisbd: z
|
|
27
|
-
.string()
|
|
28
|
-
.describe('Parameter defines articles added in the last year, sorted by date. It can be set to 1 to include only abstracts, or 2 to include everything. The default value is 0 which means that the articles are sorted by relevance.')
|
|
29
|
-
.optional(),
|
|
30
|
-
cluster: z.string().describe('Versions Of').optional(),
|
|
31
|
-
hl: z.string().describe('Language').default('en'),
|
|
32
|
-
author_id: z.string().describe('Show in google.scholar result').optional(),
|
|
33
|
-
citation_id: z
|
|
34
|
-
.string()
|
|
35
|
-
.describe('Parameter is used for retrieving individual article citation. It is a required parameter when view_op=view_citation is selected. You can access IDs inside our structured JSON response.')
|
|
36
|
-
.optional(),
|
|
37
|
-
view_op: z
|
|
38
|
-
.union([
|
|
39
|
-
z.literal('view_citation').describe('View Citation'),
|
|
40
|
-
z.literal('list_colleagues').describe('View List Colleagues')
|
|
41
|
-
])
|
|
42
|
-
.describe('Parameter is used for viewing specific parts of a page. It has two options: view_citation - Select to view citations. citation_id is required. list_colleagues - Select to view all co-authors')
|
|
43
|
-
.optional(),
|
|
44
|
-
lr: z.string().describe('Set Multiple Languages').optional(),
|
|
45
|
-
start: z.string().describe('Result Offset').optional(),
|
|
46
|
-
num: z.string().describe('Number of Results').optional(),
|
|
47
|
-
as_sdt: z
|
|
48
|
-
.union([z.literal('1').describe('Abstracts'), z.literal('2').describe('Everything')])
|
|
49
|
-
.describe('Search Type / Filter')
|
|
50
|
-
.optional(),
|
|
51
|
-
safe: z
|
|
52
|
-
.union([z.literal('active').describe('Active'), z.literal('off').describe('Off')])
|
|
53
|
-
.describe('Adult Content Filtering')
|
|
54
|
-
.optional(),
|
|
55
|
-
filter: z
|
|
56
|
-
.union([z.literal('1').describe('On'), z.literal('0').describe('Off')])
|
|
57
|
-
.describe('Results Filtering')
|
|
58
|
-
.optional(),
|
|
59
|
-
as_vis: z
|
|
60
|
-
.union([z.literal('1').describe('On'), z.literal('0').describe('Off')])
|
|
61
|
-
.describe('Show Citations')
|
|
62
|
-
.optional(),
|
|
63
|
-
as_rr: z
|
|
64
|
-
.union([z.literal('1').describe('On'), z.literal('0').describe('Off')])
|
|
65
|
-
.describe('Show Only Review Articles')
|
|
66
|
-
.optional()
|
|
67
|
-
},
|
|
68
|
-
handle: async (params, client) => {
|
|
69
|
-
return wrapMcpResponse(() => client.deepserp.scrape({
|
|
70
|
-
actor: 'scraper.google.scholar',
|
|
71
|
-
input: params
|
|
72
|
-
}));
|
|
73
|
-
}
|
|
74
|
-
});
|