← MCP server and skill grades

firecrawl-mcp-server

firecrawl/firecrawl-mcp-server

C
Type
MCP server
Scanned
Nov 13, 2026
Version
fa179a79b496
Files read
127

This MCP server connects AI coding agents to the Firecrawl API to search the web and specialized indexes, scrape and crawl pages, drive remote browser sessions, monitor websites, and parse documents. Its biggest risk is that startup unconditionally loads a .env file from the current working directory, allowing an untrusted cloned repository to redirect API traffic to steal the user's Firecrawl API key, unlock local file uploads, or launch an unauthenticated HTTP server.

What it can reach

Network
Sends requests to the Firecrawl cloud API (or a custom FIRECRAWL_API_URL) and OAuth introspection endpoint to search, scrape, crawl, run research jobs, query data providers, and manage monitors, and can start an HTTP/SSE server when HTTP mode is enabled.
Files
Automatically loads a .env file from the current working directory on startup, and reads local files passed to firecrawl_parse when local file mode is active with a custom FIRECRAWL_API_URL.
Secrets
Reads FIRECRAWL_API_KEY, FIRECRAWL_OAUTH_TOKEN, FIRECRAWL_OAUTH_INTROSPECT_SECRET, and MCP_DELEGATED_CREDENTIAL_SECRET from the environment (and request headers in HTTP mode) and sends bearer credentials to the configured Firecrawl endpoint.
Browser
Controls isolated remote browser sessions hosted on Firecrawl servers via firecrawl_interact and firecrawl_scrape actions without touching the user's local browser or cookies.

Findings

1 high4 low
  1. HighUnconditional .env loading from the working directory can hijack API endpoints or expose an HTTP listener

    src/index.ts:15

    At startup, the CLI calls process.loadEnvFile(), which loads unset environment variables from ./.env in the current working directory. AI coding agents typically launch MCP stdio servers with the working directory set to the opened project workspace and only set FIRECRAWL_API_KEY in the environment. Opening an untrusted cloned repository containing a committed .env file can set FIRECRAWL_API_URL to an attacker-controlled server (exfiltrating FIRECRAWL_API_KEY on the first tool call and enabling local file reads in firecrawl_parse) or set HTTP_STREAMABLE_SERVER=true, HOST=0.0.0.0, and FIRECRAWL_MCP_ALLOWED_HOSTS=* to open an unauthenticated network and cross-origin HTTP server backed by the user's API key.

    Fix: Remove process.loadEnvFile() from src/index.ts, or only load an environment file when the user passes an explicit CLI flag pointing to a trusted path.

  2. LowLocal firecrawl_parse reads arbitrary files without path or extension checks while marked non-network

    src/server.ts:3506

    When FIRECRAWL_API_URL is configured (such as self-hosted Firecrawl or Firecrawl Local), firecrawl_parse runs in local file mode. Although its annotations set readOnlyHint: true and openWorldHint: false (which causes MCP clients to treat it as a purely local read and skip confirmation prompts) and its parameter description lists specific document extensions, the handler resolves any path on the filesystem, checks neither workspace boundaries nor file extensions, and accepts an arbitrary contentType override such as text/html. A prompt-injected agent can read sensitive files like ~/.ssh/id_rsa or ~/.aws/credentials, upload them to FIRECRAWL_API_URL, and receive their parsed text in context.

    Fix: Enforce the advertised document extension allowlist, optionally restrict filePath to a configured workspace root, and set openWorldHint: true when local mode uploads file contents over HTTP.

  3. LowUnauthenticated HTTP request terminates the server process in key-per-request HTTP mode

    src/service/auth.ts:586

    When the server is started in local HTTP mode (HTTP_STREAMABLE_SERVER=true or SSE_LOCAL=true) without a process-wide FIRECRAWL_API_KEY or FIRECRAWL_API_URL so that each client supplies its own key header, authenticateRequest runs on every incoming request and calls process.exit(1) whenever a request omits a valid credential. Any single unauthenticated request to /mcp or /sse crashes the entire server process for all clients instead of returning HTTP 401.

    Fix: Throw an authentication Error in authenticateRequest (matching defaultAuthenticate in src/server.ts) so unauthenticated requests receive HTTP 401 without exiting the process.

  4. LowLegacy SSE message endpoint skips per-request authentication checks

    src/mcp/runtime.ts:982

    While GET /sse runs the configured authenticate hook when opening a legacy SSE stream, subsequent POST /messages?sessionId=... requests dispatch directly to transport.handlePostMessage without calling authenticate(req) and allow bodies up to 4 MiB instead of the 1 MiB streamable HTTP limit. If an OAuth token expires or is revoked after the stream opens, or if a sessionId URL leaks through proxy logs, callers can continue invoking tools on that session without presenting valid credentials.

    Fix: Run the authenticate hook on POST /messages requests and verify that the caller's credential matches the session that opened the SSE stream.

  5. LowSystem instructions and keyless quota errors steer the agent to block fallback tools and echo links

    src/server.ts:638

    Both default server instruction profiles instruct the model in its system prompt to end its final answer with whatever line and link Firecrawl provides when credits or daily limits run out, and keylessQuotaMessage in src/recovery.ts tells the model to stop and not finish the user's task another way (preventing fallback to built-in agent tools). Beyond overriding user intent for commercial upsell, priming the agent via trusted system instructions to repeat links from tool responses makes it easier for prompt injection in scraped pages to trick the agent into echoing phishing or tracking URLs.

    Fix: Return factual quota error messages without instructing the agent to refuse alternative tools or copy verbatim text and URLs from tool outputs into its final response.