FastMCP Copilot Integration
FastMCP Example using Soccer API to expose data using Github Copilot
Ask AI about FastMCP Copilot Integration
Powered by Claude Β· Grounded in docs
I know everything about FastMCP Copilot Integration. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Soccer API - Azure Deployment with GitHub Copilot Integration
This application is an MCP (Model Context Protocol) server that provides real-time football data using FastMCP and the API-FOOTBALL external sports API. The project is designed for seamless integration with GitHub Copilot, enabling AI-powered code suggestions and automation throughout development and deployment.
Project Structure
βββ src/ # Application source code
β βββ __init__.py
β βββ main.py # Main MCP server
β βββ api.py # API client for sports data
βββ infrastructure/ # Infrastructure as Code (IaC)
β βββ main.bicep # Bicep template for Azure resources
β βββ main.parameters.json # Deployment parameters
βββ scripts/ # Automation scripts
β βββ deploy.bat # Windows Batch deployment script
β βββ deploy.ps1 # PowerShell deployment script
βββ docs/ # Documentation
β βββ README.md # Detailed documentation
βββ app.py # Main entry point
βββ requirements.txt # Python dependencies
βββ Dockerfile # Docker configuration
βββ README.md # This file
Integration with GitHub Copilot
- Copilot Usage: The project is structured to maximize GitHub Copilot's capabilities for code completion, refactoring, and deployment automation.
- Configuration Guidance: Copilot can assist in editing configuration files, writing deployment scripts, and generating infrastructure code.
- API Integration: Copilot helps streamline the integration with the API-FOOTBALL service, including authentication and endpoint management.
API Configuration
The application uses the API-FOOTBALL service for sports data. To configure the API:
-
Edit Credentials: Update
infrastructure/main.parameters.jsonwith your API key and base URL:{ "apiKey": { "value": "YOUR_API_KEY_HERE" }, "baseUrl": { "value": "https://api-football-v1.p.rapidapi.com/v3" }, "apiVersion": { "value": "api-football-v1.p.rapidapi.com" } } -
Environment Variables: Set the following environment variables for local development or deployment:
API_KEY: Your API-FOOTBALL keyBASE_URL:https://api-football-v1.p.rapidapi.com/v3API_VERSION:api-football-v1.p.rapidapi.com
Azure Deployment (Docker & AKS)
Automated Deployment
-
Batch Script (Windows):
cd scripts deploy.bat -
PowerShell Script:
cd scripts .\deploy.ps1
Manual Deployment Steps
-
Login to Azure:
az login -
Create Resource Group:
az group create --name rg-soccerapi-dev --location "East US" -
Deploy Infrastructure:
az deployment group create --resource-group rg-soccerapi-dev --template-file infrastructure/main.bicep --parameters infrastructure/main.parameters.json -
Build and Push Docker Image:
docker build -t <ACR_LOGIN_SERVER>/soccerapi-api:latest . docker push <ACR_LOGIN_SERVER>/soccerapi-api:latest -
Restart Web App:
az webapp restart --resource-group rg-soccerapi-dev --name soccerapi-webapp
Deploying with AKS (Azure Kubernetes Service)
- You can adapt the Bicep template and deployment scripts to provision AKS clusters and deploy the containerized application for scalable, managed orchestration.
Endpoints
After deployment, the application will be available at https://{app-name}-webapp.azurewebsites.net with endpoints such as:
/healthβ Health check endpoint- MCP endpoints for sports data (see FastMCP implementation)
Security Features
- Non-root user in Docker container
- Sensitive credentials managed via environment variables
- HTTPS enforced in Azure App Service
- Health check endpoint
- Production-ready Python optimizations
Monitoring & Logs
- View logs:
az webapp log tail --resource-group rg-soccerapi-dev --name soccerapi-webapp - Access logs via Azure Portal: Go to App Service > "Log stream"
Resource Cleanup
To delete all resources:
az group delete --name rg-soccerapi-dev --yes --no-wait
MCP Server Configuration for Copilot
To enable Copilot to interact with your MCP server, configure the .vscode/mcp.json file in your project root. This file defines the MCP server endpoint for Copilot:
{
"servers": {
"sports-mcp": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp/"
}
}
}
Instructions:
- Place this file at
.vscode/mcp.json. - For local development, use
http://127.0.0.1:8000/mcp/as the URL. - For production, update the URL to your deployed server (e.g., Azure Web App or AKS endpoint).
This setup allows GitHub Copilot to send requests to your MCP server, enabling AI-powered features and real-time football data integration in your development workflow.
Estimated Costs
- App Service Plan B1: ~$13.14/month
- Azure Container Registry (Basic): ~$5/month
- Total: ~$18-20/month
Demo

This README is optimized for GitHub Copilot workflows and Azure cloud deployment. For more details, see docs/README.md.
