Skip to content

Firecrawl

Build an authenticated xmcp integration with Firecrawl's web scraping REST API.

For the complete documentation index, see llms.txt. Markdown variants of every page are available by appending .md to the URL.

Use Firecrawl inside xmcp tools to give agents access to web page content. The runnable example uses Node's built-in fetch with Firecrawl's REST API, without an additional SDK.

Start from the Firecrawl MCP server template for setup instructions and a runnable workflow.

Configure access

Create an API key in your Firecrawl dashboard, then configure the server:

Shell

Clients connect to the example's HTTP MCP endpoint with x-api-key on every request. The server forwards only the provider key to https://api.firecrawl.dev as a Bearer token. Follow the example setup to install, build, and start it with Node 22 and pnpm.

This example shares one Firecrawl account with trusted clients. Calls consume that account's credits and send the requested URLs and extraction instructions to Firecrawl. Add per-user authorization and quotas if your application needs them.

Available tools

ToolPurpose
scrape-pageReturn a page as Markdown, with available metadata.
extract-page-summaryExtract title, description, headings, and topics using JSON mode.
map-siteDiscover site URLs, optionally ordered by relevance to a query.

Call scrape-page with:

JSON

The scrape API returns data.markdown and optional data.metadata inside a success: true envelope. The tool returns that JSON in MCP text content. onlyMainContent defaults to true; set it to false to include navigation and footers. URLs must use HTTP(S) without embedded credentials.

Extract structured page facts

Call extract-page-summary with the same url, without onlyMainContent. It uses Firecrawl JSON mode with a schema for title, description, headings, and topics. Results appear in data.json; missing titles/descriptions are nullable, and missing headings/topics use empty arrays.

These fields are model-generated and need review against the source. The example extracts page facts without assigning SEO scores. An agent can use it alongside the Profound integration to inspect cited pages and compare their content with your own.

Map a site

Call map-site with:

JSON

The map API returns links containing URLs and optional titles/descriptions. search is optional and orders results by relevance, rather than strictly filtering them. The example defaults to 20 results and excludes subdomains; limit accepts 1–100.

Mapping does not return every page's content. Choose a discovered URL and call scrape-page explicitly. No background crawls or follow-up scrapes run automatically.

Errors and testing

Missing or incorrect MCP credentials return HTTP 401. Provider failures return isError: true, with HTTP status codes when available and no raw provider error bodies. Rate-limit errors include numeric Retry-After values when supplied. Requests time out after 75 seconds, allowing Firecrawl's default scrape budget plus network overhead; set your MCP client's timeout accordingly. There are no automatic retries.

The example builds without credentials. Its tests mock provider requests, and its built-server smoke test checks initialization, discovery, authentication, and all three tools. Follow the README walkthrough for a live request with your own key.

One framework to rule them all