@crawlbrulee/mcp 0.6.0 → 0.7.0

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 (3) hide show
  1. package/README.md +21 -20
  2. package/dist/index.js +12 -10
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -13,7 +13,7 @@ the official [mcp](https://modelcontextprotocol.io) server for the [crawlbrulee]
13
13
  this readme covers the mcp server itself — its tools and how to wire it into a host. for how the api behaves — endpoints, parameters, and error semantics — please see our
14
14
  [api docs](https://crawlbrulee.com/docs).
15
15
 
16
- > **status:** v0.5.0 (beta). tool surface is stabilizing — expect minor changes between 0.x releases.
16
+ > **status:** v0.7.0 (beta). tool surface is stabilizing — expect minor changes between 0.x releases.
17
17
 
18
18
  **get a free api key** → [dashboard.crawlbrulee.com](https://dashboard.crawlbrulee.com)
19
19
 
@@ -81,7 +81,7 @@ html, raw html, links, images, screenshot, page metadata).
81
81
  }
82
82
  ```
83
83
 
84
- **output** — full scrape result. page metadata (title, OG tags, etc.) is returned under `metadata`. extracted `images` are returned as absolute urls — query strings are preserved, and relative `src`s are resolved against the page url. screenshots are returned as signed download urls the agent can fetch separately; in rare cases a screenshot can't be captured, and when that happens the `screenshot` field is simply left out while the rest of your requested outputs are still returned. the result also carries a top-level `response_meta.usage` block:
84
+ **output** — full scrape result. page metadata (title, OG tags, etc.) is returned under `metadata`. extracted `images` are returned as absolute urls — query strings are preserved, and relative `src`s are resolved against the page url. screenshots are returned as signed download urls the agent can fetch separately. in rare cases a screenshot can't be captured: when you requested other outputs too, the `screenshot` field is simply left out while the rest is still returned — but a screenshot-only call that can't deliver errors instead (`unsupported_screenshot_output`, HTTP 422, when the content type can't be screenshotted) and isn't billed. the result also carries a top-level `response_meta.usage` block:
85
85
 
86
86
  ```jsonc
87
87
  {
@@ -90,7 +90,7 @@ html, raw html, links, images, screenshot, page metadata).
90
90
  "metadata": { "title": "Example Domain" },
91
91
  "response_meta": {
92
92
  "usage": {
93
- "credits": 1, // credits charged — 0 on a cache hit
93
+ "credits": 1, // 0 on a fully cached result — only parts still computed fresh are charged
94
94
  "proxy": "basic", // resolved tier actually used: "basic" | "advanced" (never "auto")
95
95
  "cache_hit": false, // whether the result was served from cache
96
96
  },
@@ -182,23 +182,24 @@ every tool returns an mcp error envelope (`isError: true`) when the api call fai
182
182
 
183
183
  agents can branch on the `errorName` code. the set comes from the sdk's `ApiErrorName` union plus two synthetic codes added by this mcp (`missing_api_key`, `internal_error`):
184
184
 
185
- | code | meaning |
186
- | ------------------------ | ------------------------------------------------------------------------------ |
187
- | `missing_api_key` | `CRAWLBRULEE_API_KEY` is not set in the mcp host's env. |
188
- | `invalid_credentials` | server rejected the api key (revoked, wrong env, etc.). |
189
- | `too_many_requests` | rate limit hit — back off and retry. |
190
- | `usage_allocation_error` | plan credit / concurrency cap exceeded. show `usage` to user. |
191
- | `validation_error` | input failed server validation. |
192
- | `invalid_url` | target url was rejected before fetching. |
193
- | `blocked_url` | target url is on the blocklist. |
194
- | `antibot_blocked` | origin's anti-bot defenses blocked the fetch. |
195
- | `scrape_error` | origin returned an error during scraping. |
196
- | `not_found` | async job ID unknown (e.g. bad `job_id` to `scrape_status` / `scrape_result`). |
197
- | `request_timeout` | network / read timeout. safe to retry. |
198
- | `client_closed_request` | caller cancelled before completion. |
199
- | `internal_server_error` | unhandled server-side failure. |
200
- | `crawlbrulee_error` | sdk error without a typed name. |
201
- | `internal_error` | bug in this mcp — please open an issue. |
185
+ | code | meaning |
186
+ | ------------------------------- | --------------------------------------------------------------------------------------------- |
187
+ | `missing_api_key` | `CRAWLBRULEE_API_KEY` is not set in the mcp host's env. |
188
+ | `invalid_credentials` | server rejected the api key (revoked, wrong env, etc.). |
189
+ | `too_many_requests` | rate limit hit — back off and retry. |
190
+ | `usage_allocation_error` | plan credit / concurrency cap exceeded. show `usage` to user. |
191
+ | `validation_error` | input failed server validation. |
192
+ | `invalid_url` | target url was rejected before fetching. |
193
+ | `blocked_url` | target url is on the blocklist. |
194
+ | `antibot_blocked` | origin's anti-bot defenses blocked the fetch. |
195
+ | `scrape_error` | origin returned an error during scraping. |
196
+ | `unsupported_screenshot_output` | screenshot-only request on a content type that can't be screenshotted (HTTP 422). not billed. |
197
+ | `not_found` | async job ID unknown (e.g. bad `job_id` to `scrape_status` / `scrape_result`). |
198
+ | `request_timeout` | network / read timeout. safe to retry. |
199
+ | `client_closed_request` | caller cancelled before completion. |
200
+ | `internal_server_error` | unhandled server-side failure. |
201
+ | `crawlbrulee_error` | sdk error without a typed name. |
202
+ | `internal_error` | bug in this mcp — please open an issue. |
202
203
 
203
204
  the api docs carry the canonical [error reference](https://crawlbrulee.com/docs/errors) — every error name, what causes it, and how to recover.
204
205
 
package/dist/index.js CHANGED
@@ -234,12 +234,12 @@ const Schema_ApiPageInlineImgItem = z.object({
234
234
  });
235
235
  const Schema_ApiPageLink = z.object({
236
236
  text: z.string().describe("Anchor text of the link"),
237
- href: z.string().describe("The link URL as it appears on the page (absolute or relative)"),
238
- internal: z.boolean().describe("Whether the link points to the same domain")
237
+ href: z.string().describe("The link URL as written on the page, resolved to an absolute URL; verbatim otherwise (query string, fragment, and duplicates preserved)"),
238
+ internal: z.boolean().describe("Whether the link points to the same domain (www and the bare domain are equivalent; other subdomains are external)")
239
239
  });
240
240
  const API_RESOLVED_PROXY_TIER_VALUES = ["basic", "advanced"];
241
241
  const Schema_ApiUsageMeta = z.object({
242
- credits: z.number().int().nonnegative().describe("Credits charged for this request. `0` on a cache hit (no fresh fetch was billed)."),
242
+ credits: z.number().int().nonnegative().describe("Credits charged for this request. `0` on a fully cached result; only parts still computed fresh (e.g. a newly produced screenshot-slice variant) are charged."),
243
243
  proxy: z.enum(API_RESOLVED_PROXY_TIER_VALUES).describe("The proxy tier the request actually ran on (resolved value — never `auto`; `auto` is resolved server-side to `basic` or `advanced`)."),
244
244
  cache_hit: z.boolean().describe("Whether the result was served from cache (`true`) or freshly fetched (`false`).")
245
245
  });
@@ -269,7 +269,8 @@ const Schema_ApiScrapeMeta = z.object({
269
269
  favicon_url: z.string().nullish().describe("Resolved favicon URL for the page (best-effort, from <head> icon hints + manifest)")
270
270
  });
271
271
  const Schema_ApiScrapeSuccessResponse = z.object({
272
- url: z.string().describe("The URL that was scraped (after any redirects)"),
272
+ url: z.string().describe("The URL that was actually scraped, after any redirects, in cleaned canonical form (tracking params and fragment removed) — the base that links, images, and internal labels are computed against"),
273
+ requested_url: z.string().describe("The URL you requested, echoed verbatim — before any redirects"),
273
274
  content_type: z.string().optional().describe("Content-Type header returned by the server"),
274
275
  unsupported_fields: z.array(z.string()).optional().describe("Extract fields that were requested but are not supported for this content type"),
275
276
  markdown: z.string().optional().describe("Page content converted to clean Markdown"),
@@ -280,7 +281,7 @@ const Schema_ApiScrapeSuccessResponse = z.object({
280
281
  screenshot: Schema_ApiScreenshotResponse.optional().describe("Screenshot of the page, if requested"),
281
282
  metadata: Schema_ApiScrapeMeta.optional().describe("Extracted page metadata (title, OG tags, etc.)"),
282
283
  warnings: z.array(z.string()).optional().describe("Non-error notices about the scrape (e.g. `screenshot_truncated` when a long page exceeded the scrolling-screenshot height cap). Stable string codes — clients can switch on them. Currently surfaced only on fresh scrapes; cache hits omit warnings."),
283
- response_meta: Schema_ApiResponseMeta.describe("Request-level metadata. `response_meta.usage` reports credits charged (0 on a cache hit), the resolved proxy tier, and the cache-hit flag.")
284
+ response_meta: Schema_ApiResponseMeta.describe("Request-level metadata. `response_meta.usage` reports credits charged (0 on a fully cached result; only parts still computed fresh are charged), the resolved proxy tier, and the cache-hit flag.")
284
285
  });
285
286
 
286
287
  //#endregion
@@ -304,7 +305,7 @@ const Schema_ApiMapResult = z.object({
304
305
  response_meta: z.object({
305
306
  pagination: Schema_ApiMapPagination.describe("Pagination details for the result set"),
306
307
  truncation: Schema_ApiMapTruncation.describe("Information about whether the results were truncated"),
307
- usage: Schema_ApiUsageMeta.describe("Usage accounting for this map request: credits charged (0 on a cache hit), the resolved proxy tier, and the cache-hit flag.")
308
+ usage: Schema_ApiUsageMeta.describe("Usage accounting for this map request: credits charged (0 on a fully cached result; only parts still computed fresh are charged), the resolved proxy tier, and the cache-hit flag.")
308
309
  }).describe("Response metadata including pagination, truncation, and usage info")
309
310
  });
310
311
 
@@ -331,8 +332,9 @@ const DESCRIPTION$5 = [
331
332
  "(markdown, cleaned HTML, raw HTML, links, images, screenshot, page metadata in `metadata`).",
332
333
  "Use this for one-shot page extraction. For full-site discovery use the `map` tool first.",
333
334
  "Screenshot URLs in the response are signed download links — the agent can fetch them when needed.",
334
- "The response also carries `response_meta.usage` = { credits (0 on a cache hit), proxy (the resolved",
335
- "tier — never `auto`), cache_hit } so you can see what the request cost."
335
+ "The response also carries `response_meta.usage` = { credits (0 on a fully cached result; only",
336
+ "parts still computed fresh are charged), proxy (the resolved tier — never `auto`), cache_hit }",
337
+ "so you can see what the request cost."
336
338
  ].join(" ");
337
339
  function registerScrapeTool(server, getClient) {
338
340
  server.registerTool("scrape", {
@@ -366,7 +368,7 @@ const Schema_ApiScrapeStatusResponse = z.object({
366
368
  status: z.enum(ASYNC_JOB_STATUS_VALUES).describe("Current state of the job (pending, running, done, failed)"),
367
369
  created_at: z.string().describe("ISO-8601 UTC timestamp when the job was created"),
368
370
  error: z.string().optional().describe("Error message if the job ended in `failed`"),
369
- response_meta: Schema_ApiResponseMeta.optional().describe("Usage accounting for the finished job. Present only once the job is `done`; `response_meta.usage` reports credits charged (0 on a cache hit), the resolved proxy tier, and the cache-hit flag.")
371
+ response_meta: Schema_ApiResponseMeta.optional().describe("Usage accounting for the finished job. Present only once the job is `done`; `response_meta.usage` reports credits charged (0 on a fully cached result; only parts still computed fresh are charged), the resolved proxy tier, and the cache-hit flag.")
370
372
  });
371
373
 
372
374
  //#endregion
@@ -482,7 +484,7 @@ function registerWhoamiTool(server, getClient) {
482
484
  //#endregion
483
485
  //#region src/version.ts
484
486
  const SERVER_NAME = "crawlbrulee";
485
- const SERVER_VERSION = "0.5.0";
487
+ const SERVER_VERSION = "0.7.0";
486
488
 
487
489
  //#endregion
488
490
  //#region src/server.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlbrulee/mcp",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Official MCP server for the crawlbrulee API — scrape and map URLs from MCP-aware agents (Claude Code, Codex, Cursor).",
5
5
  "keywords": [
6
6
  "crawlbrulee",
@@ -55,7 +55,7 @@
55
55
  "prepublishOnly": "pnpm verify"
56
56
  },
57
57
  "dependencies": {
58
- "@crawlbrulee/sdk": "^0.7.0",
58
+ "@crawlbrulee/sdk": "^0.9.0",
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
60
  "zod": "^4.0.0"
61
61
  },