garmin-raw-mcp
Provides raw Garmin Connect data access for training analysis, enabling retrieval of activity summaries, lap data, time-series streams, comments with lactate, wellness metrics, and personal records through an MCP interface.
README
Garmin-TN-MCP (garmin-raw)
English | Русский
Minimal raw access to Garmin Connect for training analysis. One backend
(garminconnect 0.3.x) powers two frontends:
- MCP server (
garmin-raw-mcp) — live data access inside Claude Desktop chat. - One-shot export (
garmin-raw-export) — dumps a date range to JSON for reuse with other athletes (the file is uploaded into a chat).
Principle: raw data only (per-lap HR / cadence / power / stride / elevation, per-second streams, the lactate comment). No VO2max / training-effect / device threshold estimates — those are deliberately excluded.
Install
Requires Python 3.10+ and uv.
git clone https://github.com/asilenin/Garmin-TN-MCP.git
cd Garmin-TN-MCP
uv sync
1. Authenticate (once)
uv run garmin-raw-auth
Enter email, password and the MFA code. Tokens are saved to ~/.garminconnect
(0.3.x format). After that no login is needed — the server and the export run on
tokens (and avoid 429 rate-limiting from repeated logins).
2. Connect the MCP to Claude Desktop — one command
uv run garmin-raw-install
It auto-resolves uv and this folder's path and safely merges the
garmin-raw server into claude_desktop_config.json without overwriting the
rest (your preferences, etc.), with a backup. Cross-platform (macOS/Windows/Linux).
You can pass the path explicitly:
uv run garmin-raw-install /full/path/to/Garmin-TN-MCP
Then fully restart Claude Desktop (Cmd+Q on macOS) — the 6 tools appear.
<details> <summary>Manual alternative (if you prefer not to use the script)</summary>
Add to claude_desktop_config.json (macOS:
~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"garmin-raw": {
"command": "/Users/<you>/.local/bin/uv",
"args": ["--directory", "/full/path/to/Garmin-TN-MCP", "run", "garmin-raw-mcp"]
}
}
}
</details>
Uninstall
uv run garmin-raw-uninstall # removes garmin-raw from the config (with backup), leaves the rest
Restart Claude Desktop. Tokens are not removed — delete them manually if you want:
rm -rf ~/.garminconnect # saved Garmin tokens
Remove the whole thing:
cd .. && rm -rf Garmin-TN-MCP # the repository itself
Export (for reuse with other athletes)
# whole period
uv run garmin-raw-export --start 2026-06-01 --end 2026-06-21
# single activity + per-second streams
uv run garmin-raw-export --start 2026-06-20 --end 2026-06-21 \
--activity 23321211303 --streams
Produces garmin_export.json — upload it into a chat.
Tools (identical in the MCP and the export)
| Tool | Returns |
|---|---|
list_activities(start, end, sport) |
raw activity summaries for a period (1 request) |
get_activity_laps(id) |
HR / cadence / power / stride / elevation per lap (lapDTOs) |
get_activity_streams(id) |
per-second streams (HR, cadence, elevation, grade, power, stride, respiration) |
get_activity_comment(id) |
the activity comment + parsed lactate (LA:x.x) |
get_wellness(date) |
sleep, HRV, RHR, stress, Body Battery |
get_personal_records() |
personal records by distance |
Lactate
Write it into the activity comment in Garmin Connect as LA:6.1 (context is
fine: LA:6.6 @rep12). get_activity_comment reads the description field and
parses every value into lactate_mmol. The comment is fetched lazily — only for
activities actually under analysis — to avoid doubling the request count.
Notes
- Garmin PRs are auto-detected fastest splits, not certified race times; they can be faster than official results. Use certified times as form markers and Garmin PRs only as a hint.
- Wellness/PR methods are resolved by trying candidate names: if your
garminconnectversion renames one, the tool returns_errorinstead of crashing the whole response. - PII (owner name/ID) is stripped from outputs, case-insensitively — hygiene for shared exports.
- If the MCP silently stops responding, it's almost always stale tokens: re-run
garmin-raw-auth. The one-shot export is the robust fallback.
Garmin disclaimer
This project accesses Garmin Connect through an unofficial method (the
community python-garminconnect
library, which logs in with your own credentials). It is not affiliated with,
endorsed by, or supported by Garmin. Your use may be subject to Garmin's Terms
of Service; you use it at your own risk. No warranty is provided (see
LICENSE).
Authorship & AI generation
This project was designed and written by Claude (Anthropic's AI assistant) during an extended pair-programming session, under the direction, review and testing of Anton Silenin. The methodology, architecture, debugging and final verification against real Garmin data were done collaboratively in conversation: the human author initiated the work, made the design decisions, validated every step on live data, and is the copyright holder.
AI-generated output carries no separate human authorship under copyright law, so
it is released under the human author's name (MIT, see LICENSE). This
note is here for transparency, not as a license requirement. As with any
AI-assisted code, review it before relying on it.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。