Firstcycling Mcp 伺服器
概覽
什麼是 FirstCycling MCP?
FirstCycling MCP(模型上下文協議)是一個提供與專業自行車賽相關的全面數據的伺服器。它是檢索專業自行車手、比賽結果和各種自行車賽事信息的寶貴資源。這個協議旨在方便地訪問自行車數據,使其成為對自行車領域感興趣的愛好者、研究人員和開發者的必備工具。
FirstCycling MCP 的特點
- 全面數據訪問:用戶可以訪問包括自行車手檔案、比賽結果和歷史數據在內的廣泛數據。
- 用戶友好的界面:伺服器設計直觀,使用戶能夠輕鬆導航並檢索所需的信息。
- 實時更新:提供的數據定期更新,以確保準確性和相關性,反映自行車界最新的事件和統計數據。
- 開源:作為一個公共存儲庫,它鼓勵社區的合作和貢獻,增強可用數據的豐富性。
- 靈活集成:MCP 可以集成到各種應用程序中,成為開發者將自行車數據納入其項目的多功能工具。
如何使用 FirstCycling MCP
- 訪問存儲庫:訪問 FirstCycling MCP GitHub 頁面 探索可用的資源和文檔。
- 克隆存儲庫:使用 Git 將存儲庫克隆到本地機器以進行開發和測試。
git clone https://github.com/r-huijts/firstcycling-mcp.git
- 探索 API:熟悉文檔中提供的 API 端點,以了解如何檢索所需的數據。
- 集成到您的應用程序中:在您的應用程序中使用數據,無論是用於分析、顯示還是進一步開發。
- 貢獻:如果您有改進或額外數據要分享,考慮將其貢獻回存儲庫。
常見問題解答
問:我可以使用 FirstCycling MCP 檢索什麼類型的數據?
答:您可以檢索有關專業自行車手、比賽結果、歷史數據等的數據。
問:FirstCycling MCP 是免費使用的嗎?
答:是的,它是一個開源項目,供公眾使用。
問:數據更新的頻率是多少?
答:數據會定期更新,以確保反映自行車界最新的可用信息。
問:我可以為 FirstCycling MCP 項目做貢獻嗎?
答:當然可以!歡迎貢獻。您可以分叉存儲庫,進行更改並提交拉取請求。
問:是否有可供開發者使用的文檔?
答:是的,存儲庫中提供了詳細的文檔,以幫助開發者有效使用 MCP。
詳細
FirstCycling MCP Server
This is a Model Context Protocol (MCP) server that provides professional cycling data from FirstCycling. It allows you to retrieve comprehensive information about professional cyclists, race results, race details, and historical cycling data.
Features
This MCP server offers rich access to professional cycling data, providing tools for:
- Finding information about professional cyclists
- Retrieving race results and details
- Exploring historical race data
- Analyzing rider performance and career progression
- Accessing information about cycling teams and competitions
Real-World Use Cases
With this MCP server, you can use Claude to:
Rider Analysis
- Performance Tracking: "How has Tadej Pogačar performed in the Tour de France over the years?"
- Career Progression: "Show me the team history and career progression of Wout van Aert."
- Specialization Analysis: "What are Mathieu van der Poel's results in Monument classics?"
- Victory Analysis: "List all WorldTour victories for Jonas Vingegaard."
- Historical Comparison: "Compare the Grand Tour results of Primož Roglič and Jonas Vingegaard."
Race Research
- Recent Results: "Show me the results of the 2023 Paris-Roubaix."
- Historical Context: "Who are the youngest and oldest winners of the Tour of Flanders?"
- Team Analysis: "Get the startlist for the 2023 Tour de France with detailed team information."
- Race Statistics: "Show me the victory table for Liège-Bastogne-Liège. Who has won it the most times?"
- Stage Information: "Can you show me the stage profiles for the 2023 Giro d'Italia?"
Sports Journalism
- "Create a detailed profile of Remco Evenepoel for a cycling magazine article."
- "Write a preview for the upcoming Tour de France based on the recent results of top contenders like Tadej Pogačar and Jonas Vingegaard."
- "Analyze the evolution of Tom Pidcock's career based on his race results and team history."
Cycling Education
- "Explain what makes the Monument classics special using data about their history and winners."
- "Create an educational summary about Grand Tours and their significance in professional cycling."
- "Describe the typical career progression of a professional cyclist using examples from the data."
Requirements
- Python 3.10 or higher
uv
package manager (recommended)- Dependencies as listed in
pyproject.toml
, including:- mcp
- beautifulsoup4
- lxml
- pandas
- slumber
- and other packages for web scraping and data processing
Setup
- Clone this repository
- Create and activate a virtual environment:
uv venv source .venv/bin/activate # On macOS/Linux # or .venv\Scripts\activate # On Windows
- Install dependencies:
uv pip install -e .
FirstCycling API
This server uses the FirstCycling API, which has been integrated directly into the project. The API provides methods to fetch data from the FirstCycling website through web scraping.
MCP Tools
The server exposes the following tools through the Model Context Protocol:
Rider Information
| Tool | Description |
||-|
| get_rider_info
| Get basic biographical information about a rider including nationality, birthdate, weight, height, and current team |
| get_rider_best_results
| Retrieve a rider's best career results, sorted by importance |
| get_rider_grand_tour_results
| Get a rider's results in Grand Tours (Tour de France, Giro d'Italia, Vuelta a España) |
| get_rider_monument_results
| Retrieve a rider's results in cycling's Monument classics |
| get_rider_team_and_ranking
| Get a rider's team history and UCI ranking evolution over time |
| get_rider_race_history
| Retrieve a rider's complete race participation history, optionally filtered by year |
| get_rider_one_day_races
| Get a rider's results in one-day races, optionally filtered by year |
| get_rider_stage_races
| Get a rider's results in multi-day stage races, optionally filtered by year |
| get_rider_teams
| Retrieve the complete team history of a rider throughout their career |
| get_rider_victories
| Get a list of a rider's career victories, with optional filters for WorldTour or UCI races |
Race Information
| Tool | Description |
||-|
| get_race_results
| Retrieve results for a specific race edition by race ID and year |
| get_race_overview
| Get general information about a race including history, records, and past winners |
| get_race_stage_profiles
| Retrieve stage profiles and details for multi-stage races |
| get_race_startlist
| Get the startlist for a specific race edition with detailed or basic team information |
| get_race_victory_table
| Retrieve the all-time victory table for a race showing riders with most wins |
| get_race_year_by_year
| Get year-by-year results for a race with optional classification filter |
| get_race_youngest_oldest_winners
| Retrieve information about the youngest and oldest winners of a race |
| get_race_stage_victories
| Get information about stage victories in multi-stage races |
Search Tools
| Tool | Description |
||-|
| search_rider
| Search for riders by name, returning their IDs and basic information |
| search_race
| Search for races by name, returning their IDs and basic information |
Usage
Development Mode
You can test the server with MCP Inspector by running:
uv run mcp dev firstcycling.py
This will start the server and open the MCP Inspector in your browser, allowing you to test the available tools.
Integration with Claude for Desktop
To integrate this server with Claude for Desktop:
-
Edit the Claude for Desktop config file, located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add the server to your configuration:
{ "mcpServers": { "firstcycling": { "command": "uv", "args": ["--directory", "/path/to/server/directory", "run", "firstcycling.py"] } } }
-
Restart Claude for Desktop
License
MIT
伺服器配置
{
"mcpServers": {
"firstcycling-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--r-huijts--firstcycling-mcp--firstcycling-mcp",
"python -m firstcycling"
],
"env": {}
}
}
}