跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 API-Football,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 通过 API-Football 关注足球:实时比分和比赛事件、赛程、积分榜、球队和球员统计、首发阵容、伤病、转会、历史交锋、比赛预测和博彩公司赔率,覆盖全球的联赛和杯赛。使用你 API-Sports 账户的 API 密钥。
试试这样问
API-Football 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → API-Football、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
API-Football
让你的 AI 通过 API-Football 关注足球:实时比分和比赛事件、赛程、积分榜、球队和球员统计、首发阵容、伤病、转会、历史交锋、比赛预测和博彩公司赔率,覆盖全球的联赛和杯赛。使用你 API-Sports 账户的 API 密钥。
设置
- 在 dashboard.api-football.com 免费注册账户。登录后,控制台会显示你的 API 密钥。试用连接器用免费套餐就够了。
- 把密钥粘贴到
API_FOOTBALL_KEY,然后安装连接器。密钥会以x-apisports-key请求头发送给 API-Sports。请使用 API-Sports 控制台里的密钥:通过 API 市场购买的密钥使用不同的请求头,在这里无法使用。 - 先调用
af_status。它会显示你的套餐、每日请求上限和已用数量,本身不计入配额。 - 做任何分析时,先从
af_analysis_playbook开始。它不调用 API,会按请求类型返回要依次使用的工具:赛前预览或预测、赛后报告、球队状态、积分榜、最佳球员、球员球探、阵容名单、伤病、转会、赔率或实时比赛。
先把名称换成 ID:几乎每个工具都需要数字 ID,AI 绝不应该猜测。它用 af_leagues 加 search 过滤条件查找赛事(例如德甲 ID 为 78,世界杯 ID 为 1),同时得到可用的赛季;用 af_teams 查找球队。用球队 ID 并把 next 设为 1 调用 af_fixtures,会返回下一场比赛及其 fixture ID,af_predictions、af_fixture_lineups、af_fixture_events、af_fixture_statistics 和 af_fixture_players 都需要这个 ID。球员数据来自按球队和赛季查询的 af_players,按姓名搜索则用 af_player_profiles。
赛季和时间:season 是赛季开始的 4 位年份:2025 表示 2025/26 赛季,2026 年世界杯就是 2026。日期格式为 YYYY-MM-DD。除非 AI 传入 timezone(取值来自 af_timezone),时间均为 UTC。
每日配额:每次调用数据工具都是向 API-Sports 发出一次请求,计入你套餐的每日配额。连接器的说明按免费套餐设定,即每天 100 次请求;付费套餐额度更高。af_status 和 af_analysis_playbook 不消耗配额。一份完整的赛前预览(预测、赔率、首发阵容、双方的球队统计和伤病、射手榜、球员统计、历史交锋)大约需要 12 次调用,而 af_players 这类分页结果每页算一次请求,所以精确的过滤条件(联赛、赛季、球队、日期)能省下不少配额。
预测和赔率是数据,不是投注建议:af_predictions 针对一场比赛返回 API-Football 自己计算的胜、平、负概率、建议和状态对比。af_odds_prematch 和 af_odds_live 返回博彩公司的赔率,AI 可以把赔率换算成隐含概率,再与预测对比。两者都不能保证比赛结果。小型比赛或还很远的比赛可能没有赔率;af_odds_mapping 列出有赔率的比赛,af_odds_bookmakers、af_odds_bets 和 af_odds_live_bets 列出博彩公司和投注类型。
数据覆盖范围:首发阵容通常在开球前约 1 小时确定。在 af_injuries 中,Missing Fixture 表示球员缺阵,Questionable 表示出战存疑。没有裁判工具:裁判只出现在比赛数据中,而且往往很晚才公布。俱乐部的历史交锋数据很完整,国家队则很少。
只读:全部 40 个工具都只读取数据,不会修改你的 API-Sports 账户,安装时也没有默认关闭的工具。
常见错误:API-Football 可能返回 HTTP 200 但实际失败;这时原因写在 errors 字段中,response 为空。token 条目表示密钥错误或缺失:请检查 API_FOOTBALL_KEY。plan 条目表示该赛季或功能不在你的套餐内:在 API-Sports 控制台升级套餐,或改问套餐覆盖的赛季。每日配额用完后,调用会一直失败,直到配额重置;af_status 可以查看剩余次数。errors 为空而 response 也为空,表示没有符合过滤条件的数据,例如赔率尚未公布或赛季尚未开始。
本连接器不会下注,不覆盖 API-Sports 的其他运动项目,也不会推送实时通知:只有在 AI 查询时才获取实时比分。它也不是 football-data.org 连接器,后者使用 football-data.org 自己的令牌。
前提条件: API_FOOTBALL_KEY
本地安装连接器
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
打开 http://localhost:3000/connectors/store,选择 API-Football 并填入前提条件中列出的环境变量。
可用工具
| Tool | What it does |
|---|---|
af_analysis_playbook | START HERE for football analysis (optional but recommended): returns, with NO API call, the exact ordered list of af_* tools to run for a… |
af_status | Account status: subscription plan, daily request limit and current usage |
af_timezone | List of all valid timezone strings accepted by the timezone parameter of other endpoints |
af_countries | List available countries (name, code, flag) |
af_leagues | Find LEAGUES & cups + their available seasons and numeric id (needed by standings/fixtures/topscorers/etc) |
af_leagues_seasons | List of all season years available across the API (e.g. 2010..2024) |
af_teams | Find TEAMS + their numeric id (needed by almost every other tool) |
af_team_statistics | A team's season STATISTICS in a competition: form, played, W-D-L, goals for/against (+ averages, home/away split), clean sheets, streaks… |
af_team_seasons | List of season years for which a given team has data |
af_team_countries | List of countries available for the teams endpoint |
af_venues | Search stadiums/venues (name, address, city, capacity, surface) |
af_standings | League TABLE / STANDINGS for a season: rank, points, W-D-L, goal difference, form. league=<id>, season=<year> |
af_fixtures | Football MATCHES & scores |
af_fixtures_rounds | List of round names for a league+season (e.g. 'Regular Season - 1') |
af_head_to_head | HEAD-TO-HEAD history between two teams (h2h='idA-idB'): past meetings with scores, competitions and venues |
af_fixture_statistics | Team match STATISTICS for a fixture: shots, shots on target, possession %, corners, fouls, offsides, passes & accuracy |
af_fixture_events | Match TIMELINE for a fixture: goals (with assist), cards, substitutions and VAR, each with minute & player |
af_fixture_lineups | Starting XI, bench, FORMATION and coach for a fixture |
af_fixture_players | Per-player match stats & RATINGS for a fixture (goals, shots, passes, duels, rating) |
af_injuries | INJURIES & suspensions, who is OUT or doubtful |
af_predictions | THE match-prediction endpoint for one fixture id (win/draw/loss %, advice, predicted winner, and a form/attack/defence comparison of the… |
af_coachs | Search coaches and their career |
af_players | PLAYER statistics for a season: goals, assists, rating, minutes, shots, passes, dribbles, duels, cards |
af_player_seasons | Season years available for a player (or all seasons if no player given) |
af_player_squads | Current squad of a team, or the teams a player belongs to |
af_player_teams | List of teams a player has played for |
af_player_profiles | Player personal data (name, age, nationality, height...) |
af_topscorers | TOP SCORERS / golden boot of a competition: goals, penalties, appearances, minutes-per-goal |
af_topassists | Top 20 assist providers of a league+season |
af_topyellowcards | Top 20 players by yellow cards in a league+season |
af_topredcards | Top 20 players by red cards in a league+season |
af_transfers | Transfer history |
af_trophies | Trophies won |
af_sidelined | Past absences (injuries/suspensions) for players/coaches |
af_odds_prematch | Pre-match betting ODDS for a fixture across bookmakers & markets (fixture=<id>; optional bookmaker=/bet=) |
af_odds_live | In-play (live) odds updated in real time |
af_odds_live_bets | Catalogue of available in-play bet (market) types for live odds |
af_odds_mapping | Mapping of fixtures that have pre-match odds available |
af_odds_bookmakers | List of available bookmakers (id + name) for the odds endpoints |
af_odds_bets | List of available pre-match bet (market) types (id + name) |
示例提示
- “给我做一份阿根廷下一场比赛的完整预览:胜负概率、博彩公司赔率、预计首发、伤病情况和两队近期状态。”
- “给我看德甲目前的积分榜和本赛季射手榜前 10 名。”
- “现在有哪些意甲比赛正在进行?比分是多少,目前谁进了球?”
- “皇家马德里现在有谁因伤或停赛缺阵?俱乐部在上一个转会窗口签下了哪些球员?”
下一步
这份指南对你有帮助吗?