fpl-mcp-server

ju6106584/fpl-mcp-server

3.1

If you are the rightful owner of fpl-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Fantasy Premier League MCP Server provides a structured data interface for Fantasy Premier League information, designed to support AI applications and other software systems.

Tools
7
Resources
0
Prompts
0

Fantasy Premier League MCP Server

This project provides a Model Context Protocol (MCP) server for structured Fantasy Premier League data, designed for downstream AI applications and other software systems.

Features

  • Player Statistics: Get detailed stats for any FPL player
  • Team Information: Access team data, fixtures, and form
  • Transfer Analysis: Price changes and top performers by position
  • Fixture Analysis: Difficulty ratings and upcoming matches
  • Gameweek Data: Current gameweek info and deadlines

Quick Start

Prerequisites

  • Python 3.10 or higher
  • uv package manager

Installation

# Clone the repository
git clone <repository-url>
cd fpl-mcp-server

# Install dependencies
uv sync

# Copy environment variables
cp .env.example .env

# Run the server
uv run src/fpl_mcp_server.py

Available Tools

  • get_player_stats(player_id) - Get detailed player statistics
  • search_players(name) - Search for players by name
  • get_team_info(team_id) - Get team information and fixtures
  • get_top_performers(position, gameweeks) - Get top performing players
  • get_price_changes() - Get recent player price changes
  • get_gameweek_info() - Get current gameweek information
  • get_fixture_difficulty(team_id, gameweeks) - Analyze fixture difficulty

Development

AI-Assisted Development Workflow

This project uses any LLM + GitHub Copilot for development:

  1. Plan features in ChatGPT using context from .github/copilot-instructions.md
  2. Use Copilot Chat with prompt templates from docs/prompt-templates.md
  3. Let Copilot autocomplete based on patterns in repository instructions

Commands

Development
  • uv run src/fpl_mcp_server.py # Start MCP server
  • uv run pytest # Run tests
  • uv run pytest --cov # Run tests with coverage
  • uv run ruff check # Lint code
  • uv run mypy src/ # Type checking
Formatting
  • uv run ruff format # Format code
Testing
  • uv run pytest # Run all tests
  • uv run pytest --cov=src --cov-report=html # Run with coverage
  • uv run pytest tests/test_tools/test_player_tools.py # Run specific test file

Architecture

  • MCP Server: FastMCP framework for tool definitions
  • Services: FPL API client and data processing
  • Tools: Domain-specific MCP tools (players, teams, leagues)
  • Models: Pydantic models for data validation
  • Caching: Redis for API response caching

Contributing

  1. Follow the repository instructions in .github/copilot-instructions.md
  2. Use the prompt templates in docs/prompt-templates.md for Copilot Chat
  3. Ensure all tests pass and coverage remains >= 80%
  4. Follow conventional commit format