# MCP Web Search & Scrape in OpenCode (/quickstarts/opencode)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 470 · updated: 2026-07-30 -->
Related: [Node.js](/quickstarts/nodejs.md), [Next.js](/quickstarts/nextjs.md), [Express](/quickstarts/express.md), [NestJS](/quickstarts/nestjs.md), [Fastify](/quickstarts/fastify.md), [Hono](/quickstarts/hono.md)

Add Firecrawl's search, scrape, crawl, and browser tools to [OpenCode](https://opencode.ai) via MCP.

## Quick Setup [#quick-setup]

### 1. Get Your API Key [#1-get-your-api-key]

Sign up at [firecrawl.dev/app](https://www.firecrawl.dev/app) and copy your API key.

### 2. Add Firecrawl to OpenCode [#2-add-firecrawl-to-opencode]

OpenCode reads config from `~/.config/opencode/config.json` (global) or `./opencode.json` in your project. Add:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "firecrawl": {
      "type": "local",
      "command": ["npx", "-y", "firecrawl-mcp"],
      "environment": {
        "FIRECRAWL_API_KEY": "fc-YOUR-API-KEY"
      }
    }
  }
}
```

Replace `fc-YOUR-API-KEY` with your Firecrawl API key.

### 3. Start OpenCode [#3-start-opencode]

```bash
opencode
```

OpenCode loads MCP servers on startup. Confirm Firecrawl is attached:

```
/mcp
```

## Quick Demo [#quick-demo]

```
Search the web for "Bun 2.0 changelog" and summarize the top results.
```

```
Scrape https://docs.firecrawl.dev/introduction and list the code examples.
```

```
Crawl https://example.com/blog and save each post as markdown.
```

## Remote Hosted URL (no Node.js required) [#remote-hosted-url-no-nodejs-required]

```json
{
  "mcp": {
    "firecrawl": {
      "type": "remote",
      "url": "https://mcp.firecrawl.dev/v2/mcp"
    }
  }
}
```

This configuration uses the keyless Firecrawl toolset. For an account-connected or unattended setup, follow the [hosted MCP connection modes](/developer-guides/mcp-setup-guides/oauth); keep API keys in an Authorization header or secure-secret store, never in a URL.

## Troubleshooting [#troubleshooting]

* **Server not attached** — run `opencode doctor` to inspect MCP load errors.
* **Permission denied on `npx`** — install Node.js 18+ and ensure your shell picks up the install (`which npx`).
