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

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

> 为 Qodo Command 添加 Firecrawl 网页搜索与抓取功能

将 Firecrawl 添加到 Qodo Command，让你的 Qodo 智能体能够进行网页搜索并读取页面内容。Qodo Command 会使用你的 API 密钥，以本地进程的形式启动 Firecrawl MCP 服务器。

<Note>
  Qodo 将于 2026 年 10 月 30 日停用其 IDE 插件，并将本地工作流迁移到你正在使用的编程代理中。本页介绍的是 Qodo Command，它会从项目文件中读取 MCP 服务器配置。
</Note>

<h2 id="requirements">
  前提条件
</h2>

* Qodo Command：使用 `npm install -g @qodo/command` 安装，并通过 `qodo login` 登录。
* Node.js 22 或更高版本。
* [Firecrawl API 密钥](https://www.firecrawl.dev/app/api-keys)。

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

1. 在项目根目录下创建 `mcp.json`：

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

2. 创建 `agents/research.toml`，并按名称为该智能体授予该服务器的访问权限：

```toml theme={null}
version = "1.0"

[commands.research]
description = "Research a topic on the web with Firecrawl"
instructions = """
Use the Firecrawl tools to search the web and read pages, then summarize the sources.
"""
tools = ["firecrawl"]
execution_strategy = "act"
```

3. 从项目根目录的 `agent.toml` 导入智能体：

```toml theme={null}
version = "1.0"

imports = ["agents/research.toml"]
```

4. 运行智能体并列出可用工具：

```bash theme={null}
qodo list-mcp
qodo research "Find the latest release notes for Node.js"
```

请勿将 `mcp.json` 提交到版本控制系统，因为其中包含你的 API 键。完整的环境变量列表请参见 [在本地运行 MCP](/zh/mcp-server/local)。

<h2 id="try-it">
  立即试用
</h2>

```text theme={null}
进行网页搜索，查找最新的 Go 版本发布说明，并汇总各信息来源的内容。
```

```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>

* **`list-mcp` 未显示 Firecrawl 条目：** 确认 `mcp.json` 位于项目根目录，或传入 `--mcp-file=path`。
* **智能体始终不调用 Firecrawl：** 检查智能体文件中的 `tools` 是否包含 `"firecrawl"`，且与 `mcp.json` 中的键一致。
* **服务器无法启动：** 运行 `node --version`，确认输出的版本为 22 或更高。
* **服务器返回 `401`：** 替换 `mcp.json` 中 `FIRECRAWL_API_KEY` 的值。


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