@crawlbrulee/mcp 1.3.2 → 1.3.3

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 +26 -22
  2. package/dist/index.js +7 -4
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -28,33 +28,37 @@ this readme covers the mcp server itself — its tools and how to wire it into a
28
28
 
29
29
  ## install
30
30
 
31
+ **1. get a key.** if you don't have a crawlbrulee account,
32
+ [sign up](https://dashboard.crawlbrulee.com/auth/register). the free plan needs no credit
33
+ card. then, in the dashboard menu, open **tokens** and click **create token**.
34
+
35
+ **2. put it in your environment.** add it to your shell profile (for example `~/.zshrc`),
36
+ then open a new terminal and start your agent from it. don't paste the key into your
37
+ agent's chat: anything in the chat stays in its history.
38
+
31
39
  ```bash
32
- # Claude Code
33
- claude mcp add crawlbrulee \
34
- --env CRAWLBRULEE_API_KEY=cwbl_... \
35
- -- npx -y @crawlbrulee/mcp
40
+ export CRAWLBRULEE_API_KEY="cwbl_..."
41
+ ```
36
42
 
37
- # Cursor — add to ~/.cursor/mcp.json:
38
- {
39
- "mcpServers": {
40
- "crawlbrulee": {
41
- "command": "npx",
42
- "args": ["-y", "@crawlbrulee/mcp"],
43
- "env": { "CRAWLBRULEE_API_KEY": "cwbl_..." }
44
- }
45
- }
46
- }
43
+ **3. add the server, with no key in its config.** in Claude Code:
44
+
45
+ ```bash
46
+ claude mcp add crawlbrulee -- npx -y @crawlbrulee/mcp
47
47
  ```
48
48
 
49
- the same pattern works for Codex, Claude Desktop, and any other host that
50
- accepts a stdio mcp launch command — set `command: npx`, `args: ["-y",
51
- "@crawlbrulee/mcp"]`, and forward `CRAWLBRULEE_API_KEY` via the env block.
49
+ other stdio hosts run the same command: `npx -y @crawlbrulee/mcp`. a few of them (Codex,
50
+ Cursor, Windsurf, Gemini CLI, Claude Desktop) need the key or the variable named in their
51
+ config file, and VS Code and the Claude Code plugin can ask for the key in a masked prompt.
52
+ the file and the entry for each one: [mcp setup in the docs](https://crawlbrulee.com/docs/mcp#install).
53
+
54
+ if a key stops working (`invalid_credentials`), it's expired, revoked or mistyped: create a
55
+ new one the same way, replace the old one, and start your agent again.
52
56
 
53
57
  ## configuration
54
58
 
55
- | env var | required | description |
56
- | --------------------- | -------- | ------------------------------------------------------------------------------ |
57
- | `CRAWLBRULEE_API_KEY` | yes | api key sent as `Authorization: Bearer …`. get one at https://crawlbrulee.com. |
59
+ | env var | required | description |
60
+ | --------------------- | -------- | -------------------------------------------------------------------------------------- |
61
+ | `CRAWLBRULEE_API_KEY` | yes | api key sent as `Authorization: Bearer …`. see [install](#install) for how to get one. |
58
62
 
59
63
  the mcp reads the env var on first tool invocation — not at startup — so a
60
64
  typo in your config surfaces as a clear tool-error message rather than the
@@ -271,8 +275,8 @@ agents can branch on the `errorName` code. the set comes from the sdk's `ApiErro
271
275
 
272
276
  | code | meaning |
273
277
  | --------------------------------- | ---------------------------------------------------------------------------------------------- |
274
- | `missing_api_key` | `CRAWLBRULEE_API_KEY` is not set in the mcp host's env. |
275
- | `invalid_credentials` | server rejected the api key (revoked, wrong env, etc.). |
278
+ | `missing_api_key` | `CRAWLBRULEE_API_KEY` is not set in the mcp host's env. the message says how to get a key. |
279
+ | `invalid_credentials` | the api rejected the key: expired, revoked or mistyped. the message says how to get a new one. |
276
280
  | `service_unavailable` | temporary backend failure (HTTP 503). your key is fine — retry with backoff. |
277
281
  | `too_many_requests` | rate limit hit — back off and retry. |
278
282
  | `usage_allocation_error` | plan credit / concurrency cap exceeded. show `usage` to user. |
package/dist/index.js CHANGED
@@ -42,7 +42,9 @@ async function runTool(fn) {
42
42
  return toToolError(err);
43
43
  }
44
44
  }
45
- const 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.`;
45
+ const CREATE_KEY_STEPS = "In the crawlbrulee dashboard (https://dashboard.crawlbrulee.com), they open \"tokens\" in the menu and click \"create token\".";
46
+ const USER_ADDS_KEY = `They put the key in place themselves, usually as ${ENV_API_KEY} in their shell profile, then restart the host. Don't ask them to paste the key into the chat.`;
47
+ const MISSING_API_KEY_REMEDIATION = `${ENV_API_KEY} is not set on the MCP host. The user needs an API key. If they have no crawlbrulee account, they sign up at https://dashboard.crawlbrulee.com/auth/register (the free plan needs no credit card). ${CREATE_KEY_STEPS} ${USER_ADDS_KEY}`;
46
48
  /**
47
49
  * Map any thrown value into the MCP tool-error envelope. SDK errors carry
48
50
  * stable `errorName` codes and HTTP `status`; both go into the surfaced
@@ -74,6 +76,7 @@ function isMissingApiKeyError(err) {
74
76
  * for it yet), so it is matched by name.
75
77
  */
76
78
  const ERROR_HINTS = {
79
+ invalid_credentials: `The API key is expired, revoked or mistyped, so the user needs a new one. ${CREATE_KEY_STEPS} They replace the old key themselves (in their shell profile or this server's config), then restart the host. Don't ask them to paste the key into the chat. If the config names an environment variable instead of the key, the variable may not be set where the host started.`,
77
80
  zero_data_retention_not_enabled: "Zero data retention is not enabled for this organization. Send the request again without `zero_data_retention`, or ask us to turn it on (sales@crawlbrulee.com). Not billed.",
78
81
  target_unreachable: "We could not reach the site: it did not answer, took too long, or its certificate was not valid. Retry later or check the URL. Not billed. This is not the same as a page that says \"not found\": a page the site served comes back as a result, with its status in page_status_code."
79
82
  };
@@ -238,7 +241,7 @@ function refineScrapeScreenshotActionsBefore(value, ctx) {
238
241
 
239
242
  //#endregion
240
243
  //#region src/schemas/ApiScrapeRequest.ts
241
- const DEFAULT_API_SCRAPE_CACHE_MAX_AGE_SECONDS = 2880 * 60;
244
+ const DEFAULT_API_SCRAPE_CACHE_MAX_AGE_SECONDS = 172800;
242
245
  const API_PROXY_TIER_VALUES = [
243
246
  "basic",
244
247
  "advanced",
@@ -286,7 +289,7 @@ const Schema_ApiScrapeRequest = z.object({
286
289
  //#endregion
287
290
  //#region src/schemas/ApiMapRequest.ts
288
291
  const Schema_ApiMapLocation = z.object({ country: z.string().regex(/^([a-zA-Z]{2}|europe)$/i, "country must be a 2-letter ISO 3166-1 alpha-2 code, 'eu', or 'europe'").optional().describe("ISO 3166-1 alpha-2 (e.g. 'us', 'de', 'br'; case-insensitive) hint for proxy egress country. Also accepts 'eu' (random EU member state) or 'europe' (random European state incl. UK and non-EU).") }).strict().describe("Optional country emulation for the map");
289
- const DEFAULT_API_MAP_CACHE_MAX_AGE_SECONDS = 10080 * 60;
292
+ const DEFAULT_API_MAP_CACHE_MAX_AGE_SECONDS = 604800;
290
293
  /**
291
294
  * How many URLs a /map call discovers and stores when the caller names no
292
295
  * limit. Sitemap discovery stops here, so the default is real crawl work, not
@@ -709,7 +712,7 @@ function registerWhoamiTool(server, getClient) {
709
712
  //#endregion
710
713
  //#region src/version.ts
711
714
  const SERVER_NAME = "crawlbrulee";
712
- const SERVER_VERSION = "1.3.2";
715
+ const SERVER_VERSION = "1.3.3";
713
716
 
714
717
  //#endregion
715
718
  //#region src/server.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlbrulee/mcp",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "mcpName": "io.github.crawlbrulee/mcp",
5
5
  "description": "official mcp server for crawlbrulee — EU-native web scraping for AI agents & developers. native scrape and map tools for your agent.",
6
6
  "keywords": [
@@ -33,7 +33,7 @@
33
33
  "url": "https://github.com/crawlbrulee/crawlbrulee-mcp/issues"
34
34
  },
35
35
  "type": "module",
36
- "packageManager": "pnpm@10.10.0",
36
+ "packageManager": "pnpm@10.24.0",
37
37
  "bin": {
38
38
  "crawlbrulee-mcp": "dist/index.js"
39
39
  },
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@crawlbrulee/sdk": "^1.3.0",
67
- "@modelcontextprotocol/sdk": "^1.29.0",
67
+ "@modelcontextprotocol/sdk": "^1.32.1",
68
68
  "zod": "^4.0.0"
69
69
  },
70
70
  "devDependencies": {
@@ -75,6 +75,6 @@
75
75
  "tsdown": "^0.22.11",
76
76
  "typescript": "^6.0.3",
77
77
  "typescript-eslint": "^8.64.0",
78
- "vitest": "^3.2.6"
78
+ "vitest": "^4.1.11"
79
79
  }
80
80
  }