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

# 在 JetBrains AI Assistant 中使用 MCP 网页搜索与抓取

> 为 JetBrains AI Assistant 添加 Firecrawl 网页搜索与抓取功能

将 Firecrawl 添加到 IntelliJ IDEA、PyCharm、WebStorm 及其他 JetBrains IDE 的 AI Assistant 中。AI Assistant 会使用你的 API 密钥，以本地进程的方式启动 Firecrawl MCP 服务器。

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

* 安装了 AI Assistant 2025.1 或更高版本的 JetBrains IDE。MCP 客户端支持从该版本开始提供。
* `PATH` 中可用的 Node.js 22 或更高版本，因为该服务器通过 `npx` 运行。
* 一个 [Firecrawl API 密钥](https://www.firecrawl.dev/app/api-keys)。

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

1. 依次打开 **设置** > **Tools** > **AI Assistant** > **模型上下文协议 (MCP) **。
2. 点击 **Add**。
3. 粘贴以下 JSON，替换其中的键，并将 **Server level** 设为全局或当前项目：

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

4. 选择 **OK**，然后选择 **Apply**。**Status** 列会显示该连接，点击其工具图标可查看 Firecrawl 提供的工具列表。
5. 如果希望服务器自动启动，请启用 **Automatically enable new and changed MCP servers**。

<Accordion title="改用远程连接">
  当前的 AI Assistant 文档还列出了 Streamable HTTP 服务器，可在同一 JSON 中通过 `url` 条目进行配置。但该文档并未说明请求标头或浏览器登录流程，因此除非你的 IDE 提供了这些选项，否则请使用上述本地配置方式连接 Firecrawl。
</Accordion>

有关环境变量的完整列表，请参见 [在本地运行 MCP](/zh/mcp-server/local)。

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

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

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

* **状态一直显示为红色：** 在终端中运行 `node --version`，确认输出的版本为 22 或更高。安装 Node.js 后请重启 IDE，使其识别新的 `PATH`。
* **`spawn npx ENOENT`：** IDE 找不到 `npx`。请在能正常运行 `npx` 的 shell 中启动 IDE，或将 `npx` 的完整路径用作命令。
* **服务器显示 `401`：** 替换 `FIRECRAWL_API_KEY` 的值，然后再次点击 **Apply**。
* **日志：** MCP 设置页面提供了日志文件夹的链接，每个服务器对应一个日志文件。


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