Skip to content
Firecrawl Docs
Firecrawl Docs
代理工具集

在 Cursor 中使用 MCP 实现网页搜索与抓取

用 2 分钟为 Cursor 接入网页抓取与搜索功能

使用 Firecrawl MCP 为 Cursor 接入网页抓取与搜索功能。

firecrawl.dev/app 注册并复制你的 API 密钥。

打开设置 (Cmd+,) ,搜索 “MCP”,并添加:

{
  "mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "your_api_key_here"
      }
    }
  }
}

your_api_key_here 替换为你的实际 Firecrawl API 密钥。

完成!现在你可以在 Cursor 中搜索并爬取网页了。

在 Cursor Chat (Cmd+K) 中试试以下操作:

搜索:

搜索 TypeScript 2025 最佳实践

爬取:

抓取 firecrawl.dev 并告诉我它是做什么的

查看文档:

抓取 React hooks 文档并解释 useEffect

Cursor 将自动使用 Firecrawl 工具。

如果你在 Windows 上看到 spawn npx ENOENT 或 “No server info found” 错误,说明 Cursor 在你的 PATH 中找不到 npx。请尝试以下任一解决方案:

选项 A:使用 npx.cmd 的完整路径

在命令提示符中运行 where npx 获取完整路径,然后更新你的配置:

{
  "mcpServers": {
    "firecrawl": {
      "command": "C:\\Program Files\\nodejs\\npx.cmd",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "your_api_key_here"
      }
    }
  }
}

command 路径替换为 where npx 命令的输出。

选项 B:使用远程托管的 URL (无需 Node.js)

{
  "mcpServers": {
    "firecrawl": {
      "url": "https://mcp.firecrawl.dev/v2/mcp"
    }
  }
}

此配置使用免密钥的 Firecrawl 工具集。如需连接账户或进行无人值守设置,请参阅托管 MCP 连接模式;请将 API 密钥保存在 Authorization 请求头或安全密钥存储中,切勿放在 URL 中。

YOUR-API-KEY 替换为你的 Firecrawl API 密钥。

Was this page helpful?Suggest editsRaise issue