fpl-mcp-server 0.1.5__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/.github/workflows/publish-docker.yml +2 -0
  2. fpl_mcp_server-0.1.7/.pre-commit-config.yaml +15 -0
  3. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/CONTRIBUTING.md +18 -0
  4. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/Dockerfile +2 -1
  5. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/PKG-INFO +67 -58
  6. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/README.md +66 -57
  7. fpl_mcp_server-0.1.7/docs/configuration.md +146 -0
  8. fpl_mcp_server-0.1.7/docs/fpl-api-swagger.json +1004 -0
  9. fpl_mcp_server-0.1.7/docs/installation.md +185 -0
  10. fpl_mcp_server-0.1.7/docs/releasing.md +159 -0
  11. fpl_mcp_server-0.1.7/docs/tool-selection-guide.md +132 -0
  12. fpl_mcp_server-0.1.7/docs/usage-examples.md +37 -0
  13. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/pyproject.toml +1 -1
  14. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/client.py +31 -14
  15. fpl_mcp_server-0.1.7/src/constants.py +34 -0
  16. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/models.py +15 -30
  17. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/prompts/__init__.py +2 -0
  18. fpl_mcp_server-0.1.7/src/prompts/captain_recommendation.py +149 -0
  19. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/prompts/league_analysis.py +12 -5
  20. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/prompts/player_analysis.py +2 -3
  21. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/prompts/squad_analysis.py +1 -1
  22. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/prompts/team_analysis.py +2 -1
  23. fpl_mcp_server-0.1.7/src/prompts/team_selection.py +105 -0
  24. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/prompts/transfers.py +4 -3
  25. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/resources/bootstrap.py +7 -1
  26. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/state.py +10 -4
  27. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/tools/__init__.py +0 -2
  28. fpl_mcp_server-0.1.7/src/tools/fixtures.py +342 -0
  29. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/tools/gameweeks.py +0 -198
  30. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/tools/leagues.py +365 -14
  31. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/tools/players.py +256 -295
  32. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/tools/teams.py +1 -189
  33. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/tools/transfers.py +248 -126
  34. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/conftest.py +62 -7
  35. fpl_mcp_server-0.1.7/tests/test_tools_advanced.py +341 -0
  36. fpl_mcp_server-0.1.7/tests/test_tools_coverage.py +126 -0
  37. fpl_mcp_server-0.1.7/tests/test_tools_coverage_extra.py +119 -0
  38. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_tools_integration.py +82 -213
  39. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/uv.lock +1 -1
  40. fpl_mcp_server-0.1.5/src/constants.py +0 -118
  41. fpl_mcp_server-0.1.5/src/tools/fixtures.py +0 -162
  42. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/.dockerignore +0 -0
  43. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/.env.example +0 -0
  44. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/.github/workflows/lint.yml +0 -0
  45. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/.github/workflows/publish-pypi.yml +0 -0
  46. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/.github/workflows/test.yml +0 -0
  47. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/.gitignore +0 -0
  48. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/LICENSE +0 -0
  49. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/docs/fpl-api.md +0 -0
  50. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/pytest.ini +0 -0
  51. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/cache.py +0 -0
  52. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/config.py +0 -0
  53. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/exceptions.py +0 -0
  54. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/formatting.py +0 -0
  55. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/main.py +0 -0
  56. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/prompts/chips.py +0 -0
  57. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/rate_limiter.py +0 -0
  58. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/resources/__init__.py +0 -0
  59. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/utils.py +0 -0
  60. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/src/validators.py +0 -0
  61. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_cache.py +0 -0
  62. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_client.py +0 -0
  63. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_client_advanced.py +0 -0
  64. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_exceptions.py +0 -0
  65. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_formatting.py +0 -0
  66. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_models.py +0 -0
  67. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_rate_limiter.py +0 -0
  68. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_resources.py +0 -0
  69. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_state.py +0 -0
  70. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_state_advanced.py +0 -0
  71. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_utils.py +0 -0
  72. {fpl_mcp_server-0.1.5 → fpl_mcp_server-0.1.7}/tests/test_validators.py +0 -0
@@ -13,6 +13,7 @@ env:
13
13
 
14
14
  jobs:
15
15
  build-and-push:
16
+ name: Build and push Docker image
16
17
  runs-on: ubuntu-latest
17
18
  permissions:
18
19
  contents: read
@@ -45,6 +46,7 @@ jobs:
45
46
  type=semver,pattern={{major}}.{{minor}}
46
47
  type=semver,pattern={{major}}
47
48
  type=raw,value=latest,enable={{is_default_branch}}
49
+ type=sha,format=short
48
50
 
49
51
  - name: Build and push Docker image
50
52
  uses: docker/build-push-action@v6
@@ -0,0 +1,15 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: check-yaml
6
+ - id: end-of-file-fixer
7
+ - id: trailing-whitespace
8
+ - repo: https://github.com/astral-sh/ruff-pre-commit
9
+ rev: v0.14.14
10
+ hooks:
11
+ # Run the linter.
12
+ - id: ruff
13
+ args: [--fix]
14
+ # Run the formatter.
15
+ - id: ruff-format
@@ -57,6 +57,24 @@ uv run ruff check --fix src tests
57
57
  uv run ruff format src tests
58
58
  ```
59
59
 
60
+ ### Pre-commit Hooks
61
+
62
+ We use `pre-commit` to verify code quality before committing changes.
63
+
64
+ Setup:
65
+ ```bash
66
+ # Install pre-commit (if not already installed)
67
+ pip install pre-commit
68
+
69
+ # Install the git hooks
70
+ pre-commit install
71
+ ```
72
+
73
+ Now checks will run automatically on commit. To run them manually on all files:
74
+ ```bash
75
+ pre-commit run --all-files
76
+ ```
77
+
60
78
  ### Running Locally
61
79
 
62
80
  ```bash
@@ -31,7 +31,8 @@ LABEL maintainer="nguyenanhducs"
31
31
  LABEL description="Fantasy Premier League MCP Server"
32
32
  LABEL org.opencontainers.image.source="https://github.com/nguyenanhducs/fpl-mcp"
33
33
  LABEL org.opencontainers.image.title="FPL MCP Server"
34
- LABEL org.opencontainers.image.description="Fantasy Premier League Model Context Protocol Server"
34
+ LABEL org.opencontainers.image.description="A comprehensive Model Context Protocol (MCP) server for Fantasy Premier League analysis and strategy. Provides AI assistants with powerful tools, resources, and prompts for data-driven FPL insights."
35
+ LABEL org.opencontainers.image.licenses="MIT"
35
36
 
36
37
  WORKDIR /app
37
38
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fpl-mcp-server
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Fantasy Premier League MCP Server
5
5
  Project-URL: Homepage, https://github.com/nguyenanhducs/fpl-mcp
6
6
  Project-URL: Repository, https://github.com/nguyenanhducs/fpl-mcp
@@ -29,81 +29,100 @@ Requires-Dist: pytest>=7.0.0; extra == 'dev'
29
29
  Requires-Dist: ruff>=0.14.0; extra == 'dev'
30
30
  Description-Content-Type: text/markdown
31
31
 
32
- # FPL MCP Server 🏆⚽
32
+ # Fantasy Premier League MCP Server
33
33
 
34
34
  A comprehensive **Model Context Protocol (MCP)** server for Fantasy Premier League analysis and strategy. This server provides AI assistants with powerful tools, resources, and prompts to help you dominate your FPL mini-leagues with data-driven insights.
35
35
 
36
36
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
37
- [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
37
+ [![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)
38
38
  [![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io)
39
39
 
40
- ## 🌟 Features
40
+ ## Features
41
41
 
42
42
  This MCP server provides comprehensive FPL analysis capabilities through:
43
43
 
44
- - **26 Interactive Tools** - Search players, analyze fixtures, compare managers, track transfers, and more
45
- - **16 Data Resources** - Efficient URI-based access to players, teams, gameweeks, and manager data
46
- - **7 Strategy Prompts** - Structured templates for squad analysis, transfer planning, and chip strategy
44
+ - **17 Interactive Tools** - Search players, analyze fixtures, compare managers, track transfers, and more
45
+ - **4 Data Resources** - access to players, teams, and gameweeks bootstrap data
46
+ - **8 Strategy Prompts** - Structured templates for squad analysis, transfer planning, chip strategy, and captain selection
47
47
  - **Smart Caching** - 4-hour cache for bootstrap data to minimize API calls while keeping data fresh
48
48
  - **Fuzzy Matching** - Find players even with spelling variations or nicknames
49
49
  - **Live Transfer Trends** - Track the most transferred in/out players for current gameweek
50
50
  - **Manager Insights** - Analyze squads, transfers, and chip usage (supports 2025/26 half-season system)
51
51
  - **Fixture Analysis** - Assess team fixtures and plan transfers around favorable runs
52
52
 
53
- ## 🚀 Quick Start
53
+ ## Quick Start
54
54
 
55
- You have **two options** to run the FPL MCP server:
55
+ ### Option 1: uvx (Recommended)
56
56
 
57
- ### Option 1: Run with Docker (Recommended)
57
+ The fastest way to get started - no installation required:
58
58
 
59
59
  ```json
60
60
  {
61
61
  "mcpServers": {
62
62
  "fpl": {
63
- "command": "docker",
64
- "args": ["run", "--rm", "-i", "yourusername/fpl-mcp:latest"]
65
- },
66
- "type": "stdio"
63
+ "command": "uvx",
64
+ "args": ["fpl-mcp-server"],
65
+ "type": "stdio"
66
+ }
67
67
  }
68
68
  }
69
69
  ```
70
70
 
71
- ---
71
+ ### Option 2: Docker
72
72
 
73
- ### Option 2: Run with uv
73
+ Use the official Docker image from GitHub Container Registry:
74
74
 
75
- 1. **Clone and install**:
75
+ ```json
76
+ {
77
+ "mcpServers": {
78
+ "fpl": {
79
+ "command": "docker",
80
+ "args": [
81
+ "run",
82
+ "--rm",
83
+ "-i",
84
+ "ghcr.io/nguyenanhducs/fpl-mcp:latest"
85
+ ],
86
+ "type": "stdio"
87
+ }
88
+ }
89
+ }
90
+ ```
76
91
 
77
- ```bash
78
- git clone https://github.com/nguyenanhducs/fpl-mcp.git
79
- cd fpl-mcp
80
- uv sync
81
- ```
92
+ ### Option 3: From Source
82
93
 
83
- 2. **Configure MCP Servers**:
94
+ For development or local customization:
84
95
 
85
- ```json
86
- {
87
- "mcpServers": {
88
- "fpl": {
89
- "command": "uv",
90
- "args": [
91
- "--directory",
92
- "/absolute/path/to/fpl-mcp",
93
- "run",
94
- "python",
95
- "-m",
96
- "src.main"
97
- ],
98
- "type": "stdio"
99
- }
100
- }
101
- }
102
- ```
96
+ ```bash
97
+ git clone https://github.com/nguyenanhducs/fpl-mcp.git
98
+ cd fpl-mcp
99
+ uv sync
100
+ ```
103
101
 
104
- Replace `/absolute/path/to/fpl-mcp` with the actual path.
102
+ Then configure:
105
103
 
106
- ## 📖 Usage & Documentation
104
+ ```json
105
+ {
106
+ "mcpServers": {
107
+ "fpl": {
108
+ "command": "uv",
109
+ "args": [
110
+ "--directory",
111
+ "/absolute/path/to/fpl-mcp",
112
+ "run",
113
+ "python",
114
+ "-m",
115
+ "src.main"
116
+ ],
117
+ "type": "stdio"
118
+ }
119
+ }
120
+ }
121
+ ```
122
+
123
+ For detailed installation instructions and more options, see **[Installation Guide](./docs/installation.md)**.
124
+
125
+ ## Usage & Documentation
107
126
 
108
127
  Once configured, you can interact with the FPL MCP server through Claude Desktop using natural language.
109
128
 
@@ -112,26 +131,16 @@ For detailed guidance, see:
112
131
  - **[Usage Examples](./docs/usage-examples.md)** - Natural language query examples for player analysis, fixtures, leagues, and strategy
113
132
  - **[Tool Selection Guide](./docs/tool-selection-guide.md)** - Choose the right tool for your analysis task
114
133
 
115
- ## ⚙️ Configuration
134
+ ## Configuration
116
135
 
117
136
  The server works out-of-the-box with sensible defaults, but you can customize cache durations, timeouts, and logging levels through environment variables.
118
137
 
119
138
  For detailed configuration instructions for both Docker and uv deployments, see **[Configuration Guide](./docs/configuration.md)**.
120
139
 
121
- ## Contributing
140
+ ## Data Sources
122
141
 
123
- We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
124
-
125
- **Quick contribution checklist:**
126
-
127
- - Fork the repository
128
- - Create a feature branch
129
- - Write tests for new features
130
- - Ensure all tests pass
131
- - Follow PEP 8 style guidelines
132
- - Use conventional commit messages
133
- - Submit a pull request
142
+ This server uses the official **Fantasy Premier League API**, see [here](./docs/fpl-api.md) for more details.
134
143
 
135
- ## 📊 Data Sources
144
+ ## Contributing
136
145
 
137
- This server uses the official **Fantasy Premier League API**, see [here](./docs/fpl-api.md) for more details.
146
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
@@ -1,78 +1,97 @@
1
- # FPL MCP Server 🏆⚽
1
+ # Fantasy Premier League MCP Server
2
2
 
3
3
  A comprehensive **Model Context Protocol (MCP)** server for Fantasy Premier League analysis and strategy. This server provides AI assistants with powerful tools, resources, and prompts to help you dominate your FPL mini-leagues with data-driven insights.
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
- [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
6
+ [![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)
7
7
  [![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io)
8
8
 
9
- ## 🌟 Features
9
+ ## Features
10
10
 
11
11
  This MCP server provides comprehensive FPL analysis capabilities through:
12
12
 
13
- - **26 Interactive Tools** - Search players, analyze fixtures, compare managers, track transfers, and more
14
- - **16 Data Resources** - Efficient URI-based access to players, teams, gameweeks, and manager data
15
- - **7 Strategy Prompts** - Structured templates for squad analysis, transfer planning, and chip strategy
13
+ - **17 Interactive Tools** - Search players, analyze fixtures, compare managers, track transfers, and more
14
+ - **4 Data Resources** - access to players, teams, and gameweeks bootstrap data
15
+ - **8 Strategy Prompts** - Structured templates for squad analysis, transfer planning, chip strategy, and captain selection
16
16
  - **Smart Caching** - 4-hour cache for bootstrap data to minimize API calls while keeping data fresh
17
17
  - **Fuzzy Matching** - Find players even with spelling variations or nicknames
18
18
  - **Live Transfer Trends** - Track the most transferred in/out players for current gameweek
19
19
  - **Manager Insights** - Analyze squads, transfers, and chip usage (supports 2025/26 half-season system)
20
20
  - **Fixture Analysis** - Assess team fixtures and plan transfers around favorable runs
21
21
 
22
- ## 🚀 Quick Start
22
+ ## Quick Start
23
23
 
24
- You have **two options** to run the FPL MCP server:
24
+ ### Option 1: uvx (Recommended)
25
25
 
26
- ### Option 1: Run with Docker (Recommended)
26
+ The fastest way to get started - no installation required:
27
27
 
28
28
  ```json
29
29
  {
30
30
  "mcpServers": {
31
31
  "fpl": {
32
- "command": "docker",
33
- "args": ["run", "--rm", "-i", "yourusername/fpl-mcp:latest"]
34
- },
35
- "type": "stdio"
32
+ "command": "uvx",
33
+ "args": ["fpl-mcp-server"],
34
+ "type": "stdio"
35
+ }
36
36
  }
37
37
  }
38
38
  ```
39
39
 
40
- ---
40
+ ### Option 2: Docker
41
41
 
42
- ### Option 2: Run with uv
42
+ Use the official Docker image from GitHub Container Registry:
43
43
 
44
- 1. **Clone and install**:
44
+ ```json
45
+ {
46
+ "mcpServers": {
47
+ "fpl": {
48
+ "command": "docker",
49
+ "args": [
50
+ "run",
51
+ "--rm",
52
+ "-i",
53
+ "ghcr.io/nguyenanhducs/fpl-mcp:latest"
54
+ ],
55
+ "type": "stdio"
56
+ }
57
+ }
58
+ }
59
+ ```
45
60
 
46
- ```bash
47
- git clone https://github.com/nguyenanhducs/fpl-mcp.git
48
- cd fpl-mcp
49
- uv sync
50
- ```
61
+ ### Option 3: From Source
51
62
 
52
- 2. **Configure MCP Servers**:
63
+ For development or local customization:
53
64
 
54
- ```json
55
- {
56
- "mcpServers": {
57
- "fpl": {
58
- "command": "uv",
59
- "args": [
60
- "--directory",
61
- "/absolute/path/to/fpl-mcp",
62
- "run",
63
- "python",
64
- "-m",
65
- "src.main"
66
- ],
67
- "type": "stdio"
68
- }
69
- }
70
- }
71
- ```
65
+ ```bash
66
+ git clone https://github.com/nguyenanhducs/fpl-mcp.git
67
+ cd fpl-mcp
68
+ uv sync
69
+ ```
72
70
 
73
- Replace `/absolute/path/to/fpl-mcp` with the actual path.
71
+ Then configure:
74
72
 
75
- ## 📖 Usage & Documentation
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "fpl": {
77
+ "command": "uv",
78
+ "args": [
79
+ "--directory",
80
+ "/absolute/path/to/fpl-mcp",
81
+ "run",
82
+ "python",
83
+ "-m",
84
+ "src.main"
85
+ ],
86
+ "type": "stdio"
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ For detailed installation instructions and more options, see **[Installation Guide](./docs/installation.md)**.
93
+
94
+ ## Usage & Documentation
76
95
 
77
96
  Once configured, you can interact with the FPL MCP server through Claude Desktop using natural language.
78
97
 
@@ -81,26 +100,16 @@ For detailed guidance, see:
81
100
  - **[Usage Examples](./docs/usage-examples.md)** - Natural language query examples for player analysis, fixtures, leagues, and strategy
82
101
  - **[Tool Selection Guide](./docs/tool-selection-guide.md)** - Choose the right tool for your analysis task
83
102
 
84
- ## ⚙️ Configuration
103
+ ## Configuration
85
104
 
86
105
  The server works out-of-the-box with sensible defaults, but you can customize cache durations, timeouts, and logging levels through environment variables.
87
106
 
88
107
  For detailed configuration instructions for both Docker and uv deployments, see **[Configuration Guide](./docs/configuration.md)**.
89
108
 
90
- ## Contributing
109
+ ## Data Sources
91
110
 
92
- We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
93
-
94
- **Quick contribution checklist:**
95
-
96
- - Fork the repository
97
- - Create a feature branch
98
- - Write tests for new features
99
- - Ensure all tests pass
100
- - Follow PEP 8 style guidelines
101
- - Use conventional commit messages
102
- - Submit a pull request
111
+ This server uses the official **Fantasy Premier League API**, see [here](./docs/fpl-api.md) for more details.
103
112
 
104
- ## 📊 Data Sources
113
+ ## Contributing
105
114
 
106
- This server uses the official **Fantasy Premier League API**, see [here](./docs/fpl-api.md) for more details.
115
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
@@ -0,0 +1,146 @@
1
+ # Configuration Guide
2
+
3
+ The FPL MCP Server supports configuration through environment variables. This guide covers how to customize settings for both Docker and uv deployment methods.
4
+
5
+ ## Configuration Options
6
+
7
+ | Variable | Description | Default | Type |
8
+ | ---------------------------------- | --------------------------------------- | ----------------------------------- | ------- |
9
+ | `FPL_MCP_FPL_BASE_URL` | FPL API base URL | `https://fantasy.premierleague.com` | string |
10
+ | `FPL_MCP_FPL_API_TIMEOUT` | API request timeout (seconds) | `30` | integer |
11
+ | `FPL_MCP_BOOTSTRAP_CACHE_TTL` | Bootstrap data cache duration (seconds) | `14400` (4 hours) | integer |
12
+ | `FPL_MCP_FIXTURES_CACHE_TTL` | Fixtures cache duration (seconds) | `14400` (4 hours) | integer |
13
+ | `FPL_MCP_PLAYER_SUMMARY_CACHE_TTL` | Player summary cache duration (seconds) | `300` (5 minutes) | integer |
14
+ | `FPL_MCP_LOG_LEVEL` | Logging level | `INFO` | string |
15
+
16
+ ### Log Levels
17
+
18
+ Available log levels (from least to most verbose):
19
+
20
+ - `CRITICAL` - Only critical errors
21
+ - `ERROR` - Errors and critical issues
22
+ - `WARNING` - Warnings, errors, and critical issues
23
+ - `INFO` - General information (recommended)
24
+ - `DEBUG` - Detailed debugging information
25
+
26
+ ## Docker
27
+
28
+ When running the FPL MCP server with Docker, you can pass environment variables using the `-e` flag
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "fpl": {
34
+ "command": "docker",
35
+ "args": [
36
+ "run",
37
+ "--rm",
38
+ "-i",
39
+ "-e",
40
+ "FPL_MCP_LOG_LEVEL=INFO",
41
+ "-e",
42
+ "FPL_MCP_BOOTSTRAP_CACHE_TTL=7200",
43
+ "-e",
44
+ "FPL_MCP_FIXTURES_CACHE_TTL=7200",
45
+ "nguyenanhducs/fpl-mcp:latest"
46
+ ],
47
+ "type": "stdio"
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ ## UV
54
+
55
+ When running with `uv`, the server automatically loads environment variables from a `.env` file in the project root.
56
+
57
+ ### Step 1: Create Environment File
58
+
59
+ Create a `.env` file in the project root directory:
60
+
61
+ ```bash
62
+ cd /path/to/fpl-mcp
63
+ cp .env.example .env
64
+ ```
65
+
66
+ ### Step 2: Edit Configuration
67
+
68
+ Edit the `.env` file with your preferred settings:
69
+
70
+ ```bash
71
+ # FPL API Configuration
72
+ FPL_MCP_FPL_BASE_URL=https://fantasy.premierleague.com
73
+ FPL_MCP_FPL_API_TIMEOUT=30
74
+
75
+ # Cache Configuration (in seconds)
76
+ FPL_MCP_BOOTSTRAP_CACHE_TTL=14400 # 4 hours
77
+ FPL_MCP_FIXTURES_CACHE_TTL=14400 # 4 hours
78
+ FPL_MCP_PLAYER_SUMMARY_CACHE_TTL=300 # 5 minutes
79
+
80
+ # Logging Configuration
81
+ FPL_MCP_LOG_LEVEL=INFO
82
+ ```
83
+
84
+ ### Step 3: Run the Server
85
+
86
+ The server will automatically load the `.env` file:
87
+
88
+ ```bash
89
+ uv run python -m src.main
90
+ ```
91
+
92
+ > [!TIP]
93
+ > The `.env` file is ignored by git, so your configuration won't be committed to version control.
94
+
95
+ ## Common Configuration Scenarios
96
+
97
+ ### Scenario 1: Development/Debugging
98
+
99
+ For debugging issues, increase logging verbosity:
100
+
101
+ ```bash
102
+ FPL_MCP_LOG_LEVEL=DEBUG
103
+ ```
104
+
105
+ ### Scenario 2: Reduce API Load
106
+
107
+ Increase cache durations to reduce API calls:
108
+
109
+ ```bash
110
+ FPL_MCP_BOOTSTRAP_CACHE_TTL=28800 # 8 hours
111
+ FPL_MCP_FIXTURES_CACHE_TTL=28800 # 8 hours
112
+ FPL_MCP_PLAYER_SUMMARY_CACHE_TTL=600 # 10 minutes
113
+ ```
114
+
115
+ ### Scenario 3: Fresh Data Priority
116
+
117
+ Reduce cache durations for more up-to-date data (may increase API load):
118
+
119
+ ```bash
120
+ FPL_MCP_BOOTSTRAP_CACHE_TTL=1800 # 30 minutes
121
+ FPL_MCP_FIXTURES_CACHE_TTL=1800 # 30 minutes
122
+ FPL_MCP_PLAYER_SUMMARY_CACHE_TTL=60 # 1 minute
123
+ ```
124
+
125
+ ### Scenario 4: Slow Network
126
+
127
+ Increase timeout for slower connections:
128
+
129
+ ```bash
130
+ FPL_MCP_FPL_API_TIMEOUT=60 # 60 seconds
131
+ ```
132
+
133
+ ## Verifying Configuration
134
+
135
+ To verify your configuration is loaded correctly, check the server logs when it starts. With `FPL_MCP_LOG_LEVEL=DEBUG`, you'll see the loaded settings.
136
+
137
+ ## Default Behavior
138
+
139
+ If no environment variables are set, the server uses sensible defaults:
140
+
141
+ - **4-hour cache** for bootstrap data and fixtures
142
+ - **5-minute cache** for player summaries
143
+ - **30-second timeout** for API requests
144
+ - **INFO-level logging** for general operation information
145
+
146
+ These defaults work well for most use cases and balance data freshness with API load.