Skip to content

MCP Web Search & Scrape in OpenCode

Add Firecrawl web scraping and search to OpenCode

Add Firecrawl's search, scrape, crawl, and browser tools to OpenCode via MCP.

Quick Setup

1. Get Your API Key

Sign up at firecrawl.dev/app and copy your API key.

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

bash
opencode

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

/mcp

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)

json
{
"mcp": {
  "firecrawl": {
    "type": "remote",
    "url": "https://mcp.firecrawl.dev/fc-YOUR-API-KEY/v2/mcp"
  }
}
}

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