> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firecrawl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Web Search & Scrape in MCPorter

> Add Firecrawl web scraping and search to MCPorter, the TypeScript MCP runtime and CLI

Connect [MCPorter](https://mcporter.sh), a TypeScript runtime and CLI for MCP servers, to Firecrawl through the hosted MCP server.

## Quick setup

[Create a Firecrawl API key](https://www.firecrawl.dev/app/api-keys) and export it:

```bash theme={null}
export FIRECRAWL_API_KEY="fc-YOUR-API-KEY"
```

Add Firecrawl to `config/mcporter.json` in your project, or to `~/.mcporter/mcporter.json` to use it everywhere:

```json theme={null}
{
  "mcpServers": {
    "firecrawl": {
      "baseUrl": "https://mcp.firecrawl.dev/v2/mcp",
      "headers": { "Authorization": "Bearer ${FIRECRAWL_API_KEY}" }
    }
  }
}
```

MCPorter replaces `${FIRECRAWL_API_KEY}` from your environment, so the key stays out of the file. Confirm the connection:

```bash theme={null}
npx mcporter list firecrawl
```

Prefer a local process? Use the stdio form instead:

```json theme={null}
{
  "mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": { "FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}" }
    }
  }
}
```

## Try it

```bash theme={null}
npx mcporter call firecrawl.firecrawl_scrape url=https://firecrawl.dev 'formats=["markdown"]'
```

The command prints the page as markdown. Use the same entry from code with `createRuntime` (see the [MCPorter docs](https://mcporter.sh)).

## Troubleshooting

* **Server not found:** run `npx mcporter config list` to see which config file MCPorter loaded; `--config <file>` or `MCPORTER_CONFIG` selects one file only.
* **Authentication errors:** MCPorter rejects the `${env:VAR}` form; write the placeholder as `${FIRECRAWL_API_KEY}` and check the variable is exported in the same shell.
* **Tool arguments are rejected:** pass JSON values quoted for your shell, as in the `formats` example above.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.