Skip to content
Firecrawl Docsv2
Firecrawl Docs
Agent Harnesses

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:

{
  "$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

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)

{
  "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; keep API keys in an Authorization header or secure-secret store, never in a URL.

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).
Was this page helpful?Suggest editsRaise issue