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

# 在 Claude Code 中使用 MCP 进行网页搜索和抓取

> 两分钟内为 Claude Code 添加网页抓取和搜索功能

使用 Firecrawl MCP 为 Claude Code 添加网页抓取和搜索能力。

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

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

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

<div id="2-add-firecrawl-mcp-server">
  ### 2. 添加 Firecrawl MCP 服务器
</div>

**选项 A：远程托管 URL (推荐) **

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

**选项 B：本地 (npx) **

```bash theme={null}
claude mcp add firecrawl -e FIRECRAWL_API_KEY=your-api-key -- npx -y firecrawl-mcp
```

将 `your-api-key` 替换为你的实际 Firecrawl API 密钥。

完成！现在你可以在 Claude Code 中搜索并抓取网页了。

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

在 Claude Code 中试试这些：

**搜索网页：**

```
Search for the latest Next.js 15 features
```

**抓取网页：**

```
Scrape firecrawl.dev and tell me what it does
```

**查看文档：**

```
Find and scrape the Stripe API docs for payment intents
```

Claude 会自动使用 Firecrawl 的搜索和抓取工具来获取相关信息。
