garmin-mcp

garmin-mcp

Self-hosted MCP server that exposes 90+ Garmin Connect tools to Claude and includes a live triathlon dashboard.

Category
访问服务器

README

Garmin → Claude · Self-Hosted MCP Server + Live Dashboard

Put your Garmin Connect data inside Claude — and run your own private health & triathlon dashboard — on a small server that's entirely yours.

  • 🗣️ Ask your body data in plain English in Claude (web, desktop, mobile): "How did I sleep?", "Show my last 5 runs", "Am I recovered for a hard session?"
  • 📊 A live dashboard at /dashboard — body battery, sleep, heart rate, stress, VO₂ max, training load, HR zones, weight/hydration, and a Swim / Bike / Run view that fills in as you train.
  • 🔒 Private by design — runs on your Railway account, locked with your bearer token. Your Garmin password never leaves your own computer.

Built for the community by Sudhakar Reddy Gade · 📖 Full step-by-step guide (no coding needed): https://www.nirvedha.com/garmin-dashboard/


Quick start

The easy way — let Claude Code do it

Install Claude Code, open it in an empty folder, and paste the ready-made prompt from the guide. It clones this repo, mints your Garmin token, deploys to Railway, and hands you your connector + dashboard URLs. You only approve the Railway login and type your Garmin password into your own terminal.

The hands-on way

Fork this repo and follow the guide (8 clicks-and-copy steps, ~20 minutes) or the concise SETUP.md. In short: fork → deploy on Railway → add a volume at /root/.garminconnect → set four variables → generate a domain → add to Claude.


What you get

MCP tools 90+ Garmin tools (activities, sleep, HRV, body battery, training, gear, …) usable from Claude
Transport Streamable HTTP at /mcp, health check at /healthz
Auth Bearer token on every request (header or ?token= in the URL, for clients like Claude that can't set headers)
Dashboard Server-rendered, live-on-refresh single page at /dashboard
Persistence Garmin OAuth tokens on a mounted volume, auto-refreshing
Cost ~$5/month on Railway's Hobby plan

Environment variables

Variable Required Purpose
MCP_ACCESS_TOKEN Yes Bearer token guarding /mcp and /dashboard (≥16 chars, or the server won't start)
GARMIN_TOKEN_BASE64 Recommended Pre-minted Garmin OAuth blob — avoids logging in from a cloud IP (Garmin blocks those)
GARMIN_MCP_TRANSPORT Yes streamable-http
GARMIN_MCP_HOST Yes 0.0.0.0
GARMIN_EMAIL / GARMIN_PASSWORD Fallback Full login if no token blob; may trigger MFA
PORT Auto Injected by Railway; the server binds it
DASHBOARD_TZ_OFFSET_HOURS Optional Local-day offset for the dashboard (default 5.5 = IST)

See SETUP.md for the full list, token rotation, and re-auth.

Security model

  • Fail-closed: the server refuses to start without a strong MCP_ACCESS_TOKEN, so the endpoint is never exposed unprotected — not even briefly.
  • The bearer check runs before the MCP app, so unauthorized callers get 401 and never reach your data.
  • Your Garmin password is only ever used locally to mint a token blob; the deployed server uses the blob (read-scoped OAuth tokens), never the password.
  • .gitignore keeps .env, tokens, and caches out of git.

Architecture

Claude (web / desktop / mobile)  ──HTTPS + bearer token──►  Railway service
                                                                 │
                    BearerAuthMiddleware ──► /healthz (open) · /mcp · /dashboard
                                                                 │
                                             FastMCP (90+ tools) + dashboard API
                                                                 │
                                             garminconnect + garth ──► Garmin API
                                             (OAuth tokens on a persistent volume)

Local development

uv sync
# stdio (for Claude Desktop config):
GARMIN_MCP_TRANSPORT=stdio uv run garmin-mcp
# streamable HTTP + dashboard:
MCP_ACCESS_TOKEN=$(python3 -c "import secrets;print(secrets.token_urlsafe(32))") \
GARMIN_MCP_TRANSPORT=streamable-http uv run garmin-mcp-http
# mint a Garmin token blob (interactive):
uv run garmin-mcp-mint

Credits

Stands on the shoulders of the open-source garmin_mcp by Taxuspt and the Docker + streamable-HTTP fork by k8sautom8. This repo adds a bearer-token security layer, $PORT/proxy fixes, and the live triathlon dashboard.

License

MIT — free to use, change, and share. See LICENSE.


<sub>Shared as a community resource by Nirvedha Executive Coaching Solutions, Hyderabad · https://nirvedha.com</sub>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选