Back to MCP directory
publicPublicdnsLocal runtime

fantasy-pl-mcp

一个提供英超梦幻足球(FPL)数据访问的MCP服务器,支持在Claude桌面版等MCP兼容客户端中查询球员数据、球队信息、比赛周状态等功能。

article

README

🚀 梦幻英超联赛 MCP 项目文档

本项目搭建了一个梦幻英超联赛(Fantasy Premier League)的 MCP(模型上下文协议)服务器,可与 Claude AI 助手展开交互。借助该项目,您能够访问 FPL 数据并开展各类操作。

🚀 快速开始

此项目提供了一个梦幻英超联赛(Fantasy Premier League)的 MCP(模型上下文协议)服务器,允许与 Claude AI 助手进行交互。通过此项目,您可以访问 FPL 数据并执行各种操作。

✨ 主要特性

  • 搭建 MCP 服务器,实现与 Claude AI 助手的交互。
  • 可访问 FPL 数据并执行相关操作。

📦 安装指南

若要安装此项目,请使用以下命令:

pip install fpl-mcp

📚 详细文档

配置说明

添加功能

若要添加新功能,可按以下步骤操作:

  1. fpl_mcp/fpl/resources/ 目录下的合适文件中添加资源处理程序。
  2. fpl_mcp/fpl/tools/ 目录下的合适文件中添加工具处理程序。
  3. 更新 __main__.py 文件,注册新的资源和工具。
  4. 用 MCP 检查器进行测试,再部署到 Claude 桌面版。

认证

若要使用需认证的功能(如访问您的球队或私人联赛),您得设置 FPL 资格:

# 运行资格设置工具
fpl-mcp-config setup

此交互式工具会:

  1. 提示您输入 FPL 邮箱、密码和团队 ID。
  2. 您可选择将其存于 config.json.env 文件中。
  3. 把凭据安全保存到 ~/.fpl-mcp/ 目录。

您可通过以下命令测试认证:

fpl-mcp-config test

或者,您也能手动配置认证:

  1. 创建 ~/.fpl-mcp/.env 文件,并添加以下内容:
    FPL_EMAIL=your_email@example.com
    FPL_PASSWORD=your_password
    FPL_TEAM_ID=your_team_id
    
  2. 或者创建 ~/.fpl-mcp/config.json 文件:
    {
      "email": "your_email@example.com",
      "password": "your_password",
      "team_id": "your_team_id"
    }
    
  3. 或者设置环境变量:
    export FPL_EMAIL=your_email@example.com
    export FPL_PASSWORD=your_password
    export FPL_TEAM_ID=your_team_id
    

限制

  • FPL API 无官方文档,可能会在无通知的情况下变更。
  • 当前仅支持读操作。

故障排除

常见问题

1. 在 Claude 桌面版中出现 "spawn fpl-mcp ENOENT" 错误

此错误是由于 Claude 桌面版在 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.main"]
        }
      }
    }
    
2. 在 Windows 上找不到 fpl-mcp 可执行文件

请确保 Python 包已正确安装。若尚未安装,请使用以下命令进行安装:

pip install fpl-mcp

然后在 PowerShell 中运行:

python -m fpl_mcp.main

📄 许可证

此项目遵循 MIT License 许可。

👥 贡献指南

如何贡献

  1. 请 fork 此仓库。
  2. 创建一个新的功能分支:
    git checkout -b feature/new-feature
    
  3. 提交您的更改:
    git commit -m "添加新功能"
    
  4. 推送到叉出的仓库:
    git push origin feature/new-feature
    
  5. 创建一个 Pull Request。

行为准则

请在贡献时遵守 Contributor Code of Conduct

🙏 鸣谢


此文档为您提供梦幻英超联赛 MCP 项目的核心功能、配置方法、开发指南以及故障排除等信息。如需更多信息,请参考相关链接或联系项目维护者。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client