The Fantasy Premier League MCP server provides access to FPL data and tools through the Model Context Protocol (MCP), allowing you to interact with comprehensive fantasy football information in Claude for Desktop and other MCP-compatible clients.
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 .
After installation, you can run the server using any of these methods:
fpl-mcp
python -m fpl_mcp
Edit your claude_desktop_config.json
file using one of these methods:
{
"mcpServers": {
"fantasy-pl": {
"command": "python",
"args": ["-m", "fpl_mcp"]
}
}
}
{
"mcpServers": {
"fantasy-pl": {
"command": "/full/path/to/your/venv/bin/fpl-mcp"
}
}
}
Find the full path by running which fpl-mcp
in your terminal after activating your virtual environment.
To use features requiring authentication (like accessing your team):
fpl-mcp-config setup
This interactive tool will guide you through setting up your FPL credentials.
Alternatively, manually configure authentication by creating one of these:
Create ~/.fpl-mcp/.env
file:
[email protected]
FPL_PASSWORD=your_password
FPL_TEAM_ID=your_team_id
Or create ~/.fpl-mcp/config.json
:
{
"email": "[email protected]",
"password": "your_password",
"team_id": "your_team_id"
}
Or set environment variables:
export [email protected]
export FPL_PASSWORD=your_password
export FPL_TEAM_ID=your_team_id
Test your authentication with:
fpl-mcp-config test
Once configured, start Claude Desktop and you should see FPL tools available via the hammer icon.
fpl://static/players
- All player data with comprehensive statisticsfpl://static/players/{name}
- Player data by name searchfpl://static/teams
- All Premier League teamsfpl://static/teams/{name}
- Team data by name searchfpl://gameweeks/current
- Current gameweek datafpl://gameweeks/all
- All gameweeks datafpl://fixtures
- All fixtures for the current seasonfpl://fixtures/gameweek/{gameweek_id}
- Fixtures for a specific gameweekfpl://fixtures/team/{team_name}
- Fixtures for a specific teamfpl://players/{player_name}/fixtures
- Upcoming fixtures for a specific playerfpl://gameweeks/blank
- Information about upcoming blank gameweeksfpl://gameweeks/double
- Information about upcoming double gameweeksget_gameweek_status
- Get precise information about current, previous, and next gameweeksanalyze_player_fixtures
- Analyze upcoming fixtures for a player with difficulty ratingsget_blank_gameweeks
- Get information about upcoming blank gameweeksget_double_gameweeks
- Get information about upcoming double gameweeksanalyze_players
- Filter and analyze FPL players based on multiple criteriaanalyze_fixtures
- Analyze upcoming fixtures for players, teams, or positionscompare_players
- Compare multiple players across various metricscheck_fpl_authentication
- Check if FPL authentication is working correctlyget_my_team
- View your authenticated team (requires authentication)get_team
- View any team with a specific ID (requires authentication)get_manager_info
- Get manager details (requires authentication)This occurs because Claude Desktop cannot find the fpl-mcp
executable.
Solution: Use one of these approaches:
If the server starts but immediately disconnects:
~/Library/Logs/Claude/mcp*.log
(macOS) or %APPDATA%\Claude\logs\mcp*.log
(Windows)python -m fpl_mcp
to see any errorsIf the hammer icon doesn't appear:
claude_desktop_config.json
has correct JSON syntaxTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "fantasy-pl" '{"command":"python","args":["-m","fpl_mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"fantasy-pl": {
"command": "python",
"args": [
"-m",
"fpl_mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"fantasy-pl": {
"command": "python",
"args": [
"-m",
"fpl_mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect