关于 Firecrawl Server for MCP
Firecrawl Server for MCP 是用于抓取 URL 和爬取网站的 Express API 服务,适合通过 HTTP 接口提取单页、批量 URL 或整站内容的应用。
主要功能
- 01抓取单个 URL
- 02批量抓取多个 URL
- 03爬取并抓取网站所有页面
- 04提供抓取与爬取 HTTP 接口
适用场景
- 01提取单个网页内容
- 02批量处理一组 URL
- 03收集整个网站的页面
- 04使用 Docker Compose 运行 API
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Firecrawl 的 MCP 服务
为 Firecrawl 提供 Web 爬取和抓取功能端点的 Express API 服务。
功能
- 抓取单个 URL
- 批量抓取多个 URL
- 爬取网站并抓取所有页面
Docker 设置
此项目可使用 Docker 和 Docker Compose 轻松运行。Docker Compose 让你能够轻松定义、管理和运行多容器 Docker 应用。
先决条件
Docker Compose 命令
构建并启动容器
# Build and start in detached mode
docker compose up -d
# Build the image without starting the container
docker compose build
# Build with no cache (force rebuild)
docker compose build --no-cache
# Build and start with logs in console (not detached)
docker compose up
管理容器
# Stop the container
docker compose stop
# Stop and remove the container
docker compose down
# Stop and remove the container and volumes
docker compose down -v
# View container logs
docker compose logs
# Follow container logs
docker compose logs -f
# Restart the container
docker compose restart
扩展规模(如有需要)
# Scale the service to multiple instances
docker compose up -d --scale firecrawl-server=3
标记并上传
docker tag firecrawl-server-for-mcp-tools yourusername/firecrawl-server-for-mcp:latest
docker tag firecrawl-server-for-mcp-tools yourusername/firecrawl-server-for-mcp:0.0.1
docker push radu103/firecrawl-server-for-mcp:latest
docker push radu103/firecrawl-server-for-mcp:0.0.1
Docker Compose 文件
项目包含一个 docker-compose.yml 文件,用于配置:
- 端口映射(3000:3000)
- 环境变量
- 用于持久存储下载文件的卷
API 端点
GET /:显示 API 信息的主页路由POST /scrape:抓取单个 URLPOST /scrape-batch:抓取多个 URLPOST /crawl:爬取网站并抓取所有页面
示例请求
请查看 sample_requests 目录中的 HTTP 请求示例。
开发
不使用 Docker 安装
# Install dependencies
npm install
# Start server
npm start
服务器默认运行在端口 3000,或运行在 PORT 环境变量指定的端口。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。