fpl-mcp
⚽ FPL MCP — 面向梦幻英超的模型上下文协议服务器
一个面向梦幻英超(FPL)的异步模型上下文协议(MCP)服务器。为 AI 编程助手和智能体框架(Antigravity、Claude Desktop、Cursor、Custom Agents)提供33 个专用工具,用于分析赛程、挖掘冷门球员、管理阵容、追踪实时比分、监控价格波动,以及优化转会与队长选择。
🌟 核心特性
🚀 33 个专用工具:完整覆盖官方 FPL 接口(Bootstrap、赛程、FDR、阵容、历史、筹码、实时比赛周比分、迷你联赛、定位球主罚者、冷门球员和价格变动)。
🔒 安全且只读:专注于深度分析和 AI 建议,不进行有风险的自动转会操作。
⚡ 内存 TTL 缓存:智能的按接口缓存机制,避免触发 FPL 服务器的限流,同时保持实时比赛周比分的新鲜度。
🛡️ 支持公开与私有数据:仅凭球队 ID 即可立即使用公开数据。支持会话认证 / Cookie 以访问私有阵容。
🔌 标准 stdio 传输:可与任何符合 MCP 规范的客户端即插即用。
Related MCP server: MCP Eleven
🏗️ 架构
fpl-mcp/
├── src/fpl_mcp/
│ ├── server.py # MCP Server entrypoint (stdio transport)
│ ├── client.py # Async FPL HTTP client with TTL caching
│ ├── auth.py # Session cookie & credential manager
│ ├── cache.py # In-memory thread-safe TTL cache
│ ├── constants.py # API endpoints, TTLs, positions & chip maps
│ └── tools/
│ ├── registry.py # Aggregator & dynamic tool dispatcher
│ ├── bootstrap.py # Players, teams, and season status
│ ├── fixtures.py # Fixtures schedule & FDR matrix
│ ├── squad.py # Team picks, history, and manager info
│ ├── players.py # Deep player statistics (xG, xA, ICT, PPG)
│ ├── transfers.py # Transfer history, bank, and AI transfer scout
│ ├── chips.py # Chip tracker & Double/Blank GW strategy engine
│ ├── live.py # Real-time provisional GW scores & bonus points
│ ├── leagues.py # Classic & Head-to-Head mini-league tables
│ ├── news.py # Injury reports, bans, and set-piece takers
│ ├── picks.py # Algorithmically ranked captain picks & differentials
│ └── prices.py # Predicted price risers/fallers & confirmed changes
├── pyproject.toml
└── README.md🚀 快速开始
1. 环境要求
Python 3.11+
uv(推荐)或
pip
2. 安装
# Clone the repository
git clone https://github.com/dexhamter/fpl-mcp.git
cd fpl-mcp
# Install dependencies into virtual environment
uv sync3. 配置
复制示例环境文件:
cp .env.example .env使用你的球队信息编辑 .env:
# Your FPL Team ID (found in the URL: https://fantasy.premierleague.com/entry/{ID}/event/1)
FPL_TEAM_ID=1234567
# Optional: FPL login credentials or browser session cookie for private team data
FPL_EMAIL=your@email.com
FPL_PASSWORD=your_password
# FPL_COOKIE=pl_profile=...⚙️ 连接 MCP 客户端
🤖 Antigravity / Gemini CLI
将服务器添加到你的 ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"fpl": {
"command": "C:/Users/your_user/Documents/fpl/.venv/Scripts/python.exe",
"args": ["-m", "fpl_mcp.server"],
"env": {
"PYTHONPATH": "C:/Users/your_user/Documents/fpl/src"
}
}
}
}🟣 Claude Desktop
添加到你的 claude_desktop_config.json:
{
"mcpServers": {
"fpl": {
"command": "uv",
"args": [
"--directory",
"/path/to/fpl-mcp",
"run",
"fpl-mcp"
]
}
}
}💻 Cursor / Windsurf
在 Settings -> Features -> MCP Servers 中:
类型:
command命令:
uv --directory /path/to/fpl-mcp run fpl-mcp
🛠️ 工具目录(33 个工具)
1. 通用与 Bootstrap 数据
工具 | 参数 | 描述 |
|
| 查询所有活跃球员,支持筛选与排序 |
|
| 按部分或完整名称搜索球员 |
| 无 | 获取全部 20 支英超球队及其实力评级 |
| 无 | 比赛周截止时间、平均得分、顶尖经理 |
2. 赛程与难度(FDR)
工具 | 参数 | 描述 |
|
| 全部或指定比赛周的赛程安排 |
|
| 球队未来赛程及 FDR 评级 |
|
| 所有球队的 FDR 对比网格 |
3. 阵容与经理概览
工具 | 参数 | 描述 |
| 无 | 当前 15 人阵容、首发、替补、队长 |
|
| 总排名、总积分、银行余额和球队价值 |
|
| 任意已完成比赛周的阵容排布 |
|
| 逐比赛周的排名和积分走势 |
4. 球员分析
工具 | 参数 | 描述 |
|
| xG、xA、ICT 指数、奖励积分、出场时间、状态 |
|
| 球员逐比赛周的详细比赛记录 |
|
| 按积分、状态、场均得分或 ICT 排名的榜单 |
5. 转会与预算
工具 | 参数 | 描述 |
|
| 完整赛季转会记录,含买入/卖出成本 |
| 无 | 可用银行资金、免费转会次数、球队价值 |
|
| 综合算法,根据状态与 FDR 挖掘转会建议 |
6. 筹码策略
工具 | 参数 | 描述 |
| 无 | 追踪 Wildcards、Free Hit、Bench Boost、Triple Captain |
|
| 双赛周/空赛周检测及最佳筹码使用时机 |
7. 实时比赛周比分
工具 | 参数 | 描述 |
|
| 实时临时球员积分、进球、助攻 |
|
| 你的阵容实时累计总分,含队长加倍系数 |
8. 迷你联赛与排名
工具 | 参数 | 描述 |
| 无 | 你的球队参与的所有经典和一对一迷你联赛 |
|
| 完整排行榜表格,含排名和比赛周得分 |
|
| 一对一战绩(胜/平/负、比赛积分) |
9. 球队新闻与定位球
工具 | 参数 | 描述 |
|
| 筛选受伤、停赛或存疑状态的球员 |
|
| 指定的点球、任意球和角球主罚者 |
| 无 | 对全部 15 名球员进行健康检查并发出状态提醒 |
10. 队长与冷门球员
工具 | 参数 | 描述 |
|
| 多因素加权队长评分(状态、ICT、FDR、主场) |
|
| 高潜力低持有率球员推荐(默认 <15%) |
|
| 持有率百分比、转会动向和净变化 |
11. 价格变动
工具 | 参数 | 描述 |
|
| 基于净转入转会的即将涨价球员 |
|
| 基于净转出转会的即将降价球员 |
|
| 本比赛周或本赛季已确认的价格调整 |
💡 示例助手提示词
配置好智能体后,你可以用自然语言提问,例如:
“第 1 比赛周我该选谁当队长?根据赛程和预期进球参与度比较我的最佳选项。”
“在截止时间前检查我的阵容是否有伤病隐患。”
“我有 £0.5m 的银行余额,需要换掉一名 £7.5m 以下且未来赛程轻松的中场球员。你有什么建议?”
“给我看看持有率低于 10% 的经理人中最值得关注的 5 名冷门前锋。”
“本赛季阿森纳和利物浦的点球主罚者是谁?”
“我们在双赛周和空赛周的策略是什么?什么时候应该考虑使用 Bench Boost?”
⏱️ 缓存策略
为保持低延迟并遵守 FPL 服务器使用规范,数据在内存中缓存:
接口类型 | 默认 TTL |
实时比赛周比分( | 60 秒 |
阵容与参赛信息( | 120 - 300 秒 |
Bootstrap 与球员数据( | 300 秒(5 分钟) |
赛程与安排( | 600 秒(10 分钟) |
📜 许可证
本项目基于 MIT 许可证 授权。
⚽ 免责声明
本工具与英超联赛或梦幻英超无官方关联,亦未获得其认可。所有数据均从公开的 FPL API 接口获取。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceA Model Context Protocol server that provides access to Fantasy Premier League data, allowing users to compare players, find team information, view gameweek data, and get FPL-related advice through Claude for Desktop and other MCP-compatible clients.2374MIT
- FlicenseNot gradedqualityDmaintenanceAn open-source MCP server that turns any AI assistant into a football data analytics and scouting platform, enabling natural language queries over 40+ stats, 20+ leagues, and 10,000+ players.1
- FlicenseNot gradedqualityDmaintenanceMCP server for the Fantasy Premier League API, enabling querying of players, teams, fixtures, and your FPL team through any MCP-compatible client.
- AlicenseAqualityCmaintenanceAn MCP server for Fantasy Premier League that allows querying gameweek info, player recommendations, squad management, and executing transfers via FPL's public API with optional cookie authentication.4261ISC
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for AI dialogue using various LLM models via AceDataCloud
An MCP server that integrates with Discord to provide AI-powered features.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/dexhamter/fpl-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server