# Run Firecrawl MCP locally (/mcp-server/local)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 794 · updated: 2026-07-30 -->
Related: [Set up Firecrawl MCP in a client](/mcp-server/clients.md), [Connect Firecrawl MCP](/mcp-server/connect.md), [Develop Firecrawl MCP](/mcp-server/development.md), [Firecrawl MCP tools and operations](/mcp-server/tools.md)

## Prerequisites [#prerequisites]

* Node.js 22 or newer
* npm and `npx`, included with Node.js
* A Firecrawl API key for the cloud API, or a self-hosted Firecrawl API URL

Confirm the installed Node.js version:

```bash
node --version
```

## Run over stdio [#run-over-stdio]

```bash
env FIRECRAWL_API_KEY=fc-YOUR_API_KEY npx -y firecrawl-mcp@3.23.0
```

This is the default transport for clients that launch the MCP server as a local process.

## Run with Streamable HTTP [#run-with-streamable-http]

Use HTTP transport for clients such as n8n that connect to an already-running MCP server:

```bash
env HTTP_STREAMABLE_SERVER=true \
  FIRECRAWL_API_KEY=fc-YOUR_API_KEY \
  npx -y firecrawl-mcp@3.23.0
```

Connect the client to:

```text
http://localhost:3000/mcp
```

Confirm the server is ready:

```bash
curl http://localhost:3000/health
```

The health check returns `ok`. The local route is `/mcp`; `/v2/mcp` is the hosted Firecrawl route.

## Install globally [#install-globally]

```bash
npm install -g firecrawl-mcp@3.23.0
```

Then run:

```bash
env FIRECRAWL_API_KEY=fc-YOUR_API_KEY firecrawl-mcp
```

## Configuration [#configuration]

### Environment Variables [#environment-variables]

#### Cloud and self-hosted API [#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 [#configuration-examples]

For cloud API usage:

```bash
export FIRECRAWL_API_KEY=your-api-key
```

For self-hosted instance:

```bash
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 [#custom-configuration-with-claude-desktop]

Add this to your `claude_desktop_config.json`:

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

### Hosted MCP vs local MCP [#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 Search, Scrape, and Parse 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.

<Note>
  Direct local-file parsing with `firecrawl_parse` requires `FIRECRAWL_API_URL` pointing to a self-hosted Firecrawl API. A local MCP server configured only with a cloud API key cannot upload a local file through that tool.
</Note>

### Rate Limiting [#rate-limiting]

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