@crawlbrulee/mcp 0.3.0 โ†’ 0.5.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 +86 -61
  2. package/dist/index.js +22 -17
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,22 +1,30 @@
1
- # ๐Ÿฎ crawlbrulee MCP
1
+ # ๐Ÿฎ crawlbrulee mcp
2
2
 
3
- The official [Model Context Protocol](https://modelcontextprotocol.io) server for the [crawlbrulee](https://crawlbrulee.com) web-scraping API. Lets MCP-aware AI agents โ€” Claude Code, Codex, Cursor, Claude Desktop โ€” scrape pages, map sites, and check their crawlbrulee usage as native tool calls.
3
+ [![npm](https://img.shields.io/npm/v/@crawlbrulee/mcp?style=flat-square&label=npm)](https://www.npmjs.com/package/@crawlbrulee/mcp)
4
+ [![license](https://img.shields.io/npm/l/@crawlbrulee/mcp?style=flat-square&label=license)](./LICENSE)
5
+
6
+ the official [mcp](https://modelcontextprotocol.io) server for the [crawlbrulee](https://crawlbrulee.com) web-scraping api. lets mcp-aware ai agents โ€” Claude Code, Codex, Cursor, Claude Desktop โ€” scrape pages, map sites, and check their crawlbrulee usage as native tool calls.
4
7
 
5
8
  - `npx`-runnable โ€” zero install.
6
- - Wraps the [`@crawlbrulee/sdk`](https://www.npmjs.com/package/@crawlbrulee/sdk) under the hood; this MCP is just a thin protocol adapter.
7
- - Stdio transport for terminal-based agents.
8
- - Strict, fully-described tool schemas โ€” agents see what every parameter does without reading docs.
9
+ - wraps the [`@crawlbrulee/sdk`](https://www.npmjs.com/package/@crawlbrulee/sdk) under the hood; this mcp is just a thin protocol adapter.
10
+ - stdio transport for terminal-based agents.
11
+ - strict, fully-described tool schemas โ€” agents see what every parameter does without reading docs.
12
+
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
+ [api docs](https://crawlbrulee.com/docs).
15
+
16
+ > **status:** v0.5.0 (beta). tool surface is stabilizing โ€” expect minor changes between 0.x releases.
9
17
 
10
- > **Status:** v0.3.0 (beta). Tool surface is stabilizing โ€” expect minor changes between 0.x releases.
18
+ **get a free api key** โ†’ [dashboard.crawlbrulee.com](https://dashboard.crawlbrulee.com)
11
19
 
12
20
  ---
13
21
 
14
- ## Install
22
+ ## install
15
23
 
16
24
  ```bash
17
25
  # Claude Code
18
26
  claude mcp add crawlbrulee \
19
- --env CRAWLBRULEE_API_KEY=cble_... \
27
+ --env CRAWLBRULEE_API_KEY=cwbl_... \
20
28
  -- npx -y @crawlbrulee/mcp
21
29
 
22
30
  # Cursor โ€” add to ~/.cursor/mcp.json:
@@ -25,36 +33,37 @@ claude mcp add crawlbrulee \
25
33
  "crawlbrulee": {
26
34
  "command": "npx",
27
35
  "args": ["-y", "@crawlbrulee/mcp"],
28
- "env": { "CRAWLBRULEE_API_KEY": "cble_..." }
36
+ "env": { "CRAWLBRULEE_API_KEY": "cwbl_..." }
29
37
  }
30
38
  }
31
39
  }
32
40
  ```
33
41
 
34
- The same pattern works for Codex, Claude Desktop, and any other host that
35
- accepts a stdio MCP launch command โ€” set `command: npx`, `args: ["-y",
42
+ the same pattern works for Codex, Claude Desktop, and any other host that
43
+ accepts a stdio mcp launch command โ€” set `command: npx`, `args: ["-y",
36
44
  "@crawlbrulee/mcp"]`, and forward `CRAWLBRULEE_API_KEY` via the env block.
37
45
 
38
- ## Configuration
46
+ ## configuration
39
47
 
40
- | Env var | Required | Description |
48
+ | env var | required | description |
41
49
  | --------------------- | -------- | ------------------------------------------------------------------------------ |
42
- | `CRAWLBRULEE_API_KEY` | yes | API key sent as `Authorization: Bearer โ€ฆ`. Get one at https://crawlbrulee.com. |
50
+ | `CRAWLBRULEE_API_KEY` | yes | api key sent as `Authorization: Bearer โ€ฆ`. get one at https://crawlbrulee.com. |
43
51
 
44
- The MCP reads the env var on first tool invocation โ€” not at startup โ€” so a
52
+ the mcp reads the env var on first tool invocation โ€” not at startup โ€” so a
45
53
  typo in your config surfaces as a clear tool-error message rather than the
46
- server failing to come up.
54
+ server failing to come up. see
55
+ [authentication](https://crawlbrulee.com/docs/authentication) for how the api consumes keys.
47
56
 
48
57
  ---
49
58
 
50
- ## Tools
59
+ ## tools
51
60
 
52
61
  ### `scrape`
53
62
 
54
- Fetch a single URL and return the requested content (markdown, cleaned
55
- HTML, raw HTML, links, images, screenshot, page metadata).
63
+ fetch a single url and return the requested content (markdown, cleaned
64
+ html, raw html, links, images, screenshot, page metadata).
56
65
 
57
- **Input** โ€” only `url` is required; everything else has sane defaults.
66
+ **input** โ€” only `url` is required; everything else has sane defaults.
58
67
 
59
68
  ```jsonc
60
69
  {
@@ -72,7 +81,7 @@ HTML, raw HTML, links, images, screenshot, page metadata).
72
81
  }
73
82
  ```
74
83
 
75
- **Output** โ€” full scrape result. Page metadata (title, OG tags, etc.) is returned under `metadata`. Screenshots are returned as signed download URLs the agent can fetch separately. 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, 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:
76
85
 
77
86
  ```jsonc
78
87
  {
@@ -82,18 +91,22 @@ HTML, raw HTML, links, images, screenshot, page metadata).
82
91
  "response_meta": {
83
92
  "usage": {
84
93
  "credits": 1, // credits charged โ€” 0 on a cache hit
85
- "proxy": "basic", // resolved tier actually used: "none" | "basic" | "advanced" (never "auto")
94
+ "proxy": "basic", // resolved tier actually used: "basic" | "advanced" (never "auto")
86
95
  "cache_hit": false, // whether the result was served from cache
87
96
  },
88
97
  },
89
98
  }
90
99
  ```
91
100
 
101
+ alongside `response_meta.usage`, the result surfaces any non-fatal `warnings` (stable codes like `screenshot_truncated`) and, if you requested an extract that doesn't apply to the content type (e.g. `markdown` of a pdf), an `unsupported_fields` list โ€” with the rest of the payload still returned.
102
+
103
+ every input field, its default, and its constraints are documented under the [scrape endpoint](https://crawlbrulee.com/docs/scrape) โ€” with [extraction](https://crawlbrulee.com/docs/scrape/extraction), [screenshots](https://crawlbrulee.com/docs/scrape/screenshots), [proxies & location](https://crawlbrulee.com/docs/proxies), and [caching](https://crawlbrulee.com/docs/scrape/caching) covering the individual blocks.
104
+
92
105
  ### `scrape_async`
93
106
 
94
- Submit a scrape job to run **asynchronously** and get back a `job_id` immediately, instead of holding the connection open. Use this for long-running scrapes (heavy JS rendering, full-page screenshots of long pages); for a quick one-shot fetch prefer the synchronous `scrape` tool. Then poll `scrape_status` until the job is `done` and fetch the page with `scrape_result`.
107
+ submit a scrape job to run **asynchronously** and get back a `job_id` immediately, instead of holding the connection open. use this for long-running scrapes (heavy js rendering, full-page screenshots of long pages); for a quick one-shot fetch prefer the synchronous `scrape` tool. then poll `scrape_status` until the job is `done` and fetch the page with `scrape_result`.
95
108
 
96
- Takes the same input as `scrape` plus an optional per-job completion `webhook`:
109
+ takes the same input as `scrape` plus an optional per-job completion `webhook`:
97
110
 
98
111
  ```jsonc
99
112
  {
@@ -110,13 +123,15 @@ Takes the same input as `scrape` plus an optional per-job completion `webhook`:
110
123
  }
111
124
  ```
112
125
 
113
- **Output** โ€” `{ "job_id": "..." }`.
126
+ **output** โ€” `{ "job_id": "..." }`.
114
127
 
115
- When a `webhook` is attached, crawlbrulee delivers a single signed `scrape.complete` POST to your endpoint once the job reaches a terminal state, with your `metadata` echoed under `data.metadata` and the job's usage under `data.response_meta.usage` โ€” so you can react to completion (and reconcile cost) without polling. Verify the `X-Cwbl-Signature` header with the SDK's `verifyWebhookSignature` (configure the signing secret in the dashboard under Account โ†’ Webhooks).
128
+ when a `webhook` is attached, we deliver a single signed `scrape.complete` POST to your endpoint once the job reaches a terminal state, with your `metadata` echoed under `data.metadata` and the job's usage under `data.response_meta.usage` โ€” so you can react to completion (and reconcile cost) without polling. verify the `X-Cwbl-Signature` header with the sdk's `verifyWebhookSignature` (configure the signing secret in the dashboard under account โ†’ webhooks).
129
+
130
+ the job lifecycle is documented under [async scrape](https://crawlbrulee.com/docs/scrape/async); the delivery contract and payload shape under [webhooks](https://crawlbrulee.com/docs/scrape/webhooks), with the signature scheme in [webhook verification](https://crawlbrulee.com/docs/webhook-verification).
116
131
 
117
132
  ### `scrape_status`
118
133
 
119
- Look up the current lifecycle status of an async job: `pending`, `running`, `done`, or `failed` (with an `error` message when failed). Once the job is `done` the response also carries a `response_meta.usage` block (`credits`, resolved `proxy` tier, `cache_hit`). Poll until `done`, then call `scrape_result`.
134
+ look up the current lifecycle status of an async job: `pending`, `running`, `done`, or `failed` (with an `error` message when failed). once the job is `done` the response also carries a `response_meta.usage` block (`credits`, resolved `proxy` tier, `cache_hit`). poll until `done`, then call `scrape_result`.
120
135
 
121
136
  ```jsonc
122
137
  { "job_id": "..." }
@@ -124,7 +139,7 @@ Look up the current lifecycle status of an async job: `pending`, `running`, `don
124
139
 
125
140
  ### `scrape_result`
126
141
 
127
- Fetch the extracted content of a completed async job โ€” the same result shape as the synchronous `scrape` tool (including `metadata` and `response_meta.usage`). Errors if the job is still `pending`/`running`, so check `scrape_status` first.
142
+ fetch the extracted content of a completed async job โ€” the same result shape as the synchronous `scrape` tool (including `metadata` and `response_meta.usage`). errors if the job is still `pending`/`running`, so check `scrape_status` first.
128
143
 
129
144
  ```jsonc
130
145
  { "job_id": "..." }
@@ -132,7 +147,7 @@ Fetch the extracted content of a completed async job โ€” the same result shape a
132
147
 
133
148
  ### `map`
134
149
 
135
- Build (or fetch a cached) link-map for a website. Combines sitemap discovery with homepage link extraction. Use this to enumerate a site before scraping selected pages. The response's `response_meta` carries `pagination`, `truncation`, and a `usage` block (`credits`, resolved `proxy` tier, `cache_hit`).
150
+ build (or fetch a cached) link-map for a website. combines sitemap discovery with homepage link extraction. use this to enumerate a site before scraping selected pages. the response's `response_meta` carries `pagination`, `truncation`, and a `usage` block (`credits`, resolved `proxy` tier, `cache_hit`).
136
151
 
137
152
  ```jsonc
138
153
  {
@@ -145,47 +160,51 @@ Build (or fetch a cached) link-map for a website. Combines sitemap discovery wit
145
160
  }
146
161
  ```
147
162
 
163
+ see the [map endpoint](https://crawlbrulee.com/docs/map) for discovery rules and pagination semantics.
164
+
148
165
  ### `usage`
149
166
 
150
- Returns the current billing-cycle snapshot: total / used / available credits, used quota percent, max concurrency, and cycle reset timestamp. Takes no arguments.
167
+ returns the current billing-cycle snapshot: total / used / available credits, used quota percent, max concurrency, and cycle reset timestamp. takes no arguments. what a call costs, and how credits are counted, is documented under [credits & pricing](https://crawlbrulee.com/docs/credits-and-pricing).
151
168
 
152
169
  ### `whoami`
153
170
 
154
- Returns the organization name, token name, and truncated token preview for the configured API key. Useful for confirming which account is in use before credit-consuming operations.
171
+ returns the organization name, token name, and truncated token preview for the configured api key. useful for confirming which account is in use before credit-consuming operations.
155
172
 
156
173
  ---
157
174
 
158
- ## Errors
175
+ ## errors
159
176
 
160
- Every tool returns an MCP error envelope (`isError: true`) when the API call fails. The error text follows a stable format:
177
+ every tool returns an mcp error envelope (`isError: true`) when the api call fails. the error text follows a stable format:
161
178
 
162
179
  ```
163
180
  [<errorName>] <message> (HTTP <status>)
164
181
  ```
165
182
 
166
- 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`):
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`):
167
184
 
168
- | Code | Meaning |
185
+ | code | meaning |
169
186
  | ------------------------ | ------------------------------------------------------------------------------ |
170
- | `missing_api_key` | `CRAWLBRULEE_API_KEY` is not set in the MCP host's env. |
171
- | `invalid_credentials` | Server rejected the API key (revoked, wrong env, etc.). |
172
- | `too_many_requests` | Rate limit hit โ€” back off and retry. |
173
- | `usage_allocation_error` | Plan credit / concurrency cap exceeded. Show `usage` to user. |
174
- | `validation_error` | Input failed server validation. |
175
- | `invalid_url` | Target URL was rejected before fetching. |
176
- | `blocked_url` | Target URL is on the blocklist. |
177
- | `antibot_blocked` | Origin's anti-bot defenses blocked the fetch. |
178
- | `scrape_error` | Origin returned an error during scraping. |
179
- | `not_found` | Async job ID unknown (e.g. bad `job_id` to `scrape_status` / `scrape_result`). |
180
- | `request_timeout` | Network / read timeout. Safe to retry. |
181
- | `client_closed_request` | Caller cancelled before completion. |
182
- | `internal_server_error` | Unhandled server-side failure. |
183
- | `crawlbrulee_error` | SDK error without a typed name. |
184
- | `internal_error` | Bug in this MCP โ€” please open an issue. |
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. |
202
+
203
+ the api docs carry the canonical [error reference](https://crawlbrulee.com/docs/errors) โ€” every error name, what causes it, and how to recover.
185
204
 
186
205
  ---
187
206
 
188
- ## Development
207
+ ## development
189
208
 
190
209
  ```bash
191
210
  pnpm install
@@ -196,24 +215,30 @@ pnpm build # tsup โ†’ dist/index.js with shebang
196
215
  pnpm verify # all of the above
197
216
  ```
198
217
 
199
- Run the built MCP locally:
218
+ run the built mcp locally:
200
219
 
201
220
  ```bash
202
- CRAWLBRULEE_API_KEY=cble_... node ./dist/index.js
221
+ CRAWLBRULEE_API_KEY=cwbl_... node ./dist/index.js
203
222
  ```
204
223
 
205
- It will block waiting for an MCP client on stdio. Combine with the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for interactive debugging.
224
+ it will block waiting for an mcp client on stdio. combine with the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for interactive debugging.
225
+
226
+ ## docs
227
+
228
+ this readme covers the mcp server itself โ€” installing it, wiring it into a host, and the tools it exposes. for how the api behaves โ€” endpoints, parameters, and error semantics โ€” the [api docs](https://crawlbrulee.com/docs) are canonical. the [mcp guide](https://crawlbrulee.com/docs/mcp) covers host setup in more depth.
206
229
 
207
- ### Schema sync
230
+ ## part of the crawlbrulee toolkit
208
231
 
209
- The `src/schemas/*.ts` files are **vendored copies** of the canonical Zod schemas in `crawlbrulee/packages/shared/core/src/model/common/Api*.ts`. The ecosystem policy is that tool repos do not import the shared subtree. When the canonical schemas change:
232
+ one api, many ways to call it:
210
233
 
211
- 1. Copy the updated `Api*.ts` and supporting `ScrapeScreenshot*.ts` files into `src/schemas/`.
212
- 2. Keep the `// VENDORED from โ€ฆ` banner intact and update the path if the source moved.
213
- 3. Re-run `pnpm verify`.
234
+ - **[js/ts sdk](https://github.com/crawlbrulee/crawlbrulee-js)** โ€” `@crawlbrulee/sdk` (the sdk this mcp wraps)
235
+ - **[python sdk](https://github.com/crawlbrulee/crawlbrulee-py)** โ€” `crawlbrulee` on pypi
236
+ - **[cli](https://github.com/crawlbrulee/crawlbrulee-cli)** โ€” `npx crawlbrulee`
237
+ - **[mcp server](https://github.com/crawlbrulee/crawlbrulee-mcp)** โ€” `@crawlbrulee/mcp` (this one)
238
+ - **[agent skills](https://github.com/crawlbrulee/crawlbrulee-skills)** โ€” for skills-aware coding agents
214
239
 
215
- A future `@crawlbrulee/types` npm package will replace this manual sync.
240
+ docs: [crawlbrulee.com/docs](https://crawlbrulee.com/docs) ยท dashboard: [dashboard.crawlbrulee.com](https://dashboard.crawlbrulee.com)
216
241
 
217
- ## License
242
+ ## license
218
243
 
219
244
  [AGPL-3.0-only](./LICENSE)
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ async function runTool(fn) {
25
25
  return toToolError(err);
26
26
  }
27
27
  }
28
- var MISSING_API_KEY_REMEDIATION = `${ENV_API_KEY} is not set on the MCP host. Add --env ${ENV_API_KEY}=cble_... to your "claude mcp add" command (or the equivalent env block in your MCP client config), then restart the host.`;
28
+ var MISSING_API_KEY_REMEDIATION = `${ENV_API_KEY} is not set on the MCP host. Add --env ${ENV_API_KEY}=cwbl_... to your "claude mcp add" command (or the equivalent env block in your MCP client config), then restart the host.`;
29
29
  function toToolError(err) {
30
30
  if (isCrawlbruleeError(err)) {
31
31
  if (isMissingApiKeyError(err)) {
@@ -107,14 +107,14 @@ function refineScrapeScreenshotActionsBefore(value, ctx) {
107
107
 
108
108
  // src/schemas/ApiScrapeRequest.ts
109
109
  var DEFAULT_API_SCRAPE_CACHE_MAX_AGE_SECONDS = 2 * 24 * 60 * 60;
110
- var API_PROXY_TIER_VALUES = ["basic", "advanced", "auto", "none"];
111
- var Schema_ApiProxyType = z.enum(API_PROXY_TIER_VALUES).default("basic").describe(
112
- "Proxy tier: basic, advanced, auto (automatic selection), or none (no proxy \u2014 non-production only)"
110
+ var API_PROXY_TIER_VALUES = ["basic", "advanced", "auto"];
111
+ var Schema_ApiProxyType = z.enum(API_PROXY_TIER_VALUES).default("auto").describe(
112
+ "Proxy tier: basic, advanced, or auto. Defaults to auto (automatic selection: basic tier first, escalates to advanced on failure)."
113
113
  );
114
114
  var Schema_ApiScrapeViewport = z.object({
115
- width: z.number().int().nonnegative().describe("Viewport width in pixels"),
116
- height: z.number().int().nonnegative().describe("Viewport height in pixels"),
117
- device_scale_factor: z.number().nonnegative().optional().describe("Device pixel ratio (e.g. 2 for Retina)")
115
+ width: z.number().int().min(16).max(1e4).describe("Viewport width in pixels (16\u201310000)"),
116
+ height: z.number().int().min(16).max(1e4).describe("Viewport height in pixels (16\u201310000)"),
117
+ device_scale_factor: z.number().min(1).max(4).optional().describe("Device pixel ratio (1\u20134, fractional allowed; e.g. 2 for Retina). Defaults to 1.")
118
118
  }).strict().describe("Custom browser viewport dimensions");
119
119
  var Schema_ApiScrapeFormatScreenshot = z.object({
120
120
  type: Schema_ApiScrapeScreenshotType.describe("Screenshot capture mode"),
@@ -192,7 +192,7 @@ var Schema_ApiMapCache = z.object({
192
192
  }).describe("Cache settings for the map request");
193
193
  var Schema_ApiMapRequest = z.object({
194
194
  url: z.string().describe("The website URL to map"),
195
- proxy: Schema_ApiProxyType.default("basic").describe("Proxy tier to use for fetching"),
195
+ proxy: Schema_ApiProxyType.default("auto").describe("Proxy tier to use for fetching"),
196
196
  sitemap_only: z.boolean().default(false).describe("Only use sitemap.xml \u2014 skip homepage link extraction"),
197
197
  types: Schema_ApiMapTypes.optional().describe("Filter which link types to include"),
198
198
  cache: Schema_ApiMapCache.optional().describe("Cache settings for this request"),
@@ -234,11 +234,11 @@ var Schema_ApiPageLink = z.object({
234
234
  href: z.string().describe("The link URL as it appears on the page (absolute or relative)"),
235
235
  internal: z.boolean().describe("Whether the link points to the same domain")
236
236
  });
237
- var API_RESOLVED_PROXY_TIER_VALUES = ["none", "basic", "advanced"];
237
+ var API_RESOLVED_PROXY_TIER_VALUES = ["basic", "advanced"];
238
238
  var Schema_ApiUsageMeta = z.object({
239
239
  credits: z.number().int().nonnegative().describe("Credits charged for this request. `0` on a cache hit (no fresh fetch was billed)."),
240
240
  proxy: z.enum(API_RESOLVED_PROXY_TIER_VALUES).describe(
241
- "The proxy tier the request actually ran on (resolved value \u2014 never `auto`; `auto` is resolved server-side to `none`, `basic`, or `advanced`)."
241
+ "The proxy tier the request actually ran on (resolved value \u2014 never `auto`; `auto` is resolved server-side to `basic` or `advanced`)."
242
242
  ),
243
243
  cache_hit: z.boolean().describe("Whether the result was served from cache (`true`) or freshly fetched (`false`).")
244
244
  });
@@ -392,9 +392,9 @@ var Schema_ApiScrapeAsyncResponse = z.object({
392
392
  job_id: z.string().describe("Job identifier \u2014 pass it to the `scrape_status` / `scrape_result` tools")
393
393
  });
394
394
  var Schema_ApiScrapeStatusResponse = z.object({
395
- jobId: z.string().describe("The job identifier"),
395
+ job_id: z.string().describe("The job identifier"),
396
396
  status: z.enum(ASYNC_JOB_STATUS_VALUES).describe("Current state of the job (pending, running, done, failed)"),
397
- createdAt: z.string().describe("ISO-8601 UTC timestamp when the job was created"),
397
+ created_at: z.string().describe("ISO-8601 UTC timestamp when the job was created"),
398
398
  error: z.string().optional().describe("Error message if the job ended in `failed`"),
399
399
  response_meta: Schema_ApiResponseMeta.optional().describe(
400
400
  "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."
@@ -408,7 +408,7 @@ var DESCRIPTION3 = [
408
408
  "(heavy JS rendering, full-page screenshots of long pages) \u2014 for a quick one-shot",
409
409
  "fetch prefer the synchronous `scrape` tool, which blocks and returns the page directly.",
410
410
  "Poll the job with `scrape_status` and fetch the page with `scrape_result` once done.",
411
- "Optionally attach a per-job completion `webhook`: crawlbrulee delivers a single",
411
+ "Optionally attach a per-job completion `webhook`: we deliver a single",
412
412
  "signed `scrape.complete` POST to your endpoint when the job finishes (HTTPS required",
413
413
  "in production), and echoes your opaque `webhook.metadata` back in the delivery",
414
414
  "(under `data.metadata`, alongside `data.response_meta.usage`)."
@@ -469,8 +469,13 @@ function registerScrapeStatusTool(server, getClient) {
469
469
  inputSchema: Schema_AsyncJobId.shape,
470
470
  outputSchema: Schema_ApiScrapeStatusResponse.shape
471
471
  },
472
- (args) => runTool(
473
- async () => await getClient().getScrapeStatus(args.job_id)
472
+ (args) => (
473
+ // The SDK's `AsyncJobStatusResponse` is snake_case (job_id, created_at),
474
+ // matching the vendored status schema 1:1, so a direct cast lines the SDK
475
+ // return type up with the tool's output schema.
476
+ runTool(
477
+ async () => await getClient().getScrapeStatus(args.job_id)
478
+ )
474
479
  )
475
480
  );
476
481
  }
@@ -517,7 +522,7 @@ var Schema_ApiWhoamiResponse = z.object({
517
522
  organization_name: z.string().describe("Display name of the organization that owns the token."),
518
523
  token_name: z.string().describe("User-assigned name of the API token authenticating the request."),
519
524
  token_preview: z.string().describe(
520
- "Truncated preview of the API token (e.g. `cble_\u2026xyz`). Safe to display; does not authenticate."
525
+ "Truncated preview of the API token (e.g. `cwbl_\u2026xyz`). Safe to display; does not authenticate."
521
526
  )
522
527
  });
523
528
 
@@ -542,7 +547,7 @@ function registerWhoamiTool(server, getClient) {
542
547
 
543
548
  // src/version.ts
544
549
  var SERVER_NAME = "crawlbrulee";
545
- var SERVER_VERSION = "0.3.0";
550
+ var SERVER_VERSION = "0.5.0";
546
551
 
547
552
  // src/server.ts
548
553
  function buildServer(clientFactory = createDefaultClientFactory()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlbrulee/mcp",
3
- "version": "0.3.0",
3
+ "version": "0.5.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.4.0",
58
+ "@crawlbrulee/sdk": "^0.7.0",
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
60
  "zod": "^4.0.0"
61
61
  },