firecrawl-mcp 3.28.1 → 3.29.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 +93 -4
- package/dist/index.js +3384 -3109
- package/dist/introspection-cache.js +1 -1
- package/dist/server.d.ts +404 -0
- package/dist/server.js +5879 -0
- package/dist/www-authenticate.js +1 -1
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -83,9 +83,6 @@ https://mcp.firecrawl.dev/v2/mcp-search
|
|
|
83
83
|
|
|
84
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
|
-
For packaged MCP workflows in ChatGPT, Codex, or Claude Code, see
|
|
87
|
-
[MCP plugin packages](plugins/README.md).
|
|
88
|
-
|
|
89
86
|
### Running with npx
|
|
90
87
|
|
|
91
88
|
```bash
|
|
@@ -169,6 +166,41 @@ env HTTP_STREAMABLE_SERVER=true FIRECRAWL_API_KEY=fc-YOUR_API_KEY npx -y firecra
|
|
|
169
166
|
|
|
170
167
|
Use the url: http://localhost:3000/mcp
|
|
171
168
|
|
|
169
|
+
### Running with Docker
|
|
170
|
+
|
|
171
|
+
The `ghcr.io/firecrawl/firecrawl-mcp-server` image runs the same server as `npx -y firecrawl-mcp`. Every build from `main` is tagged `latest`, `v<package version>` and `sha-<commit sha>`. `v<package version>` moves to the newest build of that version, so pin `sha-<commit sha>` (or a digest) when you need a fixed image.
|
|
172
|
+
|
|
173
|
+
stdio (the default), for MCP clients that launch the server as a command:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
docker run -i --rm -e FIRECRAWL_API_KEY=fc-YOUR_API_KEY ghcr.io/firecrawl/firecrawl-mcp-server:latest
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"mcpServers": {
|
|
182
|
+
"firecrawl-mcp": {
|
|
183
|
+
"command": "docker",
|
|
184
|
+
"args": ["run", "-i", "--rm", "-e", "FIRECRAWL_API_KEY", "ghcr.io/firecrawl/firecrawl-mcp-server:latest"],
|
|
185
|
+
"env": {
|
|
186
|
+
"FIRECRAWL_API_KEY": "YOUR_API_KEY"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Streamable HTTP, served at `http://localhost:3000/mcp`:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
docker run --rm -p 127.0.0.1:3000:3000 \
|
|
197
|
+
-e HTTP_STREAMABLE_SERVER=true \
|
|
198
|
+
-e FIRECRAWL_API_KEY=fc-YOUR_API_KEY \
|
|
199
|
+
ghcr.io/firecrawl/firecrawl-mcp-server:latest
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The image sets `HOST=0.0.0.0` and `PORT=3000`; override `PORT` (and the `-p` mapping) to listen elsewhere. The server uses the container's `FIRECRAWL_API_KEY` for requests that don't send their own credential, so the example publishes the port on `127.0.0.1` only; don't expose it more widely unless clients must supply their own key. Set `FIRECRAWL_API_URL` to use a self-hosted Firecrawl API. The container runs as the unprivileged `node` user.
|
|
203
|
+
|
|
172
204
|
### Installing via Smithery (Legacy)
|
|
173
205
|
|
|
174
206
|
To install Firecrawl for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@mendableai/mcp-server-firecrawl):
|
|
@@ -1159,6 +1191,63 @@ The tool requires an authenticated Firecrawl account and is read-only.
|
|
|
1159
1191
|
- `firecrawl_credit_usage` defaults to `{ "view": "current" }` and returns `remainingCredits`, `planCredits`, `billingPeriodStart`, and `billingPeriodEnd`. Remaining credits can exceed plan credits when the team has top-ups or grants.
|
|
1160
1192
|
- Pass `{ "view": "historical" }` for calendar-month periods containing `startDate`, `endDate`, and `creditsUsed`. Passing `{ "byApiKey": true }` also selects the historical view and splits periods by API key; each row then includes `apiKey`. Do not combine `byApiKey` with `{ "view": "current" }`. The latest period's `endDate` can be null.
|
|
1161
1193
|
|
|
1194
|
+
## Programmatic use (unstable)
|
|
1195
|
+
|
|
1196
|
+
The package also exposes a library entry point for embedding the server in another runtime. It is **unstable**: the API, its options and its types may change in any release, including minor and patch releases, so pin an exact version.
|
|
1197
|
+
|
|
1198
|
+
```sh
|
|
1199
|
+
npm install --save-exact firecrawl-mcp zod
|
|
1200
|
+
```
|
|
1201
|
+
|
|
1202
|
+
The example defines tool parameters with `zod`, so the embedding project installs it as its own dependency.
|
|
1203
|
+
|
|
1204
|
+
```js
|
|
1205
|
+
import { createFirecrawlMcpServer } from 'firecrawl-mcp/server';
|
|
1206
|
+
import { z } from 'zod';
|
|
1207
|
+
|
|
1208
|
+
const server = createFirecrawlMcpServer({
|
|
1209
|
+
transport: 'httpStream',
|
|
1210
|
+
apiKey: process.env.FIRECRAWL_API_KEY,
|
|
1211
|
+
unstable_hooks: {
|
|
1212
|
+
registerExtraTools: (registrar) => {
|
|
1213
|
+
registrar.addTool({
|
|
1214
|
+
name: 'my_tool',
|
|
1215
|
+
description: 'An extra tool served next to the Firecrawl tools.',
|
|
1216
|
+
parameters: z.object({ text: z.string() }),
|
|
1217
|
+
execute: async ({ text }) => text,
|
|
1218
|
+
});
|
|
1219
|
+
},
|
|
1220
|
+
},
|
|
1221
|
+
});
|
|
1222
|
+
|
|
1223
|
+
await server.start({
|
|
1224
|
+
transportType: 'httpStream',
|
|
1225
|
+
httpStream: { port: 3000, host: '127.0.0.1', endpoint: '/mcp', stateless: true },
|
|
1226
|
+
});
|
|
1227
|
+
// MCP endpoint: http://127.0.0.1:3000/mcp
|
|
1228
|
+
```
|
|
1229
|
+
|
|
1230
|
+
Set `host` explicitly. Without it the server listens on `localhost`, which Node binds to a single address (often only `::1`), so requests to `127.0.0.1` are refused. Use `0.0.0.0` or `::` to accept connections from other machines only behind network access controls or an `unstable_hooks.authenticate` check: without one, every caller that can reach the port is served with the configured `apiKey`.
|
|
1231
|
+
|
|
1232
|
+
Options mirror the CLI's environment variables: `apiUrl`, `apiKey`, `transport`, `logging`, `safeMode`, `fileAccess` (`local` or `upload`), `requireCredential`, `searchFeedback` and `endpointFeedback`. `unstable_hooks` accepts:
|
|
1233
|
+
|
|
1234
|
+
| Hook | Purpose |
|
|
1235
|
+
|---|---|
|
|
1236
|
+
| `authenticate(request)` | Resolve the session for a request; throw a `Response` to reject it. |
|
|
1237
|
+
| `wrapTool(tool)` | Decorate every registered tool. |
|
|
1238
|
+
| `onToolResult(event)` | Observe the start and outcome of each tool call, with any API agent hints. |
|
|
1239
|
+
| `instructions` | Server instructions, or a function choosing from the defaults. |
|
|
1240
|
+
| `registerExtraTools(registrar, context)` | Add tools after the built-in ones. |
|
|
1241
|
+
| `outboundRequest(session)` | Credential and extra headers for each Firecrawl API request. |
|
|
1242
|
+
| `beforeKeylessRequest(session, origin)` | Refuse a keyless request by throwing. |
|
|
1243
|
+
| `toolFilter(name)` | Leave built-in tools out of the instance. |
|
|
1244
|
+
| `configureHttp(app)` | Add HTTP routes. |
|
|
1245
|
+
| `oauth.protectedResource` | Serve OAuth protected-resource metadata. |
|
|
1246
|
+
|
|
1247
|
+
FastMCP is bundled inside the package, so use the types exported from `firecrawl-mcp/server` (`Session`, `ToolDefinition`, `ToolRegistrar`, `FirecrawlMcpServerHooks` and others) rather than importing `fastmcp` yourself.
|
|
1248
|
+
|
|
1249
|
+
The entry point also exports the helpers the built-in tools use, such as `recoveryPayload`, `normalizeHeader`, `requestOrigin`, `searchToolBaseFields`, `searchOutputSchema` and `structuredCompact`, so extra tools and hooks can match the built-in behaviour. They are unstable as well.
|
|
1250
|
+
|
|
1162
1251
|
## Logging System
|
|
1163
1252
|
|
|
1164
1253
|
The server includes comprehensive logging:
|
|
@@ -1317,6 +1406,6 @@ The existing `firecrawl_feedback` tool accepts `endpoint: "alexandria"`:
|
|
|
1317
1406
|
|
|
1318
1407
|
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`.
|
|
1319
1408
|
|
|
1320
|
-
This uses authenticated `POST /v2/feedback`, without a job ID.
|
|
1409
|
+
This uses authenticated `POST /v2/feedback`, without a job ID. It must arrive within 20 minutes of the team's most recent Alexandria search, discovery, or execution; later feedback is rejected with `FEEDBACK_WINDOW_EXPIRED`. Eligible feedback can refund 1 credit, subject to daily caps of 10 credits per website and 100 credits per team (UTC day). Past either cap, feedback is still recorded with no refund, and the response sets `websiteCapReached` or `dailyCapReached`. 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.
|
|
1321
1410
|
|
|
1322
1411
|
Eligible Alexandria execution and discovery results include a `feedbackTool` pointer with the tool name and a skeleton of the arguments. The pointer is omitted for Firecrawl-internal calls such as `bash` and when `firecrawl_feedback` is not registered (`FIRECRAWL_NO_ENDPOINT_FEEDBACK` or keyless startup).
|