firecrawl-mcp 3.27.2 → 3.28.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 +47 -20
  2. package/dist/index.js +421 -292
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -37,7 +37,7 @@ A Model Context Protocol (MCP) server that brings [Firecrawl](https://github.com
37
37
  - Use `firecrawl_credit_usage` to check credits left or monthly consumption, optionally broken down by API key.
38
38
  - Consider something else when you need to hold a browser session open across many of your own steps with your own retry and termination logic: each `firecrawl_interact` call runs one `prompt` or `code` turn to completion and returns control — the session can persist across calls via `scrapeId` and ends with `firecrawl_interact_stop`, but you cannot drive it interactively step-by-step from the client side within a single call.
39
39
 
40
- This server lists 26 tools when the full profile registers with default settings (feedback tools included, not running in local-keyless mode). Setting `FIRECRAWL_NO_SEARCH_FEEDBACK=1` and/or `FIRECRAWL_NO_ENDPOINT_FEEDBACK=1` removes the corresponding feedback tools and reduces this count, as does local keyless startup. For clients with a tool-slot limit: the hosted keyless endpoint (`https://mcp.firecrawl.dev/v2/mcp`, no API key) exposes only 3 — `firecrawl_scrape`, `firecrawl_search`, `firecrawl_parse` — and the dedicated [search-only endpoint](#search-only-endpoint) (`https://mcp.firecrawl.dev/v2/mcp-search`) exposes a fixed set of 8 tools (search, developer and research search, plus Alexandria catalogue lookup and execution).
40
+ This server lists 27 tools when the full profile registers with default settings (feedback tools included, not running in local-keyless mode). Setting `FIRECRAWL_NO_SEARCH_FEEDBACK=1` and/or `FIRECRAWL_NO_ENDPOINT_FEEDBACK=1` removes the corresponding feedback tools and reduces this count, as does local keyless startup. For clients with a tool-slot limit: the hosted keyless endpoint (`https://mcp.firecrawl.dev/v2/mcp`, no API key) exposes only 3 — `firecrawl_scrape`, `firecrawl_search`, `firecrawl_parse` — and the dedicated [search-only endpoint](#search-only-endpoint) (`https://mcp.firecrawl.dev/v2/mcp-search`) exposes a fixed set of 9 tools (search, developer, government, and research search, plus Alexandria catalogue lookup and execution).
41
41
 
42
42
  ## Installation
43
43
 
@@ -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 eight tools: `firecrawl_search`, `firecrawl_developer_search`, the four `firecrawl_research_*` tools, and the two Alexandria tools `firecrawl_find_tools` and `firecrawl_scrape`. Its `firecrawl_search` fetches no page content, and the surface has its own OAuth identity; the full endpoint above is unchanged. It backs a published connector listing, so its tool set is a contract rather than a profile to tune. See [docs/search-profile.md](docs/search-profile.md) for the full contract and what a change to it involves.
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, and the surface has its own OAuth identity; the full endpoint above is unchanged. It backs a published connector listing, so its tool set is a contract rather than a profile to tune. See [docs/search-profile.md](docs/search-profile.md) for the full contract and what a change to it involves.
85
85
 
86
86
  For packaged MCP workflows in ChatGPT, Codex, or Claude Code, see
87
87
  [MCP plugin packages](plugins/README.md).
@@ -308,6 +308,7 @@ Use this guide to select the right tool for your task:
308
308
  - **If you need to discover URLs on a site:** use **map**
309
309
  - **If you want to search the web for info:** use **search**
310
310
  - **If you have a programming question** (a library, an API contract, an error message, a known bug): use **developer search**
311
+ - **If you have a legal or regulatory question** (a statute, regulation, code, court opinion, or other US government publication): use the **Firecrawl Government Index**
311
312
  - **If you need scientific papers** (biomedical, life-science, clinical, or arXiv literature): use **research tools** — they search paper abstracts and full text. `search` with `categories: ["research"]` is a different thing: a website filter over ordinary web results.
312
313
  - **If you need multi-source research that returns structured data, do not know the URLs, or the answer spans several sites** (an entity plus its fields, a list, a dataset): use **agent**
313
314
  - **If you want to analyze a whole site or section:** use **crawl** (with limits!)
@@ -326,6 +327,7 @@ Use this guide to select the right tool for your task:
326
327
  | search | Web search for info | results[] |
327
328
  | find_tools | Alexandria catalogue browsing and URL lookup | providers, tool contracts and nextTool navigation |
328
329
  | developer | Programming questions over developer sources | results[] with passages |
330
+ | gov | US primary law and regulatory material | results[] with snippets |
329
331
  | agent | Multi-source research, unknown or many sites | JSON (structured data) |
330
332
  | monitor | Recurring page checks | monitor/check metadata and diffs |
331
333
  | research | Paper and GitHub repository research | research results and repo matches |
@@ -419,6 +421,7 @@ Scrape content from a single URL with advanced options.
419
421
 
420
422
  **Branding format:** Extracts comprehensive brand identity (colors, fonts, typography, spacing, logo, UI components) for design analysis or style replication.
421
423
  **Privacy:** Set `redactPII: true` to return content with personally identifiable information redacted.
424
+ **Hosted server:** On the hosted server (`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.
422
425
 
423
426
  **Returns:**
424
427
 
@@ -747,17 +750,17 @@ The agent performs web searches, follows links, reads pages, and gathers data au
747
750
  - `enabled`, `toolkits` (up to 5 provider slugs), `maxCalls` (1 to 30), `requireApproval` (paid calls end the turn with a `pendingApproval`; needs `mode: "chat"` on the same call, even on a follow-up)
748
751
  - `onTermsRequired`: what to do when an Alexandria provider the agent would use needs data terms your team has not accepted. Gated providers are never called in any mode. Omitted on a follow-up keeps the previous turn's value.
749
752
  - `"skip"` (default): answer with accepted providers only. `exchange.skippedProviders` on the status result lists the gated providers that would have helped.
750
- - `"ask"`: the same, plus a terms `pendingApproval` and `exchange.requiresAction` with the exact `terms/show` and `terms/accept` calls for each provider. Each provider's `digest` is always present and is `string | null`; when it is `null`, `terms/show` returns the current digest to send.
753
+ - `"ask"`: the same, plus a terms `pendingApproval` and `exchange.requiresAction` with the approval ID and provider requirements. Read terms with `terms/show`; an organization admin accepts them in the Firecrawl dashboard.
751
754
  - `approve`: `{ approvalId, callIds?, always? }` answers yes to the `pendingApproval` the previous turn ended on. `callIds` and `always` apply to paid-call approvals only.
752
755
  - `decline`: `{ approvalId }` answers no. A declined terms offer keeps those providers out of the rest of the thread.
753
756
  - `approve` and `decline` need `threadId`, and only one of them can be sent.
754
757
 
755
- **Provider terms (ask mode):** there is no auto-accept mode. When a turn ends on a terms offer, the status result carries `pendingApproval` (`kind: "terms"`) and `exchange.requiresAction` with the `approvalId` and the exact `terms/show` and `terms/accept` calls. To use the provider:
758
+ **Provider terms (ask mode):** there is no auto-accept mode. When a turn ends on a terms offer, the status result carries `pendingApproval` (`kind: "terms"`) and `exchange.requiresAction` with the `approvalId` and provider requirements. Any `terms/accept` descriptor in that API payload is unavailable through MCP. To use the provider:
756
759
 
757
760
  1. Show the user the terms (`terms/show` through `firecrawl_scrape` with `alexandria`).
758
- 2. Get the user's explicit consent to that provider's terms. A data request is not consent.
759
- 3. Run the `terms/accept` call through `firecrawl_scrape`.
760
- 4. Continue the same thread: call `firecrawl_agent` with the same `threadId` and `exchange.approve: { "approvalId": "..." }`.
761
+ 2. Direct an organization admin to accept the terms at the provider's URL, or [data sources settings](https://www.firecrawl.dev/app/settings?tab=data-sources). A data request is not consent.
762
+ 3. Wait for the admin to confirm acceptance in the dashboard.
763
+ 4. Continue the same thread: call `firecrawl_agent` with the same `threadId` and `exchange.approve: { "approvalId": "..." }`. This resumes research and does not accept terms.
761
764
 
762
765
  If the user says no, call `firecrawl_agent` with the same `threadId` and `exchange.decline: { "approvalId": "..." }` instead.
763
766
 
@@ -818,13 +821,13 @@ Then poll with `firecrawl_agent_status` using the returned job ID.
818
821
  }
819
822
  ```
820
823
 
821
- **Usage Example (continue the thread after the user accepted a provider's terms):**
824
+ **Usage Example (continue the thread after an admin confirmed dashboard acceptance):**
822
825
 
823
826
  ```json
824
827
  {
825
828
  "name": "firecrawl_agent",
826
829
  "arguments": {
827
- "prompt": "I accepted the Apollo terms. Continue.",
830
+ "prompt": "The admin confirmed acceptance of the Apollo terms in the dashboard. Continue.",
828
831
  "threadId": "0199a1b2-0000-7000-8000-000000000031",
829
832
  "exchange": { "approve": { "approvalId": "0199a1b2-0000-7000-8000-000000000033" } }
830
833
  }
@@ -866,6 +869,7 @@ Interact with a fresh URL or with a page that was already opened by `firecrawl_s
866
869
 
867
870
  - Pass `url` to scrape and open a page for interaction in one MCP call.
868
871
  - Pass `scrapeId` to continue interacting with an existing scraped page.
872
+ - To save browser state (cookies, localStorage) to a named profile, pass `url` with `scrapeOptions: { "profile": { "name": "my-profile", "saveChanges": true } }`. The state is saved when `firecrawl_interact_stop` ends the session.
869
873
  - Pass exactly one of `url` or `scrapeId`, plus either `prompt` or `code`.
870
874
 
871
875
  **Usage Example:**
@@ -1008,6 +1012,31 @@ Search an index built for coding agents. The index covers GitHub issues, merged
1008
1012
 
1009
1013
  `firecrawl_search` with `categories: ["developer"]` searches the same index beside the web results. Use this tool instead when you want the matched passages, the `skills` filter, or no web results in the response. The search-only endpoint exposes both tools, and the same choice applies there.
1010
1014
 
1015
+ ### 14b. Government Index Search Tool (`firecrawl_gov_search`)
1016
+
1017
+ Search primary law and regulatory material from US federal, state, and local government sources: statutes, regulations, codes, court opinions, and other government publications.
1018
+
1019
+ **Best for:** A legal or regulatory question that needs the governing text or an official government source.
1020
+
1021
+ **Arguments:**
1022
+
1023
+ ```json
1024
+ {
1025
+ "name": "firecrawl_gov_search",
1026
+ "arguments": {
1027
+ "query": "federal food labeling requirements for allergens",
1028
+ "k": 10
1029
+ }
1030
+ }
1031
+ ```
1032
+
1033
+ - `query` (required): the legal or regulatory question or search phrase.
1034
+ - `k`: number of ranked results. The default is 10 and the maximum is 100.
1035
+
1036
+ **Returns:** Ranked results. Each result carries a position, a title, a URL, and the matched snippet. The search-only endpoint exposes this tool too.
1037
+
1038
+ `firecrawl_search` with `categories: ["gov"]` searches the same sources and returns the hits in `data.web` with `category: "gov"`. The `gov` category cannot be combined with other categories.
1039
+
1011
1040
  ### 15. Alexandria Tools
1012
1041
 
1013
1042
  Firecrawl Alexandria is a catalogue of data providers reachable through the Firecrawl API with a Firecrawl API key on a team with Alexandria access. Keyless sessions (hosted or local) get `Alexandria requires an API key on a team with Alexandria access`; Alexandria discovery tools are not listed for hosted keyless sessions.
@@ -1113,16 +1142,14 @@ HTTP 403 and this body:
1113
1142
  The tool result relays it as an error with `structuredContent` carrying `code`,
1114
1143
  `status: 403`, `requestId`, the `requiresAction` object unchanged, and
1115
1144
  `next_actions` (`human_action_required` then `retry_same_request`). Accepting
1116
- terms is a legal act. Use the returned `nextTool` call to read the agreement through `firecrawl_scrape`
1117
- with `alexandria: [{provider: "firecrawl", capability: "terms/show", options: {provider: "<provider>"}}]`.
1118
- Present it to the user and obtain explicit authorization to bind their organization
1119
- before calling `firecrawl_scrape` with capability `terms/accept` under provider `firecrawl`.
1120
- Its options are `provider`, the exact reviewed `version`
1121
- and 64-character lowercase hexadecimal `digest`, and `confirmed: true`. A request
1122
- for data is not consent. Authority or eligibility errors may require an organization
1123
- admin to use `requiresAction.url`. No automatic acceptance or uncertain retries occur.
1124
- Send terms calls separately from execution. These are nested capabilities, not top-level MCP tools.
1125
- No credits are charged for the blocked retrieval. After confirmed acceptance, call the same
1145
+ terms is a legal act, so an organization admin accepts them in the Firecrawl dashboard, not
1146
+ through MCP. Use the returned `nextTool` call to read the agreement through `firecrawl_scrape`
1147
+ with `alexandria: [{provider: "firecrawl", capability: "terms/show", options: {provider: "<provider>"}}]`,
1148
+ sent separately from provider execution, and present it to the user. An organization admin then
1149
+ accepts it at `requiresAction.url`, or at https://www.firecrawl.dev/app/settings?tab=data-sources.
1150
+ `firecrawl_scrape` refuses every other `terms/*` capability, so it makes no account changes. A request
1151
+ for data is not consent, and no automatic acceptance or uncertain retries occur.
1152
+ No credits are charged for the blocked retrieval. After the admin confirms acceptance, call the same
1126
1153
  tool again with the identical payload and `requestId`.
1127
1154
 
1128
1155
  ### 16. Credit Usage Tool
@@ -1288,7 +1315,7 @@ The existing `firecrawl_feedback` tool accepts `endpoint: "alexandria"`:
1288
1315
  }
1289
1316
  ```
1290
1317
 
1291
- `objective` is the underlying goal of the session: what the agent or its user was ultimately trying to accomplish, beyond the single website in `requestedWebsite`.
1318
+ The optional `objective` is the underlying goal of the session: what the agent or its user was ultimately trying to accomplish, beyond the single website in `requestedWebsite`.
1292
1319
 
1293
1320
  This uses authenticated `POST /v2/feedback`, without a job ID, job-age deadline, or credit refund. Optional `providerFeedback` and `capabilityFeedback` arrays describe coverage gaps and execution issues; the tool schema lists supported issue values. A `new_capability_request` requires `requestedFunctionality`; `missing_capability` (the provider exists but lacks the capability) does not. Existing feedback opt-out and authentication controls apply.
1294
1321