<a href="https://glama.ai/mcp/servers/2zxsxuxuj9">
<img width="380" height="200" src="https://gips0.baidu.com/it/u=493712562,2519573493&fm=3081&app=3081&f=PNG?w=760&h=400" />
一个模型上下文协议(MCP)服务器,提供访问幻想英超(FPL)数据和工具的功能。此服务器允许您在桌面版Claude和其他兼容MCP的客户端中与FPL数据进行交互。
幻想英超MCP服务器演示
目前不支持移动设备。
pip install fpl-mcp
pip install "fpl-mcp[dev]"
pip install git+https://github.com/rishijatia/fantasy-pl-mcp.git
git clone https://github.com/rishijatia/fantasy-pl-mcp.git
cd fantasy-pl-mcp
pip install -e .
安装后,您可以选择几种方式运行服务器:
fpl-mcp
python -m fpl_mcp
通过编辑您的claude_desktop_config.json文件来配置Claude Desktop以使用已安装的包:
方法1:直接使用Python模块(最可靠)
{
"mcpServers": {
"fantasy-pl": {
"command": "python",
"args": ["-m", "fpl_mcp"]
}
}
}
方法2:使用完整路径的安装命令(如果使用pip安装)
{
"mcpServers": {
"fantasy-pl": {
"command": "/full/path/to/your/venv/bin/fpl-mcp"
}
}
}
用实际可执行文件的路径替换/full/path/to/your/venv/bin/fpl-mcp。您可以通过在激活虚拟环境后运行which fpl-mcp在终端中找到这个路径。
注意:仅使用
"command": "fpl-mcp"可能会导致spawn fpl-mcp ENOENT错误,因为Claude Desktop可能无法访问虚拟环境的PATH。使用完整路径或Python模块的方法可以帮助避免这个问题。
对于开发和测试:
# 如果您已经安装了mcp[cli]
mcp dev -m fpl_mcp
# 或者使用npx
npx @modelcontextprotocol/inspector python -m fpl_mcp
fpl://static/players - 所有球员数据及其全面统计fpl://static/players/{name} - 按姓名搜索的球员数据fpl://static/teams - 所有英超球队fpl://static/teams/{name} - 按姓名搜索的球队数据fpl://gameweeks/current - 当前比赛周数据fpl://gameweeks/all - 所有比赛周数据fpl://fixtures - 当前赛季的所有赛程fpl://fixtures/gameweek/{gameweek_id} - 特定比赛周的赛程fpl://fixtures/team/{team_name} - 特定球队的赛程fpl://players/{player_name}/fixtures - 特定球员的即将赛程fpl://gameweeks/blank - 关于即将到来的空白比赛周的信息fpl://gameweeks/double - 关于即将到来的双倍比赛周的信息get_gameweek_status - 获取当前、上一和下一比赛周的精确信息analyze_player_fixtures - 分析球员的即将赛程及难度评级get_blank_gameweeks - 获取即将到来的空白比赛周的信息get_double_gameweeks - 获取即将到来的双倍比赛周的信息analyze_players - 根据多个标准筛选和分析FPL球员analyze_fixtures - 分析球员、球队或位置的即将赛程compare_players - 比较多名球员的各种指标check_fpl_authentication - 检查FPL认证是否正确工作get_my_team - 查看您的认证团队(需要认证)get_team - 查看具有特定ID的任何团队(需要认证)get_manager_info - 获取经理详情(需要认证)player_analysis_prompt - 创建深度分析FPL球员的提示transfer_advice_prompt - 根据预算和位置获取球员转会建议team_rating_prompt - 创建评估和分析FPL团队的提示differential_players_prompt - 创建寻找低所有权差异球员的提示chip_strategy_prompt - 创建芯片策略建议的提示要添加新功能:
fpl_mcp/fpl/resources/中的适当文件内添加资源处理器fpl_mcp/fpl/tools/中的适当文件内添加工具处理器__main__.py文件以注册新的资源和工具要使用需要认证的功能(如访问您的团队或私人联赛),您需要设置您的FPL凭证:
# 运行凭证设置工具
fpl-mcp-config setup
这个交互式工具会:
~/.fpl-mcp/您可以使用以下命令测试您的认证:
fpl-mcp-config test
或者,您可以手动配置认证:
创建~/.fpl-mcp/.env文件,内容如下:
FPL_EMAIL=your_email@example.com
FPL_PASSWORD=your_password
FPL_TEAM_ID=your_team_id
或创建~/.fpl-mcp/config.json:
{
"email": "your_email@example.com",
"password": "your_password",
"team_id": "your_team_id"
}
或设置环境变量:
export FPL_EMAIL=your_email@example.com
export FPL_PASSWORD=your_password
export FPL_TEAM_ID=your_team_id
这是因为Claude Desktop无法在其PATH中找到fpl-mcp可执行文件。
解决方案:使用以下方法之一:
在您的配置文件中使用可执行文件的完整路径
{
"mcpServers": {
"fantasy-pl": {
"command": "/full/path/to/your/venv/bin/fpl-mcp"
}
}
}
直接使用Python运行模块(首选方法)
{
"mcpServers": {
"fantasy-pl": {
"command": "python",
"args": ["-m", "fpl_mcp"]
}
}
}
如果服务器启动但立即断开连接:
~/Library/Logs/Claude/mcp*.log(macOS)或%APPDATA%\Claude\logs\mcp*.log(Windows)python -m fpl_mcp以查看任何错误如果锤子图标未出现:
claude_desktop_config.json具有正确的JSON语法本项目根据MIT许可证发布 - 详情请参阅LICENSE文件。
欢迎贡献!请随意提交拉取请求。
git checkout -b feature/amazing-feature)git commit -m '添加一些精彩功能')git push origin feature/amazing-feature)更多细节,请参阅CONTRIBUTING.md文件。
如果您在研究或项目中使用了此包,请考虑引用它:
@software{fpl_mcp,
author = {Jatia, Rishi and Fantasy PL MCP Contributors},
title = {幻想英超MCP服务器},
url = {https://github.com/rishijatia/fantasy-pl-mcp},
version = {0.1.0},
year = {2025},
}