firecrawl-mcp 3.29.1 → 3.30.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.
- package/README.md +9 -48
- package/dist/index.js +57 -227
- package/dist/server.d.ts +28 -6
- package/dist/server.js +50 -223
- package/package.json +1 -1
- package/dist/agent-hints.js +0 -46
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ A fixed-scope search surface is also hosted at:
|
|
|
81
81
|
https://mcp.firecrawl.dev/v2/mcp-search
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
It exposes a fixed set of nine tools: `firecrawl_search`, `firecrawl_developer_search`, `firecrawl_gov_search`, the four `firecrawl_research_*` tools, and the two Alexandria tools `firecrawl_find_tools` and `firecrawl_scrape`. Its `firecrawl_search` fetches no page content
|
|
84
|
+
It exposes a fixed set of nine tools: `firecrawl_search`, `firecrawl_developer_search`, `firecrawl_gov_search`, the four `firecrawl_research_*` tools, and the two Alexandria tools `firecrawl_find_tools` and `firecrawl_scrape`. Its `firecrawl_search` fetches no page content.
|
|
85
85
|
|
|
86
86
|
### Running with npx
|
|
87
87
|
|
|
@@ -280,30 +280,18 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
|
|
|
280
280
|
|
|
281
281
|
#### MCP OAuth (Bearer access tokens)
|
|
282
282
|
|
|
283
|
-
|
|
283
|
+
Firecrawl issues OAuth **access tokens** (`fco_…`) via the authorization server on [firecrawl.dev](https://firecrawl.dev). This MCP server forwards whichever credential it resolves to the Firecrawl API as `Authorization: Bearer …`.
|
|
284
284
|
|
|
285
285
|
- **HTTP stream transports** (`CLOUD_SERVICE=true`, `HTTP_STREAMABLE_SERVER=true`, or `SSE_LOCAL=true`): Clients should send `Authorization: Bearer <fco_access_token>` on MCP requests. An OAuth bearer token takes precedence over `x-firecrawl-api-key` / `x-api-key` when both are present.
|
|
286
286
|
- **stdio:** Use `FIRECRAWL_OAUTH_TOKEN` for a static access token, or keep using `FIRECRAWL_API_KEY` for an API key.
|
|
287
287
|
|
|
288
288
|
Use **access** tokens (`fco_…`) only. Refresh tokens (`fcr_…`) must be exchanged at the token endpoint, not passed to the scrape/search API.
|
|
289
289
|
|
|
290
|
-
####
|
|
290
|
+
#### `CLOUD_SERVICE=true`
|
|
291
291
|
|
|
292
|
-
`CLOUD_SERVICE=true` serves the tools over streamable HTTP on `PORT` (default `3000
|
|
292
|
+
`CLOUD_SERVICE=true` serves the tools over streamable HTTP on `PORT` (default `3000`, bound to `0.0.0.0`) with stricter defaults: every request must carry a credential (an API key or an OAuth access token), scrape is read-only (see the scrape tool below), and `firecrawl_parse` accepts uploads only.
|
|
293
293
|
|
|
294
|
-
-
|
|
295
|
-
- safe mode: scrape is read-only (see the scrape tool below);
|
|
296
|
-
- `firecrawl_parse` accepts uploads only and never reads local files.
|
|
297
|
-
|
|
298
|
-
`FASTMCP_ENDPOINT` selects the surface: `/v2/mcp` (default) serves the full tool set, `/v2/mcp-oauth` the account surface, and `/v2/mcp-search` (which also requires `FIRECRAWL_MCP_SEARCH_OAUTH_ONLY=true`) the [search-only surface](#search-only-surface-hosted) described below.
|
|
299
|
-
|
|
300
|
-
#### Search-only surface (hosted)
|
|
301
|
-
|
|
302
|
-
In hosted mode (`CLOUD_SERVICE=true`) a second in-process instance serves the [search-only endpoint](#search-only-endpoint) on local port `3001`. The hosted deployment's reverse proxy routes `/v2/mcp-search` to that port, and the OAuth protected-resource identifier is `https://mcp.firecrawl.dev/v2/mcp-search`.
|
|
303
|
-
|
|
304
|
-
`FIRECRAWL_MCP_SEARCH_ENABLED` (default `true`) is the supported operational toggle; set it to `false` to prevent the search instance from starting. The Node process also accepts `FIRECRAWL_MCP_SEARCH_PORT`, `FIRECRAWL_MCP_SEARCH_ENDPOINT`, and `FIRECRAWL_MCP_SEARCH_RESOURCE_URL` for isolated tests. Those overrides do not reconfigure the deployment's proxy routes or the authorization server allowlist and must not be used independently in the hosted deployment.
|
|
305
|
-
|
|
306
|
-
The search instance requires authentication for every request (including `tools/list`) and rejects OAuth tokens whose audience does not match its own resource.
|
|
294
|
+
`FASTMCP_ENDPOINT` selects the tool surface: `/v2/mcp` (default) for the full tool set, `/v2/mcp-oauth` for the account surface, or `/v2/mcp-search` for the search-only tools (this also requires `FIRECRAWL_MCP_SEARCH_OAUTH_ONLY=true`). With the full surface, a search-only instance also starts on port `3001`; set `FIRECRAWL_MCP_SEARCH_ENABLED=false` to turn it off.
|
|
307
295
|
|
|
308
296
|
### Configuration Examples
|
|
309
297
|
|
|
@@ -463,7 +451,7 @@ Scrape content from a single URL with advanced options.
|
|
|
463
451
|
|
|
464
452
|
**Branding format:** Extracts comprehensive brand identity (colors, fonts, typography, spacing, logo, UI components) for design analysis or style replication.
|
|
465
453
|
**Privacy:** Set `redactPII: true` to return content with personally identifiable information redacted.
|
|
466
|
-
**
|
|
454
|
+
**With `CLOUD_SERVICE=true`:** scrape is read-only. It takes no browser `actions` and cannot accept provider terms. A named `profile` loads saved browser state without saving changes to it, and the full endpoint's `firecrawl_search` treats `scrapeOptions.profile` the same way. To save browser state to a profile, open the page with `firecrawl_interact` (see below). An organization admin accepts terms in the dashboard.
|
|
467
455
|
|
|
468
456
|
**Returns:**
|
|
469
457
|
|
|
@@ -702,11 +690,11 @@ Check the status and results of an existing crawl job by ID.
|
|
|
702
690
|
|
|
703
691
|
Parse local files or hosted upload references with Firecrawl's `/v2/parse` endpoint.
|
|
704
692
|
|
|
705
|
-
**Best for:** PDFs, Word documents, spreadsheets, HTML files, and other documents that need markdown or structured JSON output.
|
|
693
|
+
**Best for:** PDFs, Word documents, spreadsheets, HTML files, and other documents that need markdown or structured JSON output. The hosted endpoint uses a two-step upload flow; local direct file reads require a self-hosted `FIRECRAWL_API_URL`.
|
|
706
694
|
|
|
707
695
|
**Not recommended for:** Remote URLs (use scrape), multiple files in one call (call parse once per file), or browser-only actions such as screenshots and clicks.
|
|
708
696
|
|
|
709
|
-
**Hosted
|
|
697
|
+
**Hosted endpoint:** it cannot read your filesystem. Call `firecrawl_parse` with `filePath` to receive a short-lived upload command and `nextToolCall`, upload the file locally, then call `firecrawl_parse` again with the returned `uploadRef`. The upload step requires Firecrawl auth or the keyless tier. In local `npx firecrawl-mcp` mode, direct file parsing currently requires `FIRECRAWL_API_URL` pointing to a self-hosted Firecrawl API; a plain cloud API-key-only local server cannot read and upload files through this tool.
|
|
710
698
|
|
|
711
699
|
**Usage Example:**
|
|
712
700
|
|
|
@@ -1245,7 +1233,7 @@ Options mirror the CLI's environment variables: `apiUrl`, `apiKey`, `transport`,
|
|
|
1245
1233
|
|---|---|
|
|
1246
1234
|
| `authenticate(request)` | Resolve the session for a request; throw a `Response` to reject it. |
|
|
1247
1235
|
| `wrapTool(tool)` | Decorate every registered tool. |
|
|
1248
|
-
| `onToolResult(event)` | Observe the start and outcome of each tool call
|
|
1236
|
+
| `onToolResult(event)` | Observe the start and outcome of each tool call. |
|
|
1249
1237
|
| `instructions` | Server instructions, or a function choosing from the defaults. |
|
|
1250
1238
|
| `registerExtraTools(registrar, context)` | Add tools after the built-in ones. |
|
|
1251
1239
|
| `outboundRequest(session)` | Credential and extra headers for each Firecrawl API request. |
|
|
@@ -1275,33 +1263,6 @@ Example log messages:
|
|
|
1275
1263
|
[ERROR] Rate limit exceeded
|
|
1276
1264
|
```
|
|
1277
1265
|
|
|
1278
|
-
## API response hints
|
|
1279
|
-
|
|
1280
|
-
The MCP server explicitly enables Firecrawl API response hints on its outbound
|
|
1281
|
-
requests with `X-Firecrawl-Agent-Hints: true`; the API leaves them disabled for
|
|
1282
|
-
ordinary callers. When Firecrawl returns an optional `agent_hints` array of
|
|
1283
|
-
strings, JSON tool results preserve it in their existing text and
|
|
1284
|
-
`structuredContent` alongside the tool's other structured fields. Readable
|
|
1285
|
-
Developer and Research outputs keep their existing text and show hints in a
|
|
1286
|
-
separate, labeled text block. Empty results can include hints. Error hints
|
|
1287
|
-
remain visible with `isError: true`.
|
|
1288
|
-
Responses without hints keep their existing output format. Guidance is API
|
|
1289
|
-
metadata, separate from the scraped page's content; it is not generated or
|
|
1290
|
-
executed by the MCP adapter.
|
|
1291
|
-
|
|
1292
|
-
The strings are passed through unchanged. An HTTP operation mentioned in a
|
|
1293
|
-
hint is not necessarily an MCP tool: Alexandria discovery is available through
|
|
1294
|
-
`firecrawl_find_tools`, and provider execution uses `firecrawl_scrape` with an
|
|
1295
|
-
`alexandria` body. The search-only profile exposes those paths and URL-mode
|
|
1296
|
-
Scrape, but does not expose feedback tools. Clients should use their advertised
|
|
1297
|
-
tool schemas and available capabilities. This change does not add tools,
|
|
1298
|
-
translate prose into tool calls, or submit feedback automatically.
|
|
1299
|
-
|
|
1300
|
-
The pinned `firecrawl` 4.40.0 discards outer-envelope hints in high-level
|
|
1301
|
-
Scrape and Map responses and normalized SDK errors. The adapter captures hints
|
|
1302
|
-
from the SDK HTTP response while retaining the SDK's request and retry behavior.
|
|
1303
|
-
Authentication recovery retains its existing guidance.
|
|
1304
|
-
|
|
1305
1266
|
## Error Handling
|
|
1306
1267
|
|
|
1307
1268
|
The server provides robust error handling:
|