liga-record-mcp
MCP server that exposes Liga Record fantasy football squad data, rules, and tools to Claude for validating lineups, simulating automatic substitutions, checking transfers, and searching the player market.
README
Liga Record MCP
An MCP server that exposes my Liga Record fantasy football squad to Claude — the rules as tools, the regulation as a resource, and two prompts for the decisions I actually make each round.
The split it's built on: deterministic rules live in code, judgement stays with Claude. Formation legality, budget arithmetic and the §11 automatic substitutions are computed here and are authoritative. Who to start and who to sell is Claude's to reason about, given real data and the real rulebook.
See docs/PLANNING.md for the design and the rule ambiguities this reading of the regulation leaves open.
Setup
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .
The editable install is not optional — it puts liga_record_mcp on the path (the
project uses a src/ layout) and creates the liga-record-mcp launcher the MCP
config points at.
Your squad lives in data/squad.yaml. Copy data/squad.example.yaml and fill in
your 23 players — the loader checks the file against the regulation on every read
and names whatever is missing, so you don't have to count by hand. Point
LIGA_RECORD_SQUAD at a different file to run a second team.
data/coaches.yaml holds the 18 selectable coaches, also hand-maintained
(LIGA_RECORD_COACHES overrides it). It changes only when a club changes
manager.
Connecting it to Claude
.mcp.json in the repo root already declares the server, so Claude Code picks it
up when you open this project — no CLI needed. Restart Claude Code after the
install and approve the server when prompted.
The path in
.mcp.jsonis absolute and machine-specific. Windows resolves a relative command against the launching process's directory, not the server's, so a relative path fails when the app starts it. Edit that path if you move or clone the repo.
Claude Desktop uses the same shape in claude_desktop_config.json:
{
"mcpServers": {
"liga-record": {
"command": "C:\\path\\to\\liga-record-mcp\\.venv\\Scripts\\liga-record-mcp.exe"
}
}
}
Then ask it something: "Is my current XI legal, and who comes on if Diogo Costa doesn't play?"
What it exposes
Tools — get_squad, get_player, search_squad, validate_selection,
simulate_autosubs, check_transfer, project_price, plus four that read the
live site: search_market (the whole player pool, with ownership percentages
for finding differentials), check_market_transfer (prices a swap from the real
quote rather than a hand-typed one), get_fixtures (the league calendar) and
squad_fixtures (each of your players' next opponent, home or away), plus
list_coaches, squad_value, club_strength, project_points,
record_appearances and appearance_history. Every read
carries an as_of timestamp so Claude can say how fresh the data is instead of
presenting a stored squad as live.
project_points blends this season's form with a prior built from completed
seasons and from Record's own pricing, and shows its working. It is explicitly
not validated — Liga Record has never published past scores, so there is
nothing to backtest against.
validate_selection checks the chosen coach against the real 18 (§6.15). If the
coach list can't be read it still validates everything else, but says so rather
than skipping the check silently.
The live client is read-only by design. The site also exposes buy, sell and renegotiate endpoints — their contracts are known — and they are deliberately not implemented. Confirming a transfer stays a human's click on Record's site.
Resources — ligarecord://regulamento (generated from the same constants the
rules enforce, so it can't drift from the code) and ligarecord://squad.
Prompts — pick_starting_xi, plan_transfers.
Tests
./.venv/Scripts/python.exe -m pytest -q
rules.py is pure — no I/O, no network, no clock — so the whole rulebook is
tested without touching the site.
Status
Steps 1–3 are done: the rules engine, the data-source seam with a hand-maintained YAML squad, and the MCP server.
Step 4 reads the live site for both the market and the calendar, neither of which needs authentication — verified with requests carrying no cookie. The session-token problem the plan treated as step 4's main risk simply does not arise for public data.
playersearch.ashx returns clean JSON for all 498 players. The calendar has no
JSON endpoint, so all 306 fixtures are parsed out of one page; every selector
lives in a single function and is pinned against a recorded copy of that page,
so a redesign fails one test rather than surfacing as wrong advice.
Reading a specific team's squad does still need a login, so data/squad.yaml
remains hand-maintained. That is the remaining piece.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。