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

# Amp 中的 MCP 网页搜索与抓取

> 将 Firecrawl 的网页抓取和搜索功能添加到 Sourcegraph Amp

通过 MCP 为 [Sourcegraph Amp](https://ampcode.com) 添加 Firecrawl 的搜索、抓取、爬取和浏览器工具。

<div id="quick-setup">
  ## 快速开始
</div>

<div id="1-get-your-api-key">
  ### 1. 获取你的 API 密钥
</div>

在 [firecrawl.dev/app](https://www.firecrawl.dev/app) 注册并复制你的 API 密钥。

<div id="2-add-firecrawl-to-amp">
  ### 2. 在 Amp 中添加 Firecrawl
</div>

打开 Amp 的设置并添加一个 MCP Server。Amp 支持标准的 MCP 配置：

```json theme={null}
{
  "amp.mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "fc-YOUR-API-KEY"
      }
    }
  }
}
```

将 `fc-YOUR-API-KEY` 替换为你的 Firecrawl API 密钥。

<div id="3-reload-amp">
  ### 3. 重新加载 Amp
</div>

重新加载 Amp 窗口。Firecrawl 工具现已在代理中可用。

<div id="quick-demo">
  ## 快速演示
</div>

```
进行网页搜索，查找"Sourcegraph Cody vs Amp"并总结两者的区别。
```

```
抓取 https://docs.firecrawl.dev and list the core endpoints.
```

```
爬取 https://example.com and output a site map as JSON.
```

<div id="remote-hosted-url-no-nodejs-required">
  ## 远程托管 URL (无需 Node.js)
</div>

```json theme={null}
{
  "amp.mcpServers": {
    "firecrawl": {
      "url": "https://mcp.firecrawl.dev/fc-YOUR-API-KEY/v2/mcp"
    }
  }
}
```

<div id="troubleshooting">
  ## 故障排查
</div>

* **服务器无法启动** — 在 Amp 的 MCP 日志视图中查看 stderr 输出。
* **缺少 `npx`** — 安装 Node.js 18+，或使用上方的远程托管 URL。
