Caddie Mcp

io.github.mbrionesalvarez由 GitHub 帳號 mbrionesalvarez 發布v1.0.1更新於 Oct 24, 2026

Your Garmin golf data in Claude: GPS shots, strokes gained, club distances, health context

概覽

AI 產生的概覽

讓助理從本機快取查詢你自己的 Garmin 高爾夫球局、GPS 擊球、球桿距離、桿數得失與健康背景資料。

可以做什麼
Caddie 會把你的 Garmin Connect 高爾夫資料同步到本機 DuckDB 檔案,並透過 MCP 工具提供存取。工具涵蓋連線與快取狀態、分塊同步、球局清單與單場詳細資料、逐桿 GPS 與球桿資料(可用 GeoJSON 輸出供地圖使用)、實測球桿距離、桿數得失、約 40 項 PGA 風格表現統計、WHS 風格差點、單一球場逐洞情報,以及睡眠、HRV、Body Battery 等健康背景。唯讀 SQL 工具可對快取提出任意問題,內建提示詞涵蓋賽後報告、練習計畫、球場策略與賽季回顧。
適用情境
適合戴 Garmin 手錶打球、希望助理分析自己球局、擊球模式、球桿距離、桿數得失,或睡眠與成績關聯的人。它是個人分析工具,而非通用高爾夫資料庫。
執行需求
透過 stdio 在本機執行,可用 uvx 或 pipx 從 PyPI 安裝,也可在 Python 虛擬環境中從原始碼安裝。需要一次性登入 Garmin Connect(支援 MFA),並先執行同步才能取得資料。資料快取於 ~/.caddiemcp/golf.duckdb。選用的 HTTP 伺服器模式支援多使用者,使用 bearer 權杖或 OAuth,遠端使用需要 TLS。
安裝前請注意
這是非官方連接器,使用與 Garmin Connect 應用程式相同的私有 API,Garmin 變更時可能失效。Garmin 憑證與權杖保存在本機(~/.garminconnect,權限 0600),須視同密碼;伺服器模式下資料卷包含 Garmin 憑證。SQL 工具為唯讀且僅限 SELECT。同步會寫入本機快取並呼叫 Garmin;plays-like 距離會把擊球與球洞海拔傳送到 Open-Meteo 海拔 API。遠端 HTTP 模式在標頭中傳輸 bearer 權杖,應置於 TLS 之後。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Caddie Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Caddie

The AI caddie that has actually seen every shot you've hit.

Caddie is an MCP server that connects Claude (or any MCP-capable LLM) to your Garmin golf data — every round, every GPS shot, strokes gained, real club distances, plays-like yardages, and the sleep/recovery context behind each score. Ask anything: "why do I blow up on par 5s?", "map my drives at my home course", "does bad sleep actually cost me strokes?"

  • Local-first and private: your data syncs once into a DuckDB file on your machine; credentials and health data never leave it.
  • Unofficial: Caddie uses the same private API as the Garmin Connect app (via python-garminconnect). It reads your own account only — and it can break whenever Garmin changes things, until the ecosystem catches up. Know that going in.
  • Support: best-effort, issues and PRs welcome. By the maker of OneClub.

How it works

Garmin Connect  ──sync──►  local DuckDB cache  ──MCP tools──►  your LLM

Your data is synced once into a local database (~/.caddiemcp/golf.duckdb) and every question is answered from the cache — fast, private, and kind to Garmin's servers. Credentials never leave your machine.

Setup

From source (this directory):

bash
python3 -m venv .venv && .venv/bin/pip install -e ..venv/bin/caddie-mcp login              # one-time; MFA supported.venv/bin/caddie-mcp sync --max-rounds 50

Prefer a browser to a terminal? caddie-mcp login --web opens a local page (127.0.0.1 only) with proper email/password/MFA fields — same token store, friendlier surface.

From the built wheel (no checkout needed — dist/ ships both):

bash
pipx install ./dist/caddie_mcp-1.0.0-py3-none-any.whl   # or pip installcaddie-mcp login && caddie-mcp sync

Once published to PyPI, this becomes uvx caddie-mcp / pipx install caddie-mcp.

Claude Desktop / Claude Code

Add to claude_desktop_config.json (or .mcp.json for Claude Code):

json
{  "mcpServers": {    "caddie-mcp": {      "command": "/ABSOLUTE/PATH/TO/caddie-mcp",      "args": ["serve"]    }  }}

Use which caddie-mcp (pipx) or /path/to/caddie-mcp/.venv/bin/caddie-mcp (source install) for the command path. This repo's .mcp.json already wires it up for Claude Code sessions started in this folder.

Remote server (multi-user, HTTP)

The same server runs over streamable-HTTP with bearer-token auth and full per-user isolation — each user gets their own database and Garmin token store under ~/.caddiemcp/users/<name>/ (or $CADDIEMCP_HOME).

bash
caddie-mcp user add marcos          # prints the access token (shown once)caddie-mcp serve-http --host 0.0.0.0 --port 8724

Users link their own Garmin account in a browser — no admin terminal needed: send them https://your-host/garmin/login, where they enter their access token plus Garmin credentials (two-step MFA supported); tokens land in their private server directory. Admin-assisted caddie-mcp user login <name> still works as a fallback.

Clients connect to http://host:8724/mcp with header Authorization: Bearer <token> — e.g. for Claude Code:

bash
claude mcp add --transport http golf http://host:8724/mcp \  --header "Authorization: Bearer <token>"

Docker:

bash
python -m build                     # wheel must exist in dist/docker build -t caddie-mcp .docker run -d -v caddie_data:/data -p 8724:8724 caddie-mcpdocker exec -it <container> caddie-mcp user add marcosdocker exec -it <container> caddie-mcp user login marcos

Security notes: tokens are 256-bit secrets stored only as SHA-256 hashes and compared in constant time; rotate with caddie-mcp user rotate-token <name>. Run behind TLS (Caddy/nginx/Cloudflare Tunnel) — tokens travel in headers. --no-auth mode exists for localhost-only single-user use and refuses to bind to non-loopback addresses. /health is the only unauthenticated route. The /data volume contains Garmin credentials — treat backups accordingly.

claude.ai custom connectors (OAuth)

claude.ai connects to remote MCP servers via OAuth (dynamic client registration + PKCE), not bearer headers. Enable it with:

bash
caddie-mcp serve-http --host 0.0.0.0 --oauth \  --public-url https://golf.example.com

Then add https://golf.example.com/mcp as a custom connector in claude.ai. On first connect the user lands on a consent page and pastes their caddie-mcp access token once; after that, OAuth tokens (1 h access + rotating refresh, stored hashed) keep the connection alive, scoped to that user's data. Static bearer tokens keep working alongside OAuth. A real domain with TLS is required — claude.ai will not talk to plain HTTP.

Background sync

In server mode, keep every linked user fresh automatically:

bash
caddie-mcp serve-http --host 0.0.0.0 --sync-every 6h

Users are synced sequentially (incremental, with jitter and per-user error isolation) so the Garmin API never sees a thundering herd.

Claude Desktop Extension

python scripts/build_mcpb.py produces dist/caddie-mcp.mcpb — a double-click install bundle for Claude Desktop that launches the published package via uvx. Requires uv on the machine and the package on PyPI; the one-time uvx caddie-mcp login still happens in a terminal (credentials never pass through the desktop app).

Publishing to PyPI (maintainer)

bash
.venv/bin/python -m build          # sdist + wheel into dist/pipx run twine upload dist/*       # needs a PyPI API token

Data quality & repair

caddie-mcp repair re-derives every computed field across the cache with no Garmin calls (club names, lie/shot-type normalization, GPS-to-pin distances, GIR/fairway inference). It runs automatically at the end of every sync, so you only need it manually after upgrading the connector.

Known Garmin quirks handled: watches report TEEBOX/TEE/UNKNOWN enums; putts are often a per-hole count with no green shots; the end position of green-reaching shots is snapped to the pin (so post-shot proximity on green hits is honestly NULL, and strokes-gained putting uses a flagged estimate).

Tools

ToolWhat it answers
garmin_statusAm I connected? How much is cached vs still on Garmin?
sync_garmin_dataPull rounds/shots/clubs from Garmin — chunked (25/call, reports rounds_remaining) so full multi-year histories load safely from chat
list_rounds"Show my recent rounds" — compact summaries
get_roundOne round in depth: scorecard, holes, shots
get_shotsShot-level GPS/club/lie data; format="geojson" for maps
get_club_statsReal measured distances per club vs Garmin's estimates
get_strokes_gainedBroadie strokes gained per round: off-tee / approach / short game / putting, vs your handicap level or scratch
get_performance_stats~40 PGA-style stats (driving, GIR by distance, scrambling, putting, scoring) with optional handicap benchmarks
get_handicapWHS-style index, counting differentials, and trend
get_course_intelPer-hole difficulty and usual tee club at one course
get_health_contextSleep, HRV, Body Battery, readiness, and stress for a round's date
correlate_health_performance"Do I score worse on bad sleep?" — paired data + honest correlation
query_golf_dataAny question, as read-only SQL over the cache

Sync also fills daily_health (4 extra Garmin calls per round date): sleep score/duration, resting HR, HRV status, Body Battery range, training readiness, stress, steps — plus round-window enrichment on each round: Body Battery at tee time and drain during play, average/max heart rate and stress during the round, and the round's weather (temperature, wind, humidity, conditions) via its matched Garmin activity.

When Garmin sends no dispersion data, shot miss offsets (dx/dy) are derived from GPS geometry: drives laterally vs the tee→pin line, approaches/chips relative to the pin — powering miss-direction and miss-tendency stats on any watch with shot GPS.

Every shot also gets plays-like distance: terrain elevations for shot and pin positions come from the free Open-Meteo elevation API (cached forever in the local DB), and plays_like_yds applies the standard 1:1 uphill/downhill heuristic — so "my 150-yd shots" can be analyzed by what they actually played as.

Prompts (packaged workflows): post_round_report, practice_plan, course_strategy, health_check_in, season_review.

Resources: schema://data-dictionary (columns, units, enums), docs://metric-definitions (how every stat is computed), and docs://getting-started (recommended tool flow).

Conventions

  • Distances in yards, coordinates in decimal degrees, times in ISO 8601.
  • Lies: tee | fairway | rough | sand | green | recovery | penalty.
  • Shot types: drive | approach | chip | putt | penalty.
  • Unknown values are NULL, never fabricated — the last shot of a hole has no measured end-distance, and tools say so.

Security notes

  • Garmin tokens live at ~/.garminconnect (mode 0600) — treat like a password.
  • The SQL tool is read-only, single-statement, SELECT-only, and capped.
  • This is an unofficial connector for your own Garmin data.

Development

bash
.venv/bin/python -m pytest tests/ -q

mcp-name: io.github.mbrionesalvarez/caddie-mcp

來源:README.md,提交 d73db55

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分