Skip to main content
Glama

Crawlab MCP Server

Official
by crawlab-team

Crawlab MCP サーバー

これは Crawlab のモデル コンテキスト プロトコル (MCP) サーバーであり、AI アプリケーションが Crawlab の機能と対話できるようにします。

概要

MCP サーバーは、AI アプリケーションが Crawlab の機能にアクセスするための標準化された方法を提供します。これには以下が含まれます。

  • スパイダー管理(作成、読み取り、更新、削除)
  • タスク管理(実行、キャンセル、再開)
  • ファイル管理(読み取り、書き込み)
  • リソース アクセス (スパイダー、タスク)

建築

MCP サーバー/クライアント アーキテクチャは、AI アプリケーションと Crawlab 間の通信を容易にします。

コミュニケーションフロー

  1. ユーザークエリ: ユーザーはMCPクライアントに自然言語クエリを送信します。
  2. LLM処理: クライアントはクエリをLLMプロバイダー(例:Claude、OpenAI)に転送します。
  3. ツール選択: LLMは必要なツールを識別し、ツール呼び出しを生成します
  4. ツール実行: クライアントはツール呼び出しをMCPサーバーに送信します。
  5. APIインタラクション: サーバーは対応するCrawlab APIリクエストを実行します。
  6. レスポンス生成: 結果はサーバーを経由してクライアントへ、そしてLLMへ返されます。
  7. ユーザーの応答: クライアントは最終的な人間が読める応答をユーザーに配信します。

インストールと使用方法

オプション1: Pythonパッケージとしてインストールする

便利な CLI を提供する Python パッケージとして MCP サーバーをインストールできます。

# Install from source pip install -e . # Or install from GitHub (when available) # pip install git+https://github.com/crawlab-team/crawlab-mcp-server.git

インストール後、CLI を使用できます。

# Start the MCP server crawlab_mcp-mcp server [--spec PATH_TO_SPEC] [--host HOST] [--port PORT] # Start the MCP client crawlab_mcp-mcp client SERVER_URL

オプション2: ローカルで実行

前提条件

  • Python 3.8以上
  • Crawlab インスタンスが実行中でありアクセス可能
  • CrawlabからのAPIトークン

構成

  1. .env.exampleファイルを.envにコピーします。
    cp .env.example .env
  2. Crawlab API の詳細を使用して.envファイルを編集します。
    CRAWLAB_API_BASE_URL=http://your-crawlab-instance:8080/api CRAWLAB_API_TOKEN=your_api_token_here

ローカルで実行

  1. 依存関係をインストールします:
    pip install -r requirements.txt
  2. サーバーを実行します。
    python server.py

Dockerで実行する

  1. Docker イメージをビルドします。
    docker build -t crawlab-mcp-server .
  2. コンテナを実行します。
    docker run -p 8000:8000 --env-file .env crawlab-mcp-server

Docker Composeとの統合

既存の Crawlab Docker Compose セットアップに MCP サーバーを追加するには、次のサービスをdocker-compose.ymlに追加します。

services: # ... existing Crawlab services mcp-server: build: ./backend/mcp-server ports: - "8000:8000" environment: - CRAWLAB_API_BASE_URL=http://backend:8000/api - CRAWLAB_API_TOKEN=your_api_token_here depends_on: - backend

AIアプリケーションでの使用

MCPサーバーは、AIアプリケーションが自然言語を介してCrawlabと対話することを可能にします。上記のアーキテクチャ図に従って、MCPシステムの使用方法は以下のとおりです。

接続の設定

  1. MCPサーバーを起動します。MCPサーバーが実行中でアクセス可能であることを確認します。
  2. AIクライアントを構成する: AIアプリケーションをMCPサーバーに接続する

例: Claude Desktop での使用

  1. クロードデスクトップを開く
  2. 設定 > MCPサーバーへ移動
  3. MCP サーバーの URL (例: http://localhost:8000 ) を使用して新しいサーバーを追加します。
  4. クロードとの会話では、自然言語でやりたいことを説明することで、Crawlabの機能を使用できるようになりました。

やり取りの例

私たちのアーキテクチャに基づいた、システムとのやり取りの例を以下に示します。

スパイダーを作成する:

User: "Create a new spider named 'Product Scraper' for the e-commerce project" ↓ LLM identifies intent and calls the create_spider tool ↓ MCP Server executes the API call to Crawlab ↓ Spider is created and details are returned to the user

タスクを実行する:

User: "Run the 'Product Scraper' spider on all available nodes" ↓ LLM calls the run_spider tool with appropriate parameters ↓ MCP Server sends the command to Crawlab API ↓ Task is started and confirmation is returned to the user

利用可能なコマンド

次のような自然言語コマンドを使用してシステムと対話できます。

  • 「私のクモをすべてリストする」
  • 「これらの仕様で新しいスパイダーを作成します...」
  • 「Xという名のクモのコードを見せてください」
  • 「このコードを使用して、Spider X の main.py ファイルを更新します...」
  • 「スパイダーXを実行し、完了したら通知してください」
  • 「スパイダーXの最後の実行結果を見せてください」

利用可能なリソースとツール

これらは、自然言語によるやりとりを可能にする基礎となるツールです。

リソース

  • spiders : すべてのクモを一覧表示
  • tasks : すべてのタスクを一覧表示する

ツール

クモ管理
  • get_spider : 特定のスパイダーの詳細を取得する
  • create_spider : 新しいスパイダーを作成する
  • update_spider : 既存のスパイダーを更新する
  • delete_spider : スパイダーを削除する
タスク管理
  • get_task : 特定のタスクの詳細を取得する
  • run_spider : スパイダーを実行する
  • cancel_task : 実行中のタスクをキャンセルする
  • restart_task : タスクを再開する
  • get_task_logs : タスクのログを取得する
ファイル管理
  • get_spider_files : スパイダーのファイルを一覧表示する
  • get_spider_file : 特定のファイルの内容を取得する
  • save_spider_file : コンテンツをファイルに保存する
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

AI アプリケーションが自然言語を通じて Crawlab の機能と対話し、スパイダー管理、タスク実行、ファイル操作を実行できるようにするモデル コンテキスト プロトコル サーバー。

  1. 概要
    1. 建築
      1. コミュニケーションフロー
    2. インストールと使用方法
      1. オプション1: Pythonパッケージとしてインストールする
      2. オプション2: ローカルで実行
      3. 前提条件
      4. 構成
      5. ローカルで実行
      6. Dockerで実行する
    3. Docker Composeとの統合
      1. AIアプリケーションでの使用
        1. 接続の設定
        2. 例: Claude Desktop での使用
        3. やり取りの例
        4. 利用可能なコマンド
      2. 利用可能なリソースとツール
        1. リソース
        2. ツール

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        A Model Context Protocol server enabling AI agents to access and manipulate ServiceNow data through natural language interactions, allowing users to search for records, update them, and manage scripts.
        Last updated -
        9
        Python
        MIT License
      • -
        security
        F
        license
        -
        quality
        A server that enables AI systems to browse, retrieve content from, and interact with web pages through the Model Context Protocol.
        Last updated -
      • -
        security
        A
        license
        -
        quality
        A Model Context Protocol server that enables AI assistants to perform advanced web scraping, crawling, searching, and data extraction through the Firecrawl API.
        Last updated -
        7,117
        MIT License
        • Apple
        • Linux
      • -
        security
        F
        license
        -
        quality
        A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
        Last updated -
        16
        TypeScript

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/crawlab-team/crawlab-mcp'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server