@zenrows/mcp 1.1.4 → 1.1.5

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.
Files changed (2) hide show
  1. package/dist/server.js +55 -0
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -200,5 +200,60 @@ Examples:
200
200
  content: [{ type: "text", text: new TextDecoder().decode(buffer) }],
201
201
  };
202
202
  });
203
+ // ─── prompts ───────────────────────────────────────────────────────────────
204
+ server.registerPrompt("scrape_and_summarize", {
205
+ title: "Scrape and Summarize",
206
+ description: "Scrape a webpage and return a concise summary of its content.",
207
+ argsSchema: {
208
+ url: z.string().url().describe("The webpage URL to scrape and summarize"),
209
+ },
210
+ }, ({ url }) => ({
211
+ messages: [
212
+ {
213
+ role: "user",
214
+ content: {
215
+ type: "text",
216
+ text: `Scrape ${url} using the ZenRows MCP scrape tool and provide a concise summary of the main content. Include key points, headings, and any important data found on the page.`,
217
+ },
218
+ },
219
+ ],
220
+ }));
221
+ server.registerPrompt("extract_structured_data", {
222
+ title: "Extract Structured Data",
223
+ description: "Scrape a webpage and extract specific structured data using CSS selectors.",
224
+ argsSchema: {
225
+ url: z.string().url().describe("The webpage URL to extract data from"),
226
+ fields: z
227
+ .string()
228
+ .describe('JSON object mapping field names to CSS selectors, e.g. \'{"title":"h1","price":".price"}\''),
229
+ },
230
+ }, ({ url, fields }) => ({
231
+ messages: [
232
+ {
233
+ role: "user",
234
+ content: {
235
+ type: "text",
236
+ text: `Scrape ${url} using the ZenRows MCP scrape tool with css_extractor set to ${fields}. Return the extracted data as a clean JSON object.`,
237
+ },
238
+ },
239
+ ],
240
+ }));
241
+ server.registerPrompt("scrape_js_page", {
242
+ title: "Scrape JavaScript-Rendered Page",
243
+ description: "Scrape a page that requires JavaScript rendering (React, Vue, Angular, or any SPA).",
244
+ argsSchema: {
245
+ url: z.string().url().describe("The JavaScript-rendered page URL to scrape"),
246
+ },
247
+ }, ({ url }) => ({
248
+ messages: [
249
+ {
250
+ role: "user",
251
+ content: {
252
+ type: "text",
253
+ text: `Scrape ${url} using the ZenRows MCP scrape tool with js_render set to true. The page requires JavaScript execution to load its content. Return the full rendered content in markdown format.`,
254
+ },
255
+ },
256
+ ],
257
+ }));
203
258
  return server;
204
259
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenrows/mcp",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "ZenRows MCP server — Universal Scraper API for AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {