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

# 在 Kiro 中使用 MCP 网页搜索与抓取

> 为 Kiro IDE 和 Kiro CLI 添加 Firecrawl 网页搜索与抓取功能

通过远程托管的 MCP 服务器将 Firecrawl 连接到 Kiro。Kiro 会自动为你完成浏览器登录，无需手动注册。Kiro IDE 和 Kiro CLI 共用同一个配置文件。

<Note>
  Kiro CLI 取代了 Amazon Q Developer CLI。如果你之前使用过 `q`，本页内容同样适用。
</Note>

<h2 id="quick-setup">
  快速配置
</h2>

1. 打开用户级配置文件 `~/.kiro/settings/mcp.json`。在 IDE 中，可通过命令面板运行 **Kiro: Open user MCP config (JSON)**。如果只需为单个项目配置，请改用工作区中的 `.kiro/settings/mcp.json`。
2. 添加 Firecrawl 并保存文件：

```json theme={null}
{
  "mcpServers": {
    "firecrawl": {
      "url": "https://mcp.firecrawl.dev/v2/mcp-oauth"
    }
  }
}
```

3. 保存后，Kiro 会重新连接，并在浏览器中打开 Firecrawl 授权页面。登录并批准访问。
4. 在 Kiro 面板中打开 MCP 服务器选项卡，或运行 `kiro-cli mcp status --name firecrawl`，确认 Firecrawl 的工具已可用。

<Accordion title="想改用 API 密钥？">
  Kiro 中的远程服务器支持配置标头。在 shell 中导出 `FIRECRAWL_API_KEY`，然后使用以下配置：

  ```json theme={null}
  {
    "mcpServers": {
      "firecrawl": {
        "url": "https://mcp.firecrawl.dev/v2/mcp",
        "headers": {
          "Authorization": "Bearer ${FIRECRAWL_API_KEY}"
        }
      }
    }
  }
  ```

  Kiro 只会展开你已批准的环境变量。当它针对 `FIRECRAWL_API_KEY` 显示安全警告时，请批准，或在设置中将其添加到 **Mcp Approved Env Vars** 下。
</Accordion>

<Accordion title="想改用 CLI？">
  ```bash theme={null}
  kiro-cli mcp add --name firecrawl --url https://mcp.firecrawl.dev/v2/mcp-oauth --scope global
  ```
</Accordion>

更多详情请参见 [OAuth 连接指南](/zh/mcp-server/oauth)。如需在无人值守场景中使用，请[配置 API 密钥](/zh/mcp-server/keyless#add-an-api-key)。

<h2 id="try-it">
  试一试
</h2>

```text theme={null}
进行网页搜索，查找最新的 Rust 版本发布说明，并对这些信息来源进行总结。
```

```text theme={null}
抓取 https://firecrawl.dev 并说明它的功能。
```

<h2 id="what-you-can-do">
  你可以用它做什么
</h2>

<CardGroup cols={2}>
  <Card title="搜索" icon="magnifying-glass" href="/zh/features/search">
    查找最新信息，并读取相关结果的内容。
  </Card>

  <Card title="抓取" icon="file-lines" href="/zh/features/scrape">
    将 URL 转换为干净的 markdown 或结构化数据。
  </Card>

  <Card title="交互" icon="hand-pointer" href="/zh/features/interact">
    通过页面导航、点击和表单填写，获取所需数据。
  </Card>

  <Card title="Alexandria" icon="books" href="/zh/features/alexandria">
    发现结构化数据工具，查看其输入参数和定价，然后通过 Firecrawl 运行这些工具。
  </Card>
</CardGroup>

<h2 id="troubleshooting">
  故障排除
</h2>

* **MCP 支持未开启：**在 IDE 中按 `Cmd/Ctrl + ,` 打开设置，搜索“MCP”并将其启用。
* **服务器无法连接：**确认 URL 与 `https://mcp.firecrawl.dev/v2/mcp-oauth` 完全一致，然后重新保存文件以触发重连。
* **出现 OAuth scope 错误：**在该服务器条目中添加 `"oauth": { "oauthScopes": [] }`。
* **工作区文件和用户文件都定义了 `firecrawl`：**Kiro 会合并两者，并以工作区文件为准。只保留一个条目即可。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.