Skip to main content
Glama

Soccer MCP Server

サッカーMCPサーバー

API-Football サービスを使用して、サッカーの統計とライブ試合データ用のモデル コンテキスト プロトコル (MCP) を実装する Python サーバー。

概要

このサーバーは、API-Football APIを通じてサッカーデータにアクセスするための包括的なツールセットを提供します。アプリケーションとサッカーデータサービス間の橋渡しとして機能し、世界中のリーグ、チーム、選手のライブ試合情報と過去の統計情報を提供します。

特徴

  • リーグデータ(順位、試合日程、スケジュール)
  • チーム情報と試合日程
  • 選手の統計とプロフィール
  • ライブ試合データ(イベント、統計、タイムライン)
  • 試合分析(統計、イベント)

構成

このサーバーには、API-Football サービス用の RapidAPI からの API キーが必要です。

  1. RapidAPIでアカウントを作成する
  2. API-Football APIを購読する
  3. 環境変数を設定します。
    RAPID_API_KEY_FOOTBALL=your_api_key_here

ツール

リーグデータ

  • 名前でリーグIDを取得する
    • 指定されたリーグ名のリーグIDを取得します
    • 例: get_league_id_by_name(league_name="Premier League")
  • すべてのリーグIDを取得する
    • IDを持つすべてのサッカーリーグのリストを取得します
    • 国別にフィルタリングできます
    • 例: get_all_leagues_id(country=["England", "Spain"])
  • 順位を取得する
    • 複数のリーグとシーズンのリーグ順位を取得します
    • チーム別にフィルタリング可能
    • 例: get_standings(league_id=[39, 140], season=[2022, 2023])
  • リーグ情報を取得する
    • 特定のサッカーリーグに関する情報を取得する
    • 例: get_league_info(league_name="Champions League")
  • リーグ試合情報を取得する
    • 指定されたリーグとシーズンのすべての試合日程を取得します
    • 例: get_league_fixtures(league_id=39, season=2023)
  • 日付別にリーグスケジュールを取得する
    • 指定した日付のリーグのスケジュールを取得します
    • 例: get_league_schedule_by_date(league_name="Premier League", date=["2024-03-08", "2024-03-09"], season="2023")

プレイヤーデータ

  • プレイヤーIDを取得する
    • 名前に一致するプレーヤーのプレーヤーIDと情報を取得します
    • 例: get_player_id(player_name="Messi")
  • プレイヤープロフィールを取得する
    • プレイヤーのプロフィールを姓で取得する
    • 例: get_player_profile(player_name="Messi")
  • プレイヤー統計情報を取得する
    • シーズンとリーグ名別に詳細な選手統計情報を取得します
    • 例: get_player_statistics(player_id=154, seasons=[2022, 2023], league_name="La Liga")
  • プレイヤー統計情報を取得する
    • シーズンとリーグID別に詳細な選手統計情報を取得します
    • 例: get_player_statistics_2(player_id=154, seasons=[2022, 2023], league_id=140)

チームデータ

  • チームの試合情報を取得する
    • チームの過去または今後の試合日程を返します
    • 例: get_team_fixtures(team_name="Manchester United", type="past", limit=3)
  • 日付範囲別にチームフィクスチャーを取得する
    • 日付範囲内のチームの試合予定を取得する
    • 例: get_team_fixtures_by_date_range(team_name="Liverpool", from_date="2023-09-01", to_date="2023-09-30", season="2023")
  • チーム情報を取得する
    • 特定のチームに関する基本情報を取得する
    • 例: get_team_info(team_name="Real Madrid")

試合/試合日程データ

  • get_fixture_statistics
    • 特定のフィクスチャの詳細な統計情報を取得します
    • 例: get_fixture_statistics(fixture_id=867946)
  • get_fixture_events
    • 試合中のすべてのイベント(ゴール、カード、交代)を取得します
    • 例: get_fixture_events(fixture_id=867946)
  • 複数のフィクスチャの統計情報を取得する
    • 複数の試合の統計情報を一度に取得します
    • 例: get_multiple_fixtures_stats(fixture_ids=[867946, 867947, 867948])

ライブマッチデータ

  • チームのライブマッチを取得する
    • チームが現在ライブでプレイしているかどうかを確認します
    • 例: get_live_match_for_team(team_name="Chelsea")
  • チームのライブ統計を取得する
    • 試合中のチームのライブゲーム内統計を取得します
    • 例: get_live_stats_for_team(team_name="Liverpool")
  • ライブマッチタイムラインを取得する
    • チームのライブ試合のイベントのタイムラインをリアルタイムで取得します
    • 例: get_live_match_timeline(team_name="Manchester City")

使用法

サーバーは Fast MCP フレームワークを使用して実装され、スタンドアロン サービスとして実行できます。

# Start the server python soccer_server.py # or mcp run soccer-server.py

構成

  • より信頼性の高い動作のために、サーバーは30秒のタイムアウトで実行されます。
  • 正常なシャットダウンのためにシグナルハンドラが実装されています(Ctrl+C)

Claude Desktopでの使用

オプション 1: Docker を使用する (推奨)
  1. このリポジトリをクローンする
git clone https://github.com/obinopaul/soccer-mcp-server.git cd soccer-mcp-server
  1. 依存関係をインストールする
pip install -r requirements.txt
  1. Dockerイメージをビルドする
docker build -t soccer_server .
  1. Dockerコンテナを実行します(APIキーが環境変数として渡されていることを確認してください)
docker run -d -p 5000:5000 -e RAPID_API_KEY_FOOTBALL=your_api_key_here --name soccer_server soccer_server
  1. これをclaude_desktop_config.jsonに追加します:
{ "mcpServers": { "soccer_server": { "command": "docker", "args": [ "exec", "-i", "soccer_server", "python", "soccer_server.py" ], "env": { "RAPID_API_KEY_FOOTBALL": "your_api_key_here" } } } }
オプション2: Pythonの直接実行
  1. このリポジトリをクローンする
git clone https://github.com/obinopaul/soccer-mcp-server.git cd soccer-mcp-server
  1. 依存関係をインストールする
pip install -r requirements.txt
  1. APIキー環境変数を設定する
export RAPID_API_KEY_FOOTBALL=your_api_key_here
  1. 必要に応じて Python パスを調整しながら、これをclaude_desktop_config.jsonに追加します。
{ "mcpServers": { "soccer_server": { "command": "/path/to/your/python", "args": [ "/path/to/soccer_server.py" ], "env": { "RAPID_API_KEY_FOOTBALL": "your_api_key_here" } } } }

選択した設定を追加したら、Claude Desktop を再起動してサッカーサーバーをロードしてください。これで、Claude との会話ですべてのサッカーデータツールを使用できるようになります。

技術的な詳細

サーバーは以下に基づいて構築されています:

  • API-Football(RapidAPI経由)
  • APIインターフェース用のMCP
  • 入力検証のためのPydantic
  • API通信のリクエスト

ライセンス

この MCP サーバーは MIT ライセンスの下で利用できます。

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

API-Football を介して包括的なサッカー統計とライブ試合データへのプログラムによるアクセスを提供し、アプリケーションがリーグ順位、チーム試合日程、選手統計、リアルタイムの試合イベントを取得できるようにします。

  1. 概要
    1. 特徴
      1. 構成
        1. ツール
          1. リーグデータ
          2. プレイヤーデータ
          3. チームデータ
          4. 試合/試合日程データ
          5. ライブマッチデータ
        2. 使用法
          1. 構成
          2. Claude Desktopでの使用
        3. 技術的な詳細
          1. ライセンス

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              An MCP server providing access to college football statistics sourced from the College Football Data API within Claude Desktop.
              Last updated -
              9
              9
              Python
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              Provides structured access to NHL data including teams, players, standings, schedules, and statistics through the Model-Context Protocol pattern.
              Last updated -
              TypeScript
            • -
              security
              F
              license
              -
              quality
              This server enables Claude to access Team Fight Tactics (TFT) game data, allowing users to retrieve match histories and detailed match information through the Riot Games API.
              Last updated -
              2
              TypeScript
              • Apple
            • A
              security
              F
              license
              A
              quality
              Connect AI agents to OP.GG Esports data and retrieve upcoming League of Legends match schedules effortlessly. Access structured match information through a standardized interface, enhancing your AI's capabilities with real-time esports data.
              Last updated -
              1
              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/obinopaul/soccer-mcp-server'

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