fpl-mcp
fpl-mcp
An MCP server for Fantasy Premier League. Reads use FPL's public API; authenticated calls use a PingOne OIDC refresh token.
Tools
Tool | Description |
| Current/next gameweek and deadline. |
| Rank players by form, value (points per £m), and upcoming fixture difficulty. Filters: |
| Your current squad, bank, and free transfers. Needs auth. |
| Transfer a player out/in. Previews by default; set |
| Replace the stored auth token from inside chat when it's expired or revoked — no restart needed. |
Setup
npm install
npm run build
cp .env.example .env # then fill in the valuesEnvironment
Var | Purpose |
| Your team ID (the number in |
| PingOne OIDC refresh token — see |
Read-only tools (current_gameweek, recommend_players) work without any env vars.
Auth notes
FPL retired the old users.premierleague.com cookie login in favor of PingOne OIDC (account.premierleague.com). The server:
Exchanges
FPL_REFRESH_TOKENfor a short-lived access token and sends it asX-API-Authorization: Bearer <token>.Refreshes proactively before expiry and on any 401/403.
PingOne rotates the refresh token on every exchange — the server rewrites
FPL_REFRESH_TOKENin.enveach time so the new one survives a restart.If the token is ever revoked or fully expired, call the
update_fpl_credentialstool from chat with a freshly copiedoidc.uservalue instead of editing.envby hand.
Run
node dist/server.js # speaks MCP over stdioClient config example
{
"mcpServers": {
"fpl": {
"command": "node",
"args": ["/absolute/path/to/fpl-mcp/dist/server.js"],
"env": {
"FPL_ENTRY_ID": "1234567",
"FPL_REFRESH_TOKEN": "eyJ..."
}
}
}
}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/mgphp/fpl-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server