> ## 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 Pi

> Add Firecrawl web scraping and search to the Pi coding agent

Add Firecrawl's Search, Scrape, Crawl, and Map tools to [Pi](https://pi.dev) through the hosted MCP server.

## Quick setup

[Create a Firecrawl API key](https://www.firecrawl.dev/app/api-keys), then export it so Pi can read it:

```bash theme={null}
export FIRECRAWL_API_KEY=fc-YOUR_API_KEY
```

Add the server with Pi's built-in MCP command:

```bash theme={null}
pi mcp add firecrawl --url https://mcp.firecrawl.dev/v2/mcp --bearer-token-env-var FIRECRAWL_API_KEY
```

This writes the entry to `~/.pi/agent/mcp.json`. You can also paste it yourself, or put it in `.pi/mcp.json` for one project:

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

Run `pi mcp list` and confirm that `firecrawl` shows as connected with its tools, such as `firecrawl_search` and `firecrawl_scrape`. Then start `pi`; run `/reload` if a session was already open.

If you use [pi-mcp-adapter](https://github.com/nicobailon/pi-mcp-adapter), put the same entry in `~/.config/mcp/mcp.json` (or `.mcp.json` in a project) and run `pi-mcp-adapter doctor` to check the connection.

### Run it locally instead

To run the MCP server on your machine, add it as a stdio server:

```bash theme={null}
pi mcp add firecrawl --env FIRECRAWL_API_KEY='${FIRECRAWL_API_KEY}' -- npx -y firecrawl-mcp
```

## Try it

```text theme={null}
Search the web for the latest Bun release notes and summarize the sources.
```

```text theme={null}
Scrape https://firecrawl.dev and explain what it does.
```

## Troubleshooting

* **Server shows as failed:** run `pi mcp list` and check that `FIRECRAWL_API_KEY` is exported in the same shell that starts Pi.
* **Tools do not appear in an open session:** run `/reload` after adding or changing a server outside the session.
* **Pi's MCP command is missing:** update Pi to a current release, or use pi-mcp-adapter with the config above.


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