firecrawl-mcp 3.20.0 → 3.20.1

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 (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -187,7 +187,15 @@ const server = new FastMCP({
187
187
  protectedResourceMetadataUrl: getOAuthProtectedResourceMetadataUrl(),
188
188
  },
189
189
  authenticate: async (request) => {
190
- const headerCred = await resolveCredentialFromHeaders(request.headers);
190
+ // FastMCP invokes `authenticate(undefined)` for the stdio transport
191
+ // because there is no HTTP request context. Without this null guard,
192
+ // accessing `request.headers` throws a TypeError, FastMCP silently
193
+ // swallows it, and every subsequent tool call fails with
194
+ // "Unauthorized: API key is required when not using a self-hosted
195
+ // instance" even though `FIRECRAWL_API_KEY` is set in env.
196
+ const headerCred = request?.headers
197
+ ? await resolveCredentialFromHeaders(request.headers)
198
+ : undefined;
191
199
  const envCred = resolveCredentialFromEnv();
192
200
  if (process.env.CLOUD_SERVICE === 'true') {
193
201
  if (!headerCred) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firecrawl-mcp",
3
- "version": "3.20.0",
3
+ "version": "3.20.1",
4
4
  "description": "MCP server for Firecrawl — search, scrape, and interact with the web. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, and LLM-powered content analysis.",
5
5
  "type": "module",
6
6
  "mcpName": "io.github.firecrawl/firecrawl-mcp-server",