@crawlbrulee/mcp 0.3.0 → 0.4.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 +5 -5
  2. package/dist/index.js +19 -12
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -7,7 +7,7 @@ The official [Model Context Protocol](https://modelcontextprotocol.io) server fo
7
7
  - Stdio transport for terminal-based agents.
8
8
  - Strict, fully-described tool schemas — agents see what every parameter does without reading docs.
9
9
 
10
- > **Status:** v0.3.0 (beta). Tool surface is stabilizing — expect minor changes between 0.x releases.
10
+ > **Status:** v0.4.0 (beta). Tool surface is stabilizing — expect minor changes between 0.x releases.
11
11
 
12
12
  ---
13
13
 
@@ -16,7 +16,7 @@ The official [Model Context Protocol](https://modelcontextprotocol.io) server fo
16
16
  ```bash
17
17
  # Claude Code
18
18
  claude mcp add crawlbrulee \
19
- --env CRAWLBRULEE_API_KEY=cble_... \
19
+ --env CRAWLBRULEE_API_KEY=cwbl_... \
20
20
  -- npx -y @crawlbrulee/mcp
21
21
 
22
22
  # Cursor — add to ~/.cursor/mcp.json:
@@ -25,7 +25,7 @@ claude mcp add crawlbrulee \
25
25
  "crawlbrulee": {
26
26
  "command": "npx",
27
27
  "args": ["-y", "@crawlbrulee/mcp"],
28
- "env": { "CRAWLBRULEE_API_KEY": "cble_..." }
28
+ "env": { "CRAWLBRULEE_API_KEY": "cwbl_..." }
29
29
  }
30
30
  }
31
31
  }
@@ -72,7 +72,7 @@ HTML, raw HTML, links, images, screenshot, page metadata).
72
72
  }
73
73
  ```
74
74
 
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:
75
+ **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
76
 
77
77
  ```jsonc
78
78
  {
@@ -199,7 +199,7 @@ pnpm verify # all of the above
199
199
  Run the built MCP locally:
200
200
 
201
201
  ```bash
202
- CRAWLBRULEE_API_KEY=cble_... node ./dist/index.js
202
+ CRAWLBRULEE_API_KEY=cwbl_... node ./dist/index.js
203
203
  ```
204
204
 
205
205
  It will block waiting for an MCP client on stdio. Combine with the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for interactive debugging.
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)) {
@@ -108,13 +108,13 @@ function refineScrapeScreenshotActionsBefore(value, ctx) {
108
108
  // src/schemas/ApiScrapeRequest.ts
109
109
  var DEFAULT_API_SCRAPE_CACHE_MAX_AGE_SECONDS = 2 * 24 * 60 * 60;
110
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)"
111
+ var Schema_ApiProxyType = z.enum(API_PROXY_TIER_VALUES).default("auto").describe(
112
+ "Proxy tier: basic, advanced, auto, or none (no proxy \u2014 non-production only). 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"),
@@ -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."
@@ -469,8 +469,15 @@ 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 vendored status schema tracks the live wire contract, which has been
474
+ // uniformly snake_case (job_id, created_at) since 2026-06-13. The published
475
+ // SDK's `AsyncJobStatusResponse` type still encodes the pre-June camelCase
476
+ // names, so a plain cast won't type-check — bridge through `unknown` until
477
+ // the SDK catches up. The runtime payload already matches the vendored shape.
478
+ runTool(
479
+ async () => await getClient().getScrapeStatus(args.job_id)
480
+ )
474
481
  )
475
482
  );
476
483
  }
@@ -517,7 +524,7 @@ var Schema_ApiWhoamiResponse = z.object({
517
524
  organization_name: z.string().describe("Display name of the organization that owns the token."),
518
525
  token_name: z.string().describe("User-assigned name of the API token authenticating the request."),
519
526
  token_preview: z.string().describe(
520
- "Truncated preview of the API token (e.g. `cble_\u2026xyz`). Safe to display; does not authenticate."
527
+ "Truncated preview of the API token (e.g. `cwbl_\u2026xyz`). Safe to display; does not authenticate."
521
528
  )
522
529
  });
523
530
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlbrulee/mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.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.6.0",
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
60
  "zod": "^4.0.0"
61
61
  },