Skip to content

Commit 8e0ea0d

Browse files
feat(oauth): spec-compliant MCP OAuth on mcp.firecrawl.dev
2 parents 9b6a8b6 + 16366bf commit 8e0ea0d

6 files changed

Lines changed: 592 additions & 208 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ v1.2.md
2626

2727
# OS
2828
.DS_Store
29-
Thumbs.db
29+
Thumbs.db
30+
.pnpm-store/

README.md

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
187187
- Example: `https://firecrawl.your-domain.com`
188188
- If not provided, the cloud API will be used (requires API key)
189189

190+
#### MCP OAuth (Bearer access tokens)
191+
192+
Hosted Firecrawl can issue 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 …`.
193+
194+
- **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.
195+
- **stdio:** Use `FIRECRAWL_OAUTH_TOKEN` for a static access token, or keep using `FIRECRAWL_API_KEY` for an API key.
196+
197+
Use **access** tokens (`fco_…`) only. Refresh tokens (`fcr_…`) must be exchanged at the token endpoint, not passed to the scrape/search API.
198+
190199
#### Optional Configuration
191200

192201
##### Retry Configuration
@@ -323,16 +332,16 @@ Use this guide to select the right tool for your task:
323332

324333
### Quick Reference Table
325334

326-
| Tool | Best for | Returns |
327-
| ------------ | ----------------------------------- | -------------------------- |
328-
| scrape | Single page content | JSON (preferred) or markdown |
329-
| interact | Interact with a scraped page | Execution result |
330-
| batch_scrape | Multiple known URLs | JSON (preferred) or markdown[] |
331-
| map | Discovering URLs on a site | URL[] |
332-
| crawl | Multi-page extraction (with limits) | markdown/html[] |
333-
| search | Web search for info | results[] |
334-
| agent | Complex multi-source research | JSON (structured data) |
335-
| browser | Interactive multi-step automation (deprecated) | Session with live browser |
335+
| Tool | Best for | Returns |
336+
| ------------ | ---------------------------------------------- | ------------------------------ |
337+
| scrape | Single page content | JSON (preferred) or markdown |
338+
| interact | Interact with a scraped page | Execution result |
339+
| batch_scrape | Multiple known URLs | JSON (preferred) or markdown[] |
340+
| map | Discovering URLs on a site | URL[] |
341+
| crawl | Multi-page extraction (with limits) | markdown/html[] |
342+
| search | Web search for info | results[] |
343+
| agent | Complex multi-source research | JSON (structured data) |
344+
| browser | Interactive multi-step automation (deprecated) | Session with live browser |
336345

337346
### Format Selection Guide
338347

@@ -377,19 +386,21 @@ Scrape content from a single URL with advanced options.
377386
"name": "firecrawl_scrape",
378387
"arguments": {
379388
"url": "https://example.com/product",
380-
"formats": [{
381-
"type": "json",
382-
"prompt": "Extract the product information",
383-
"schema": {
384-
"type": "object",
385-
"properties": {
386-
"name": { "type": "string" },
387-
"price": { "type": "number" },
388-
"description": { "type": "string" }
389-
},
390-
"required": ["name", "price"]
389+
"formats": [
390+
{
391+
"type": "json",
392+
"prompt": "Extract the product information",
393+
"schema": {
394+
"type": "object",
395+
"properties": {
396+
"name": { "type": "string" },
397+
"price": { "type": "number" },
398+
"description": { "type": "string" }
399+
},
400+
"required": ["name", "price"]
401+
}
391402
}
392-
}]
403+
]
393404
}
394405
}
395406
```
@@ -598,7 +609,10 @@ Sends structured feedback on a previous `firecrawl_search` result. The first fee
598609
}
599610
],
600611
"missingContent": [
601-
{ "topic": "Pricing for the search endpoint", "description": "No pricing tier table for /search specifically." },
612+
{
613+
"topic": "Pricing for the search endpoint",
614+
"description": "No pricing tier table for /search specifically."
615+
},
602616
{ "topic": "Per-team rate limits" }
603617
],
604618
"querySuggestions": "Boost docs.firecrawl.dev for queries that mention 'firecrawl'"
@@ -910,15 +924,15 @@ Execute code in a browser session. Supports agent-browser commands (bash), Pytho
910924

911925
**Common agent-browser commands:**
912926

913-
| Command | Description |
914-
|---------|-------------|
915-
| `agent-browser open <url>` | Navigate to URL |
916-
| `agent-browser snapshot` | Accessibility tree with clickable refs |
917-
| `agent-browser click @e5` | Click element by ref from snapshot |
918-
| `agent-browser type @e3 "text"` | Type into element |
919-
| `agent-browser get title` | Get page title |
920-
| `agent-browser screenshot` | Take screenshot |
921-
| `agent-browser --help` | Full command reference |
927+
| Command | Description |
928+
| ------------------------------- | -------------------------------------- |
929+
| `agent-browser open <url>` | Navigate to URL |
930+
| `agent-browser snapshot` | Accessibility tree with clickable refs |
931+
| `agent-browser click @e5` | Click element by ref from snapshot |
932+
| `agent-browser type @e3 "text"` | Type into element |
933+
| `agent-browser get title` | Get page title |
934+
| `agent-browser screenshot` | Take screenshot |
935+
| `agent-browser --help` | Full command reference |
922936

923937
**For Playwright scripting, use Python:**
924938

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dependencies": {
3131
"@mendable/firecrawl-js": "4.24.0",
3232
"dotenv": "^17.2.2",
33-
"firecrawl-fastmcp": "^1.0.4",
33+
"firecrawl-fastmcp": "^1.0.5",
3434
"typescript": "^5.9.2",
3535
"zod": "^4.1.5"
3636
},

0 commit comments

Comments
 (0)