ligamx-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Liga MX API
Query Liga MX form, head-to-head history, and tournament standings from football-data.co.uk match data.
Data is rebuilt daily into a local SQLite database (data/ligamx.db). Form and H2H are answered from the matches table; standings are materialised at rebuild time.
Setup
Requires Python 3.12+ and uv.
uv sync
DATA_URL=https://www.football-data.co.uk/new/MEX.csv ./scripts/rebuild_db.shOr rebuild from an existing CSV without re-downloading:
uv run python -m ligamx.etlRelated MCP server: copamind-mcp
Run the server
One process serves both the REST API and MCP (streamable HTTP):
uv run ligamx-serve
# or
uv run uvicorn ligamx.api:app --reloadREST docs: http://127.0.0.1:8000/docs
MCP endpoint:
http://127.0.0.1:8000/mcp
Deploy on Fly.io
The image rebuilds data/ligamx.db from DATA_URL on every start (fits free machines that stop when idle).
Set the CSV URL as a Fly secret (required by scripts/rebuild_db.sh):
fly secrets set DATA_URL=https://www.football-data.co.uk/new/MEX.csv# once: install flyctl, log in, then from the repo root:
fly launch # accept the existing fly.toml; pick a unique app name if needed
fly deployUseful checks:
fly status
fly logs
fly open /docsApp URL will look like https://<app-name>.fly.dev — MCP at /mcp, REST docs at /docs.
After deploy, optional daily refresh without idle sleep:
fly machine run --schedule daily ... # or just rely on rebuild-on-boot when traffic wakes the machineOn the free allowance, auto_stop_machines means the first request after idle pays a cold start (download CSV + ETL + boot).
MCP (HTTP)
Point an MCP client at the streamable HTTP URL (no stdio):
{
"mcpServers": {
"ligamx": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}Exact client config keys vary; the transport is streamable HTTP at /mcp.
MCP tools
Tool | Description |
| All known team slugs |
| Last |
| Historical H2H between two slugs |
| Full current tournament table |
| One team’s row in the current table |
REST and MCP share ligamx/service.py payloads.
Endpoints
Method | Path | Description |
|
| Liveness check |
|
| Last |
|
| Historical head-to-head + summary |
|
| Full table for the current tournament |
|
| One team’s row in the current table |
|
| MCP streamable HTTP endpoint |
Unknown team slugs return 404.
Examples
curl 'http://127.0.0.1:8000/teams/america/form?n=10'
curl 'http://127.0.0.1:8000/h2h/america/guadalajara'
curl 'http://127.0.0.1:8000/standings/current'
curl 'http://127.0.0.1:8000/teams/tigres/position'Pipeline
MEX.csv → ligamx.etl → ligamx.db → FastAPI (REST + MCP /mcp)
│
├─ matches (raw names + slugs)
└─ standings (per season + tournament)scripts/rebuild_db.shdownloadsDATA_URL(required env var) intodata/MEX.csvand runs the ETL.ETL loads matches via the CSV reader, normalises team names to slugs, writes a temp SQLite file, then atomically replaces
data/ligamx.db.Standings are aggregated with 3/1/0 points and ranked by points → goal difference → goals for.
Tournaments
The CSV only has a Season string (e.g. 2025/2026). Short tournaments are derived from the match date:
Apertura — July–December
Clausura — January–June
“Current” standings use the season and tournament of the latest match in the database.
Team slugs
Raw CSV labels are kept on each match; API paths use stable slugs from ligamx/teams.py:
Slug | CSV label |
| Club America |
| Atlante |
| Atlas |
| Atl. San Luis |
| Chiapas |
| Cruz Azul |
| Dorados de Sinaloa |
| Guadalajara Chivas |
| Juarez |
| Club Leon |
| Leones Negros |
| Lobos BUAP |
| Mazatlan FC |
| Monterrey |
| Monarcas |
| Necaxa |
| Pachuca |
| Puebla |
| UNAM Pumas |
| Queretaro |
| Santos Laguna |
| Tigres UANL |
| Club Tijuana |
| Toluca |
| Veracruz |
Package layout
Path | Role |
| Parse |
| Raw name → slug map |
| Schema + SQLite connection |
| Daily rebuild + standings |
| Form / H2H / standings helpers |
| Shared JSON payloads for API + MCP |
| FastAPI REST + MCP HTTP mount |
| MCP tool definitions |
| Download + ETL entrypoint |
| Container entrypoint (rebuild + serve) |
| Fly.io deploy |
| football-data.co.uk column key |
Library usage
from ligamx.queries import get_form, get_h2h, get_standings, get_position
get_form("america", n=5)
get_h2h("america", "guadalajara")
get_standings() # current tournament
get_position("tigres")Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Independent statistical feature evaluation for machine learning and forecasting. ML Referee tests up to 1,000 candidate features in one run against a declared baseline, helping researchers and AI agents decide which inputs to pursue, which bounded feature repairs merit further testing, and where more evidence is needed—without a separate ablation run for every feature. Use the MCP tools to discover input schemas, check access and credits, preflight a dataset, obtain a quote, submit an authorized evaluation, and retrieve structured results and reports. Results are scoped to the submitted evidence and evaluation design; they do not guarantee future model performance. Invite-only beta with manual approval. Public tool discovery requires no authentication; account and evaluation tools require OAuth through approved client connections and available evaluation credits. Connect directly to https://api.mlreferee.com/mcp. Website: https://mlreferee.com Request beta access: https://mlreferee.com/beta Agent setup and documentation: https://mlreferee.com/agents
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Hosted MCP server from TwitterAPI.io that gives AI agents read-only access to Twitter/X data. 12 tools: tweet search with X operators, user profiles, a user's latest tweets, followers and followings, replies, quotes, retweeters, mentions and trends. Connect at https://mcp.twitterapi.io/mcp with a TwitterAPI.io API key or account sign-in; usage is paid per result returned.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides live football data through MCP tools, enabling users to fetch today's matches and top scorers for competitions like the Premier League or World Cup.2-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with the CopaMind platform via MCP, exposing read-only and write tools for querying match predictions, Monte Carlo simulations, team rankings, and RAG-based explanations, all while maintaining full traceability and reproducibility.1MIT
- AlicenseAqualityDmaintenanceEnables MCP clients to access live football data from FotMob, including match stats, team form, injuries, and player workload, without making predictions.101MIT
- FlicenseAqualityBmaintenanceEnables querying FotMob football data including matches, match details, teams, leagues, players, and search through MCP-compatible LLM clients.6-