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

# Run Firecrawl MCP locally

> Install and configure the local Firecrawl MCP server.

## Run locally

```bash theme={null}
env FIRECRAWL_API_KEY=fc-YOUR_API_KEY npx -y firecrawl-mcp@3.22.4
```

## Install globally

```bash theme={null}
npm install -g firecrawl-mcp
```

## Configuration

### Environment Variables

#### Cloud and self-hosted API

* `FIRECRAWL_API_KEY`: Your Firecrawl API key
  * Required when using cloud API (default)
  * Optional when using self-hosted instance with `FIRECRAWL_API_URL`
* `FIRECRAWL_API_URL` (Optional): Custom API endpoint for self-hosted instances
  * Example: `https://firecrawl.your-domain.com`
  * If not provided, the cloud API will be used (requires API key)

### Configuration Examples

For cloud API usage:

```bash theme={null}
export FIRECRAWL_API_KEY=your-api-key
```

For self-hosted instance:

```bash theme={null}
export FIRECRAWL_API_URL=https://firecrawl.your-domain.com
export FIRECRAWL_API_KEY=your-api-key  # If your instance requires auth
```

### Custom configuration with Claude Desktop

Add this to your `claude_desktop_config.json`:

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

### Hosted MCP vs local MCP

The hosted MCP server is optimized for safe remote use. Some options that are available when running the MCP server locally are narrowed or unavailable remotely:

* Hosted keyless mode exposes only the keyless-supported tools and is rate-limited per IP.
* Local-only file reads are available only when you run the MCP server locally.
* Webhooks and local file paths should be configured from a local or self-hosted MCP server when the agent needs access to local resources.

### Rate Limiting

Rate limits are enforced by Firecrawl. Use an API key for higher limits and access to the full tool set.
