mcp-garmin-connect

mcp-garmin-connect

An MCP server that gives LLMs access to Garmin Connect data, including training, recovery, sleep, stress, VO2 Max, and running summaries for personalized fitness advice.

Category
访问服务器

README

mcp-garmin-connect

Python 3.11+ MCP License: MIT CI Top Language

LLM-agnostic Garmin Connect MCP server for training, recovery, sleep, stress, VO2 Max, race predictions, and running summaries.

Use the same local Garmin tools from MCP clients such as Claude Desktop, Claude Code, Cursor, Continue, Hermes, or from provider-backed demo agents using DeepSeek, OpenAI, or Claude API.

Why This Exists

Most fitness advice from LLMs is generic. This server lets an LLM inspect your real Garmin Connect data first, then answer with context from your activities, recovery markers, HRV, sleep, stress, VO2 Max, and running history.

The core server is provider-neutral. DeepSeek, OpenAI, and Claude integrations are optional demo bridges for clients that do not speak MCP directly.

Features

  • Local MCP server for Garmin Connect over stdio or Streamable HTTP.
  • 14 Garmin tools and 4 prompt templates.
  • Provider demo bridge for deepseek, openai, claude, openrouter, and gemini.
  • Windows-first CLI, with cross-platform Python project structure.
  • Explicit opt-in before Garmin health/activity data is sent to any external LLM provider.
  • Mocked test suite plus optional live Garmin smoke tests.

Languages And Stack

Area Technology
Main language Python 3.11+
Package manager uv
MCP server mcp Python SDK / FastMCP
Garmin access garminconnect
Provider API calls httpx
Tests pytest
Linting ruff
Client config examples JSON, YAML, PowerShell

Quick Start

uv sync
Copy-Item .env.example .env
notepad .env

Set Garmin credentials:

GARMIN_EMAIL=you@example.com
GARMIN_PASSWORD=your-password

Authenticate once:

uv run garmin-mcp login
uv run garmin-mcp doctor --live

List available MCP tools:

uv run garmin-mcp tools

Run as a local MCP server:

uv run garmin-mcp serve --transport stdio

Run as an HTTP MCP server:

uv run garmin-mcp serve --transport http --host 127.0.0.1 --port 8765

HTTP clients can connect to:

http://127.0.0.1:8765/mcp

Provider Demo Agents

Provider API access may require a paid account or credits even if the provider's web app has a free tier.

DEEPSEEK_API_KEY=sk-...
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
OPENROUTER_API_KEY=sk-or-...
GEMINI_API_KEY=...
Provider Env key Default model API style
DeepSeek DEEPSEEK_API_KEY deepseek-v4-pro OpenAI-compatible Chat Completions
OpenAI OPENAI_API_KEY gpt-5 OpenAI Chat Completions
Claude ANTHROPIC_API_KEY claude-sonnet-5 Anthropic Messages API
OpenRouter OPENROUTER_API_KEY google/gemini-3-flash-preview OpenAI-compatible Chat Completions
Gemini GEMINI_API_KEY gemini-3.6-flash Gemini Generate Content API

Ask through a provider bridge:

uv run garmin-mcp ask "How is my recovery today?" --provider deepseek --allow-external-health-data
uv run garmin-mcp ask "Summarize my running for 90 days." --provider openai --allow-external-health-data
uv run garmin-mcp ask "What should I focus on this week?" --provider claude --allow-external-health-data
uv run garmin-mcp ask "Summarize my monthly running." --provider openrouter --allow-external-health-data
uv run garmin-mcp ask "Check my fitness trend." --provider gemini --allow-external-health-data

The --allow-external-health-data flag is required because Garmin tool results can be sent to the selected provider.

MCP Tools

Tool Purpose
get_recovery Readiness, HRV, sleep, body battery, resting HR, training status if available
get_sleep Sleep duration and sleep score trends
get_stress Daily stress buckets and average stress
get_recent_activities Recent normalized activity summaries
get_activity_detail One activity with training effect fields
get_recent_load Volume by sport based on recent activities
get_training_load Native Garmin Training Load when the device/account exposes it
get_fitness VO2 Max, FTP, and race predictions
get_zones Heart-rate and power zones when available
get_personal_records Garmin personal records
get_running_summary 90-day running summary with pace, HR, longest and fastest run
get_monthly_running_stats Monthly running breakdown
get_health_summary Compact recovery, sleep, and stress snapshot
get_full_snapshot Broad multi-section Garmin snapshot

MCP Prompts

  • recovery_check
  • weekly_training_review
  • activity_analysis
  • race_plan_context

Client Setup

See docs/clients for examples covering:

  • Claude Desktop
  • Claude Code
  • Cursor
  • Continue
  • Hermes
  • Generic stdio MCP clients
  • Generic HTTP MCP clients

Minimal stdio config:

{
  "mcpServers": {
    "garmin": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\path\\to\\mcp-garmin-connect",
        "run",
        "garmin-mcp",
        "serve",
        "--transport",
        "stdio"
      ]
    }
  }
}

Testing

uv run garmin-mcp doctor
uv run garmin-mcp doctor --live
uv run garmin-mcp tools
uv run ruff check .
uv run pytest

Optional live tests are gated and do not run in CI by default:

$env:GARMIN_LIVE_TEST = "1"
uv run pytest tests/live

Current local validation target:

ruff: All checks passed
pytest: all mocked tests pass, live test skipped unless enabled

Privacy And Safety

Your .env file and Garmin token cache stay local and are ignored by git.

MCP clients that run locally can call Garmin tools without sending provider API keys to this project. Provider demo commands such as garmin-mcp ask can send Garmin health/activity results to the selected LLM provider, so the CLI requires --allow-external-health-data.

Garmin Disclaimer

This project uses the community garminconnect Python package and Garmin Connect endpoints. Garmin Connect is not a public API for individual open-source projects, and authentication or endpoint behavior may change without notice.

Some metrics depend on Garmin device capabilities. For example, a device may expose VO2 Max and Training Effect but not native Garmin Training Load or Training Status.

Star History

<a href="https://www.star-history.com/?repos=kavakoss%2Fmcp-garmin-connect&type=date&legend=top-left"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=kavakoss/mcp-garmin-connect&type=date&theme=dark&legend=top-left&sealed_token=jWwCP1aKpJ82FKqcEEP2UnyXxxIF8WVj4b0NmJGkZDR5Iujd8WmJ43JHjxO4epA5RTFxdG-30WvZcDNhA31RsI3lKr8R1056ExLsKXwknwg1YhFvCGqR1PffqsTOp-s8HNBovtGPGdPAQIbXZEe0YHGaNj3JZ2eWrOBHcBgwa6MVkqHgHzkSMc6EM4En" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=kavakoss/mcp-garmin-connect&type=date&legend=top-left&sealed_token=jWwCP1aKpJ82FKqcEEP2UnyXxxIF8WVj4b0NmJGkZDR5Iujd8WmJ43JHjxO4epA5RTFxdG-30WvZcDNhA31RsI3lKr8R1056ExLsKXwknwg1YhFvCGqR1PffqsTOp-s8HNBovtGPGdPAQIbXZEe0YHGaNj3JZ2eWrOBHcBgwa6MVkqHgHzkSMc6EM4En" /> <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=kavakoss/mcp-garmin-connect&type=date&legend=top-left&sealed_token=jWwCP1aKpJ82FKqcEEP2UnyXxxIF8WVj4b0NmJGkZDR5Iujd8WmJ43JHjxO4epA5RTFxdG-30WvZcDNhA31RsI3lKr8R1056ExLsKXwknwg1YhFvCGqR1PffqsTOp-s8HNBovtGPGdPAQIbXZEe0YHGaNj3JZ2eWrOBHcBgwa6MVkqHgHzkSMc6EM4En" /> </picture> </a>

License

This project is licensed under the MIT License.

Publish

Codex does not push this repo. To publish it yourself:

git remote add origin https://github.com/kavakoss/mcp-garmin-connect.git
git push -u origin main

Made by kavakoss.

Inspired by Jack-Abyss/claude-garmin, with a clean-room implementation focused on LLM-agnostic MCP usage.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选