Firecrawl Server for MCP について
Firecrawl Server for MCPは、URLのスクレイピングとウェブサイトのクロールを行うExpress APIサーバーです。HTTPエンドポイント経由で、単一ページ、複数URL、サイト全体のデータを取得する用途に使えます。
主な機能
- 01単一URLのスクレイピング
- 02複数URLの一括スクレイピング
- 03サイト全ページのクロールと取得
- 04スクレイピングとクロール用HTTPエンドポイント
活用シーン
- 01単一ウェブページの内容を抽出
- 02複数URLをまとめて処理
- 03ウェブサイト全体からページを収集
- 04Docker ComposeでAPIを実行
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
MCP 用 Firecrawl サーバー
ウェブのクロールおよびスクレイピング機能を提供する Firecrawl 用の 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:単一の URL をスクレイピングPOST /scrape-batch:複数の URL をスクレイピングPOST /crawl:ウェブサイトをクロールしてすべてのページをスクレイピング
リクエスト例
HTTP リクエストの例は sample_requests ディレクトリを確認してください。
開発
Docker を使わないインストール
# Install dependencies
npm install
# Start server
npm start
サーバーはデフォルトでポート 3000、または PORT 環境変数で指定されたポートで動作します。
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。