ProCyclingStats MCP服务器
MCP(模型上下文协议)服务器,从以下位置提供专业自行车数据 ProCyclingStats.
工具
| 工具 | 说明 |
|---|---|
discover_races | 从PCS日历中查找给定年份和级别的比赛 |
get_race_overview | 获取比赛元数据——姓名、日期、类别、赛段列表 |
get_stage_results | 使用元数据获取完整的赛段/单日比赛结果 |
get_rider_profile | 获取骑手简介、体能数据、专业得分、掌上记录 |
get_race_startlist | 获取按团队分组的比赛的出发名单 |
search_pcs | 免费文本搜索车手、比赛和车队 |
安装
pip install git+https://github.com/lewis-mcgillion/procyclingstats-mcp-server.git或者克隆并在本地安装:
git clone https://github.com/lewis-mcgillion/procyclingstats-mcp-server.git
cd procyclingstats-mcp-server
pip install -e .用法
直接运行服务器
procyclingstats-mcp在MCP客户端中配置
添加到您的MCP客户端配置中(例如Claude Desktop、VS Code GitHub Copilot)。
推荐使用 uvx (无需手动安装):
{
"mcpServers": {
"procyclingstats": {
"command": "uvx",
"args": ["--from", "git+https://github.com/lewis-mcgillion/procyclingstats-mcp-server.git", "procyclingstats-mcp"]
}
}
}使用本地克隆 uv:
{
"mcpServers": {
"procyclingstats": {
"command": "uv",
"args": ["run", "--directory", "/path/to/procyclingstats-mcp-server", "procyclingstats-mcp"]
}
}
}使用全局安装:
{
"mcpServers": {
"procyclingstats": {
"command": "procyclingstats-mcp",
"args": []
}
}
}查询示例
- “2025年世界巡回赛将举行哪些比赛?”
- “让我看看环法自行车赛2025第一阶段的成绩”
- “Tadej Pogačar的骑手简介是什么?”
- “谁在2025年环意大利自行车赛的首发名单上?”
- “搜索雷姆科·埃文埃波尔”
URL格式
所有PCS URL都使用slug格式:
- 比赛:
race/tour-de-france/2025 - 阶段:
race/tour-de-france/2025/stage-1 - 一天的结果:
race/milano-sanremo/2025/result - 乘客:
rider/tadej-pogacar
速率限制
服务器在向PCS发出请求之间强制执行0.5秒的延迟,并在服务器错误时自动重试(500/502/503/429)。
学分
建在 顺周期统计 Python库。
