Skip to content

Commit aa4a471

Browse files
authored
Merge pull request #5 from willvelida/feature/apim-integration
Adding initial cut of APIM service
2 parents 700f78e + c74975c commit aa4a471

39 files changed

Lines changed: 2195 additions & 1689 deletions

.github/workflows/deployMcpServer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
name: ${{ github.run_number }}
183183
template-file: './infra/deployMcpServer.bicep'
184184
parameters-file: './infra/parameters.deployMcpServer.bicepparam'
185-
parameters: '{"imageName": "${{ needs.build-container-image.outputs.loginServer}}/afl-mcp-server:${{ github.sha }}"}'
185+
parameters: '{"imageName": "${{ needs.build-container-image.outputs.loginServer}}/afl-mcp-server:${{ github.sha }}", "emailAddress": "${{ secrets.EMAIL_ADDRESS }}"}'
186186

187187
deploy-mcp-server:
188188
name: Deploy MCP Server
@@ -211,6 +211,6 @@ jobs:
211211
name: ${{ github.run_number }}
212212
template-file: './infra/deployMcpServer.bicep'
213213
parameters-file: './infra/parameters.deployMcpServer.bicepparam'
214-
parameters: '{"imageName": "${{ needs.build-container-image.outputs.loginServer}}/afl-mcp-server:${{ github.sha }}"}'
214+
parameters: '{"imageName": "${{ needs.build-container-image.outputs.loginServer}}/afl-mcp-server:${{ github.sha }}", "emailAddress": "${{ secrets.EMAIL_ADDRESS }}"}'
215215

216216

README.md

Lines changed: 135 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,164 @@
1-
# AFL (Australian Football League) MCP Server
1+
# 🏈 AFL (Australian Football League) MCP Server
22

3-
This is a Model Context Protocol (MCP) server that provides AFL (Australian Football League) data from Squiggle API. It allows you to retrieve information about past AFL games, current and past standings, and team information.
3+
This is a Model Context Protocol (MCP) server that provides AFL (Australian Football League) data from the Squiggle API. It allows you to retrieve information about past AFL games, current and past standings, team information, power rankings, tips, and projections.
44

5-
## Features
5+
[![.NET](https://img.shields.io/badge/.NET-9.0-512BD4?style=flat-square&logo=dotnet&logoColor=white)](https://dotnet.microsoft.com/download/dotnet/9.0)
6+
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
7+
[![MCP](https://img.shields.io/badge/MCP-Compatible-green.svg?style=flat-square)](https://modelcontextprotocol.io)
68

7-
This MCP Server offers access to AFL data, providing tools for:
9+
## ✨ Features
810

9-
- Retrieving current AFL Standings.
10-
- Retrieving past AFL Standings by round and year.
11-
- Retrieving results from a particular game.
12-
- Retreiving results from a round by year (E.g. All results for Round 1 in 2017).
13-
- Retreiving basic information about a team.
14-
- Retreiving a list of teams who played in a particular season.
11+
This MCP Server offers comprehensive access to AFL data, providing tools for:
1512

16-
## Squiggle API
13+
- 🏆 Retrieving current AFL standings
14+
- 📊 Retrieving past AFL standings by round and year
15+
- 🎯 Retrieving results from particular games or rounds
16+
- 👥 Retrieving basic information about teams
17+
- 📅 Retrieving lists of teams who played in particular seasons
18+
- 🔮 Getting tips and predictions for games
19+
- 📈 Accessing power rankings and projected ladders
20+
- 🔍 Managing data sources and configurations
1721

18-
This server uses the Squiggle API to retrieve AFL data. The API provides methods to fetch basic data about AFL games, including fixtures, ladders, match scores etc. All information about the API (including how to use it responsibly!) can be found [here](https://api.squiggle.com.au/).
22+
## 📋 Prerequisites
1923

20-
## MCP Tools
24+
- [.NET 9.0](https://dotnet.microsoft.com/download/dotnet/9.0) or later
25+
- A Model Context Protocol (MCP) compatible client (e.g., Claude for Desktop)
26+
- Internet connection for accessing the Squiggle API
27+
28+
## ⚡ Quick Install
29+
30+
### 🎯 Claude Desktop Integration
31+
32+
1. Edit the Claude for Desktop config file:
33+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
34+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
35+
36+
2. Add the server configuration:
37+
38+
```json
39+
{
40+
"mcpServers": {
41+
"mcp-afl-server": {
42+
"command": "dotnet",
43+
"args": [
44+
"run",
45+
"--project",
46+
"C:\\path\\to\\mcp-afl-server\\src",
47+
"--no-build"
48+
]
49+
}
50+
}
51+
}
52+
```
53+
54+
## 🚀 What can you do with the AFL MCP Server?
55+
56+
Here are some example prompts you can try once connected:
57+
58+
### 🏆 Current Season Information
59+
60+
- "What are the current AFL standings?"
61+
- "Show me the results from Round 10, 2024"
62+
- "Get information about the Richmond Tigers"
63+
- "List all teams that played in the 2024 season"
64+
65+
### 📊 Historical Data
66+
67+
- "What were the standings after Round 15 in 2023?"
68+
- "Show me all results from Round 1, 2022"
69+
- "Get the result of a specific game"
70+
71+
### 🔮 Tips & Predictions
72+
73+
- "What are the current tips for upcoming games?"
74+
- "Show me tips for Round 5, 2024"
75+
- "Get tips for a specific game"
76+
77+
### 📈 Advanced Analytics
78+
79+
- "Show me the power rankings for Round 20, 2023"
80+
- "Get the projected ladder for Round 15, 2024"
81+
- "List all available data sources"
82+
83+
## 📡 Squiggle API
84+
85+
This server uses the Squiggle API to retrieve AFL data. The API provides comprehensive methods to fetch:
86+
87+
- 🎯 Live scores and fixtures
88+
- 📊 Historical match results
89+
- 👥 Team information and statistics
90+
- 🏆 Ladder positions and standings
91+
- 🔮 Tips and predictions
92+
- 📈 Power rankings and projections
93+
94+
Please use the API responsibly! All information about proper usage can be found at [api.squiggle.com.au](api.squiggle.com.au).
95+
96+
## 🛠️ MCP Tools
2197

2298
The server exposes the following tools through the Model Context Protocol:
2399

24-
### Game Information
100+
### 🎯 Game Information
25101

26102
| **Tool** | **Description** |
27103
|:--------:|:---------------:|
28-
| `GetGameResult` | Gets result from a played game. |
29-
| `GetRoundResultsByYear` | Get the results from a round of a particular year. |
104+
| `GetGameResult` | Gets result from a played game |
105+
| `GetRoundResultsByYear` | Get the results from a round of a particular year |
30106

31-
### Standings Information
107+
### 🏆 Standings Information
32108

33109
| **Tool** | **Description** |
34110
|:--------:|:---------------:|
35-
| `GetCurrentStandings` | Gets the current standings of the AFL. |
36-
| `GetStandingsByRoundAndYear` | Get the standings for a particular round and year. |
111+
| `GetCurrentStandings` | Gets the current standings of the AFL |
112+
| `GetStandingsByRoundAndYear` | Get the standings for a particular round and year |
37113

38-
### Team Information
114+
### 👥 Team Information
39115

40116
| **Tool** | **Description** |
41117
|:--------:|:---------------:|
42-
| `GetTeamInfo` | Gets information for a AFL team. |
43-
| `GetTeamsBySeason` | Gets a list of teams who played in a particular season. |
118+
| `GetTeamInfo` | Gets information for an AFL team |
119+
| `GetTeamsBySeason` | Gets a list of teams who played in a particular season |
44120

45-
## Usage
121+
### 🔮 Tips & Predictions
46122

47-
**Integration with Claude for Desktop**
123+
| **Tool** | **Description** |
124+
|:--------:|:---------------:|
125+
| `GetFutureTips` | Get the tips for current and future games |
126+
| `GetTipsByGame` | Get the tips of a particular game |
127+
| `GetTipsByRoundAndYear` | Get the tips for a particular round and year |
48128

49-
To integrate this server with Claude for Desktop:
129+
### 📈 Power Rankings & Projections
50130

51-
1. Edit the Claude for Desktop config file, located at:
131+
| **Tool** | **Description** |
132+
|:--------:|:---------------:|
133+
| `GetPowerRankingByRoundAndYear` | Get Power Ranking by Round and Year |
134+
| `GetPowerRankingByRoundYearAndSource` | Get Power Ranking by Round, Year, and Model Source |
135+
| `GetTeamPowerRankingByRoundAndYear` | Get Power Ranking for Team by Round, Year, and Model Source |
136+
| `GetProjectedLadderByRoundAndYear` | Get the projected ladder for a particular round and year |
137+
| `GetProjectedLadderByRoundAndYearBySource` | Get the projected ladder by source for a particular round and year |
52138

53-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
54-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
139+
### 🔍 Sources & Configuration
55140

56-
2. Add the server to your configuration:
141+
| **Tool** | **Description** |
142+
|:--------:|:---------------:|
143+
| `GetSources` | Gets a list of sources |
144+
| `GetSourceById` | Gets a source |
57145

58-
```json
59-
{
60-
"mcpServers": {
61-
"mcp-afl-server": {
62-
"command": "dotnet",
63-
"args": [
64-
"run",
65-
"--project",
66-
"PATH\\TO\\PROJECT",
67-
"--no-build"
68-
]
69-
}
70-
}
71-
}
72-
```
146+
## 📜 License
147+
148+
This project is licensed under the [MIT License](LICENSE) - see the LICENSE file for details.
149+
150+
## 💬 Feedback
151+
152+
We're building this in the open and your feedback is much appreciated!
153+
154+
🐛 [Report a bug or request a feature](https://github.com/willvelida/mcp-afl-server/issues/new)
155+
156+
Your input helps shape the future of the AFL MCP Server and makes it better for everyone in the AFL community.
157+
158+
## 🏈 About AFL
159+
160+
The Australian Football League (AFL) is the premier professional Australian rules football competition in Australia. This server provides programmatic access to comprehensive AFL data to enhance your analysis, applications, and understanding of the game.
161+
162+
---
73163

74-
3. Restart Claude for Desktop
164+
**Built with ❤️ for the AFL community**

infra/apim/apim.bicep

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
@description('Base name used for all resources')
2+
param baseName string
3+
4+
@description('The Azure region where this APIM resource will be deployed. Default is the resource group location')
5+
param location string = resourceGroup().location
6+
7+
@description('The name of the environment that this APIM will be deployed to. Default value is "prod"')
8+
@allowed([
9+
'dev'
10+
'test'
11+
'prod'
12+
])
13+
param environmentName string = 'prod'
14+
15+
@description('The tags that will be applied to the APIM resource')
16+
param tags object
17+
18+
@description('The email address of the publisher')
19+
param emailAddress string
20+
21+
@description('The name of the Publisher')
22+
param publisherName string
23+
24+
@description('The name of the App Insights workspace that this APIM will use')
25+
param appInsightsName string
26+
27+
var apimName = 'apim-${baseName}-${environmentName}'
28+
var loggerName = '${apimName}-logger'
29+
var loggerDescription = 'APIM Logger for MCP Servers'
30+
31+
resource appInsights 'Microsoft.Insights/components@2020-02-02' existing = {
32+
name: appInsightsName
33+
}
34+
35+
resource apim 'Microsoft.ApiManagement/service@2024-06-01-preview' = {
36+
name: apimName
37+
location: location
38+
tags: tags
39+
sku: {
40+
name: 'Consumption'
41+
capacity: 0
42+
}
43+
properties: {
44+
publisherEmail: emailAddress
45+
publisherName: publisherName
46+
}
47+
}
48+
49+
resource apimLogger 'Microsoft.ApiManagement/service/loggers@2024-06-01-preview' = {
50+
name: loggerName
51+
parent: apim
52+
properties: {
53+
loggerType: 'applicationInsights'
54+
credentials: {
55+
instrumentationKey: appInsights.properties.InstrumentationKey
56+
}
57+
description: loggerDescription
58+
isBuffered: false
59+
resourceId: appInsights.id
60+
}
61+
}
62+
63+
@description('The resource ID of the deployed APIM Service')
64+
output id string = apim.id
65+
66+
@description('The name of the deployed APIM service')
67+
output name string = apim.name
68+
69+
@description('The Gateway URL of the deployed APIM service')
70+
output gatewayUrl string = apim.properties.gatewayUrl

0 commit comments

Comments
 (0)