
Igpsport Mcp
io.github.dengxuhui由 GitHub 帳號 dengxuhui 發布v0.7.1更新於 Oct 24, 2026
iGPSport cycling data with training metrics (NP/IF/TSS/CTL/ATL/TSB) and workout generation
概覽
一個本機 MCP 伺服器,把 iGPSport 騎乘帳號接上助理,用來分析騎乘、訓練負荷與路段,並可建立訓練課程。
- 可以做什麼
- 列出並檢視騎乘活動,回傳 NP、IF、TSS、做功以及心率與功率區間時間等衍生指標,並提供圈段資料與降取樣後的時間序列。比較 2 至 5 筆活動,並依活動清單計算期間統計。讀取運動員檔案(FTP、LTHR、體重、最大心率、區間邊界),並可從近期騎乘估算閾值,僅讀取不回寫。分析訓練負荷趨勢(CTL、ATL、TSB)並解讀競技狀態。瀏覽收藏路段、路段詳情與排行榜及自己的排名,讀取官方年度統計與個人最佳。用自然語言描述產生結構化訓練課程並推送到 iGPSport 應用程式,列出與查看課程詳情,刪除課程。
- 適用情境
- 適合在 iGPSport 上記錄騎乘的車友,想向助理詢問訓練負荷、比較騎乘、查看路段排名或年度總里程,並讓助理產生結構化課程推送到碼表。僅涵蓋 iGPSport 騎乘資料,不支援跑步或其他碼表。
- 執行需求
- 以 PyPI 套件形式透過 stdio 在本機執行,用 uv 安裝(不需另外安裝 Python),並加入支援 MCP 的用戶端,如 Claude Desktop、Claude Code 或 OpenClaw。需要 iGPSport 帳號:IGPSPORT_USERNAME 與 IGPSPORT_PASSWORD,可透過安裝精靈或環境變數提供。IGPSPORT_REGION 選擇中國(預設)或國際伺服器,兩者帳號各自獨立。需要能連線到 iGPSport 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Igpsport Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
igpsport-mcp
English | 简体中文
A local MCP server that connects your iGPSport cycling data to LLM clients like Claude. Analyze your training in natural language: "How's my training load this week?" "Compare my two long rides from last week and this week." "What's my ranking on that climb I starred?" "How many kilometers did I ride this year, and what are my personal bests?" — and even have Claude prescribe workouts for you: "Build me a 2×20 SST session based on my FTP and push it to my head unit."
Key differentiator: Derived training metrics — NP / IF / TSS / CTL / ATL / TSB — are computed server-side in the MCP layer before being returned. The LLM receives story-ready numbers, not raw stream data.
Demo
⚠️ Unofficial project. This tool works by simulating iGPSport web client requests. iGPSport may change their API at any time, which could break functionality. Please evaluate account risk yourself — use at your own risk. Runs entirely locally over stdio — your data never touches any third-party server.
Quick Start (Recommended)
This tool is an MCP server and requires an MCP-capable client (e.g. Claude Desktop / Claude Code / Cursor). Once you have a client ready, three steps:
1. Install uv (a standalone tool — you do not need Python pre-installed, uv handles the runtime automatically):
2. Install globally and run the setup wizard (interactively enter your phone/email and password — credentials stay local). The commands are the same on both systems; run them in Terminal on macOS or PowerShell on Windows:
If
igpsport-mcpis not found after installation, open a new terminal/PowerShell window so PATH updates take effect (uv places executables in~/.local/binon macOS,%USERPROFILE%\.local\binon Windows).
The wizard saves credentials to a config file (owner-readable only) and prints a copy-paste ready MCP configuration block. Config file locations:
- macOS:
~/.igpsport-mcp/config.json - Windows:
C:\Users\YourName\.igpsport-mcp\config.json
3. Paste the printed config into your client, then restart the client (see "Connect to Claude" below).
Want to verify your credentials before pasting? Run
igpsport-mcp --check— it performs a real login and prints ✅ success or ❌ the reason for failure, so you don't add it to your client only to find it broken.Need to print the config snippet again later?
igpsport-mcp --mcp-configanytime.
Developers / users with an existing Python environment: use
uvx igpsport-mcpfor one-shot runs, or configure via environment variables below instead of the wizard.
CLI Usage
Running with no arguments starts the MCP server in stdio mode (this is what your MCP client invokes — you normally don't run it manually). Other subcommands:
Configuration (Environment Variables)
Users who ran the
--setupwizard can skip this section — credentials are already stored. The section below is for users who prefer environment variables, or need to manage credentials across CI / multiple environments. Env vars take priority over config.json.
FTP / LTHR are now auto-read from your iGPSport athlete profile by default (along with body weight and max HR), so you normally don't need to set them manually. Only set the env vars when you want to use thresholds different from what's in the app. If your iGPSport profile also has no FTP set, IF / TSS / CTL / ATL / TSB cannot be computed — either add FTP in iGPSport or set
IGPSPORT_FTP.
International Edition Support
Switch to the international edition (app.igpsport.com) by setting IGPSPORT_REGION=intl. The international and China servers use separate accounts — you must register separately at app.igpsport.com.
Differences from the China server:
- No WASM signing — authentication uses pure JWT, a simpler design
- Segment features are unavailable (international segments are in beta, listing is empty)
- Training parameter endpoint uses v2 path; yearly statistics path differs (auto-adapted internally)
- Workout course format is cross-region compatible — zero changes in the IR compilation layer
Example configuration:
Or select "2. International" in the first step of the --setup wizard.
International edition FIT files are stored on OSS in the US (
oss-us-west-1). Downloads may be slightly slower for users in China.
Connect to Claude
Claude Desktop
Open the config file claude_desktop_config.json (create it if it doesn't exist), paste the content below, then fully quit and reopen Claude Desktop. File locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json(i.e.C:\Users\You\AppData\Roaming\Claude\claude_desktop_config.json)
You can also open this file directly from Claude Desktop via Settings → Developer → Edit Config.
After running --setup (credentials in config.json, leave env empty — this is what --mcp-config prints):
Or skip the wizard and use uvx with environment variables:
FTP / LTHR are auto-read from your iGPSport profile by default — no need to set them. Only add
"IGPSPORT_FTP": "250"or"IGPSPORT_LTHR": "160"inenvif you want to override what's in the app.
Claude Code
After the wizard (credentials stored):
Or with uvx + env vars:
Verify with /mcp or claude mcp list — status should be connected.
OpenClaw
OpenClaw uses stdio for MCP, the same protocol as Claude Desktop / Claude Code, so the configuration above works directly.
Method 1: Ask OpenClaw in natural language (recommended)
First install with uv tool install igpsport-mcp and run igpsport-mcp --setup. Then, in your connected chat channel, simply tell OpenClaw:
I installed igpsport-mcp. Help me configure it in OpenClaw.
It will locate the binary path, verify credentials with igpsport-mcp --check, write the config via openclaw mcp add, and probe it — all without you touching a command line or JSON.
Method 2: One-liner
This writes to ~/.openclaw/openclaw.json under mcp.servers.igpsport. You can also edit the file manually:
Verification:
The mcp field is hot-reloaded — no gateway restart needed; it takes effect in the next conversation turn. Use openclaw mcp reload to force-refresh the runtime cache if needed. Then ask questions in natural language from any connected channel (Discord, Telegram, Slack, etc.).
Not connecting? Run
igpsport-mcp --checkin a terminal first to isolate the problem:
❌ Login failed → credential issue; re-run
igpsport-mcp --setup.✅ Success but the client still can't connect → likely
igpsport-mcp/uvxisn't in the client's PATH (Claude Desktop in particular often can't see the login shell's PATH). Replacecommandin the config with the absolute path:macOS: run
which igpsport-mcp(orwhich uvx) in Terminal, e.g./Users/You/.local/bin/igpsport-mcp.Windows: run
where.exe igpsport-mcp(orwhere.exe uvx) in PowerShell, e.g.C:\Users\You\.local\bin\igpsport-mcp.exe. In JSON, backslashes must be doubled, e.g."command": "C:\\Users\\You\\.local\\bin\\igpsport-mcp.exe".
Updates
For uv tool install installations (both systems), upgrade to the latest:
Restart your client after upgrading (fully quit and reopen Claude Desktop; reconnect for Claude Code). Check current version: igpsport-mcp --version.
For
uvx igpsport-mcpone-shot users, no manual upgrade is needed — uvx uses the latest version by default. If a stale version is cached locally, useuvx igpsport-mcp@latestor clear the cache withuv cache cleanfirst.
Uninstall
1. Remove the program (same for both systems):
2. Remove local credentials and cache (optional, for a complete cleanup):
3. Remove igpsport from your client config: Claude Desktop — delete the igpsport block under mcpServers in claude_desktop_config.json; Claude Code — claude mcp remove igpsport; OpenClaw — openclaw mcp unset igpsport (or delete the igpsport block under mcp.servers in ~/.openclaw/openclaw.json).
For
uvx igpsport-mcpone-shot users, there is no "program" to uninstall — just do steps 2 and 3.
17 Tools Provided
Activities & Training (9)
Segments (3)
Statistics & Achievements (1)
Training Courses (4) — the only "write" capability
Power targets support absolute watts, %FTP (auto-converted using your FTP), and power zones; heart rate, cadence, and speed targets are also supported. Duration can be set by time / distance / calories / manual lap button. Created workouts appear in the iGPSport app under "Training Courses" and can be synced to your head unit for execution.
Derived Metrics Reference
- NP (Normalized Power):
((30 s rolling average power)^4 mean)^0.25; stream is resampled to 1 Hz before computation. - IF = NP / FTP; TSS =
duration_s × NP × IF / (FTP × 3600) × 100. - CTL / ATL / TSB: exponential weighted moving averages of daily TSS (α = 1/42, 1/7); TSB = CTL − ATL.
- No-power-meter fallback: hrTSS =
(duration_s / 3600) × (avg HR / LTHR)² × 100, annotatedestimated from HR. - Zone models: HR uses Friel (LTHR-based); Power uses Coggan 7-zone (FTP-based).
FAQ
Q: Do I need a power meter? A: No. Without a power meter, heart-rate-based metrics work normally and TSS falls back to hrTSS (lower accuracy, annotated as such). However, setting FTP is recommended to unlock power-based metrics.
Q: Is my data uploaded anywhere?
A: Not to any third party. Other than reading/writing your own iGPSport account data (reading activities/stats, and create_workout/delete_workout for your own training courses), everything happens locally. FIT files and derived metrics are cached locally.
Q: Can create_workout / delete_workout mess up my data?
A: create_workout only adds new training courses — you can use dry_run=true to preview the compiled result before deciding to send. delete_workout is irreversible and defaults to a confirmation preview; it requires explicit confirm=true to actually delete — so an LLM cannot delete a course without your confirmation.
Q: Does with_calendar automatically write to my calendar?
A: No. This server only produces a standard iCalendar (VEVENT) text artifact — it never touches any calendar API or sends data externally. Whether the event is actually written to a calendar is up to your LLM client to hand off to another calendar/reminder tool (e.g. Apple Calendar, Reminders, or a Notion MCP). Since a workout is a template with no execution date, the DTSTART is the placeholder {{SCHEDULED_DATE}} — the downstream consumer fills in the actual date.
Q: What if the API breaks? A: iGPSport may change their API, which could cause breakage — the tool will throw a clear error. Please report issues at Issues.
Q: Does it support running / other head units? A: No. This project focuses exclusively on iGPSport cycling data.
Q: What's different about the international edition? A: International and China server accounts are separate. The international edition lacks segment features (beta, listing is empty) and uses a simpler authentication mechanism (no WASM signing). Activities, training courses, and statistics work the same. See the "International Edition Support" section for details.
Development
License
MIT. This project is not affiliated with iGPSport in any way.
來源:README.md,提交 ca600bf
工具
0版本歷史
1- v0.7.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分