> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-capy-docs-factual-copy-fixes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 在 Claude 和 Claude Code 中使用 Firecrawl

> 在 Claude 或 Claude Code 会话中进行网页搜索并读取页面内容。

根据你所使用的应用选择对应的配置方式。两种方式均为可选，只需连接你要使用的那一种即可。

<h2 id="optional-add-to-claude">
  可选：添加到 Claude
</h2>

<div className="fc-agent-prompt fc-openai-install not-prose">
  <div className="fc-openai-install-actions">
    <a className="fc-agent-prompt-button" href="https://claude.ai/directory/connectors/firecrawl" target="_blank" rel="noopener noreferrer">
      <img src="https://mintcdn.com/firecrawl-capy-docs-factual-copy-fixes/8NvmVU7parHYkDzd/images/agent-clients/claude-ai.svg?fit=max&auto=format&n=8NvmVU7parHYkDzd&q=85&s=0093f37edd4348a0a5a2cd4276ffd507" width="20" height="20" alt="" data-path="images/agent-clients/claude-ai.svg" />

      添加到 Claude
      <span aria-hidden="true">↗</span>
    </a>
  </div>
</div>

1. 点击上方按钮，打开 Firecrawl 连接器。
2. 连接你的 Firecrawl 账户，并在出现提示时授权访问。
3. 在 Claude 中新建对话并启用 Firecrawl，然后让它执行搜索或读取页面。

```text theme={null}
使用 Firecrawl 搜索最新的 Next.js 版本发布说明，并对搜索到的来源进行总结。
```

<h2 id="optional-set-up-claude-code">
  可选：设置 Claude Code
</h2>

通过远程托管的 MCP 服务器连接 Claude Code。运行以下命令，然后在浏览器中登录。

<h3 id="1-add-firecrawl">
  1. 添加 Firecrawl
</h3>

运行：

```bash theme={null}
claude mcp add --transport http firecrawl https://mcp.firecrawl.dev/v2/mcp-oauth
```

`https://mcp.firecrawl.dev/v2/mcp-oauth` 是客户端配置值，不是可直接在浏览器中打开的页面。

<h3 id="2-sign-in-and-verify">
  2. 登录并验证
</h3>

在 Claude Code 中输入 `/mcp`，选择 `firecrawl`，然后在浏览器中完成登录。如果你修改了现有的 Firecrawl 连接，请新建一个 Claude Code 会话。

确认只有一个 `firecrawl` 服务器处于活跃状态，然后尝试：

```text theme={null}
搜索最新的 Next.js 版本发布说明，并总结这些来源。
```

```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="other-connection-modes">
  其他连接方式
</h2>

* 使用[免密钥 MCP](/zh/mcp-server/keyless#try-keyless)，无需账户或密钥即可使用网页搜索、抓取 和 Parse。
* 如需无人值守运行，请[配置 API 密钥](/zh/mcp-server/keyless#add-an-api-key)。请勿在代理聊天中透露密钥，改用环境变量引用。
* 仅当需要本地进程或自托管 Firecrawl API 时，才[在本地运行 MCP](/zh/mcp-server/local)。本地软件包要求 Node.js 22 或更高版本。

<h2 id="optional-literature-research">
  可选：文献研究
</h2>

处理论文和文献相关任务时，research-index 技能会将这些查询转发至 `firecrawl_research_*` 工具和[研究索引](/zh/features/research)，而非通用网页搜索：

```bash theme={null}
npx skills add firecrawl/skills@firecrawl-research-index
```

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

* \*\*Firecrawl 服务器已存在：\*\*运行 `claude mcp remove firecrawl`，添加所需的连接一次，然后开启新会话。
* \*\*浏览器未打开：\*\*输入 `/mcp`，选择 `firecrawl`，然后在客户端发起身份验证。
* \*\*服务器显示 `401`：\*\*通过 `/mcp` 重新登录；请勿将 API 密钥粘贴到对话或 OAuth URL 中。


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