@webcrawl/mcp 1.4.0 → 1.4.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/bin.js CHANGED
File without changes
package/dist/format.js CHANGED
@@ -73,6 +73,9 @@ export function formatCredits(res) {
73
73
  return bits.length ? `\n\n[credits: ${bits.join(", ")}]` : "";
74
74
  }
75
75
  export function formatScrape(res) {
76
+ if (res.success === false && str(res.error)) {
77
+ return `Error: ${str(res.error)}`;
78
+ }
76
79
  const d = isRec(res.data) ? res.data : res;
77
80
  const title = str(d.title) || (isRec(d.metadata) ? str(d.metadata.title) : "");
78
81
  const md = str(d.markdown) || str(d.content);
package/dist/server.js CHANGED
@@ -80,6 +80,10 @@ export function createWebcrawlMcpServer(client, versionOrOpts = "0.1.0") {
80
80
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
81
81
  }, ({ url, no_cache }) => run(async () => {
82
82
  const res = await client.scrape({ url, formats: ["markdown"], noCache: no_cache });
83
+ // Blocked pages: surface as a tool error (isError) instead of empty content.
84
+ if (res.success === false && typeof res.error === "string") {
85
+ throw new Error(formatScrape(res) + formatCredits(res));
86
+ }
83
87
  return formatScrape(res) + formatCredits(res);
84
88
  }));
85
89
  server.registerTool("web_parse", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webcrawl/mcp",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "mcpName": "io.github.brainfish-ai/webcrawl",
5
5
  "description": "MCP server for Webcrawl Anything: search, scrape, map, crawl, parse and monitor the web from your agent. Runs locally with no API key, or on webcrawl.app cloud.",
6
6
  "type": "module",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@modelcontextprotocol/sdk": "^1.32.2",
56
- "@webcrawl/client": "^1.4.0",
56
+ "@webcrawl/client": "^1.4.2",
57
57
  "zod": "^4.0.0"
58
58
  },
59
59
  "engines": {