caddie-mcp
Allows accessing and analyzing your Garmin golf data, including rounds, shots, club distances, strokes gained, and health context.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@caddie-mcp Why do I blow up on par 5s?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 LLMYour 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.
Related MCP server: garmin-mcp
Setup
From source (this directory):
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 50Prefer 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):
pipx install ./dist/caddie_mcp-1.0.0-py3-none-any.whl # or pip install
caddie-mcp login && caddie-mcp syncOnce 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):
{
"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).
caddie-mcp user add marcos # prints the access token (shown once)
caddie-mcp serve-http --host 0.0.0.0 --port 8724Users 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:
claude mcp add --transport http golf http://host:8724/mcp \
--header "Authorization: Bearer <token>"Docker:
python -m build # wheel must exist in dist/
docker build -t caddie-mcp .
docker run -d -v caddie_data:/data -p 8724:8724 caddie-mcp
docker exec -it <container> caddie-mcp user add marcos
docker exec -it <container> caddie-mcp user login marcosSecurity 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:
caddie-mcp serve-http --host 0.0.0.0 --oauth \
--public-url https://golf.example.comThen 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:
caddie-mcp serve-http --host 0.0.0.0 --sync-every 6hUsers 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)
.venv/bin/python -m build # sdist + wheel into dist/
pipx run twine upload dist/* # needs a PyPI API tokenData 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
Tool | What it answers |
| Am I connected? How much is cached vs still on Garmin? |
| Pull rounds/shots/clubs from Garmin — chunked (25/call, reports |
| "Show my recent rounds" — compact summaries |
| One round in depth: scorecard, holes, shots |
| Shot-level GPS/club/lie data; |
| Real measured distances per club vs Garmin's estimates |
| Broadie strokes gained per round: off-tee / approach / short game / putting, vs your handicap level or scratch |
| ~40 PGA-style stats (driving, GIR by distance, scrambling, putting, scoring) with optional handicap benchmarks |
| WHS-style index, counting differentials, and trend |
| Per-hole difficulty and usual tee club at one course |
| Sleep, HRV, Body Battery, readiness, and stress for a round's date |
| "Do I score worse on bad sleep?" — paired data + honest correlation |
| Any 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
.venv/bin/python -m pytest tests/ -qmcp-name: io.github.mbrionesalvarez/caddie-mcp
Available Tools
13 toolscorrelate_health_performanceA
Does recovery (or weather) affect your golf? Joins each round to its health/conditions data and computes a Pearson correlation. Daily metrics (sleep_score, hrv, readiness...) come from the night/day around the round; round-window metrics (bb_at_tee, avg_hr_during_round, avg_stress_during_ round, temp_c, wind_speed_mph) are measured DURING the round itself. Returns the paired table, r, and an honest interpretation — small samples are flagged loudly. Remember lower is better for score/putts: a NEGATIVE r between sleep_score and score_to_par means better sleep, better golf.
Inputs: health_metric, last_n_rounds, performance_metric. Returns: object
garmin_statusA
Check connector health: Garmin auth state, last sync, cached data coverage (rounds, shots, GPS %, club %). Call this first in a session.
Inputs: no named parameters. Returns: object
get_club_statsA
Per-club performance over the last N rounds: measured avg/min/max/ stddev carry distance (excludes putts and penalties), sample size, usage share, lateral miss bias from Garmin's dx offsets, plus Garmin's own average and 'advice' distances for comparison.
Inputs: last_n_rounds. Returns: object
get_course_intelA
Personal course intelligence for one course (name substring match): per-hole scoring average vs par, hardest and easiest holes, most common tee club per hole, and round history there. Use for strategy questions like 'how should I play X next time?'.
Inputs: course (required), last_n_rounds. Returns: object
get_handicapA
WHS-style Handicap Index: best-N-of-20 differentials, which rounds count, and the index trend over time. Needs rounds with tee rating and slope (Garmin records these when a tee box is selected on the watch).
Inputs: no named parameters. Returns: object
get_health_contextA
Health context for a round or date (YYYY-MM-DD): sleep score and duration the night before, HRV status, Body Battery range, training readiness, average stress, resting HR, steps. With round_id, also returns the round summary so performance and recovery sit side by side. NULL fields mean the watch/feature didn't record — say so, don't guess.
Inputs: date, round_id. Returns: object
get_performance_statsA
PGA-style performance stats over the last N rounds: driving distance/ accuracy + miss direction, GIR and proximity by distance bucket, scrambling and sand saves, putting (make % by feet, 3-putt avoidance), scoring (par 3/4/5 averages, bounce-back, distribution). Optionally pass benchmark_handicap to compare every metric against that handicap level.
Inputs: category, last_n_rounds, benchmark_handicap. Returns: object
get_roundA
Get one round in depth: header, hole-by-hole scorecard, and optionally every shot. round_id comes from list_rounds. Prefer get_shots (with filters or geojson) when the goal is shot analysis or mapping.
Inputs: round_id (required), include_holes, include_shots. Returns: object
get_shotsA
Get shot-level data (GPS, club, lie, distance, miss offsets dx/dy). Filter by round_id, holes, club name substring, or shot_type (drive|approach|chip|putt|penalty). format="geojson" returns a FeatureCollection (shot LineStrings + pin Points) ready for Mapbox or Leaflet — ideal for shot maps and dashboards.
Inputs: club, holes, limit, format, +2 more. Returns: object
get_strokes_gainedA
Strokes Gained (Broadie method) per round: total plus off-tee / approach / short-game / putting. baseline: "auto" grades each round against the player's own handicap level; or force one of scratch, 5hcp, 10hcp, 15hcp, 20hcp, bogey (scratch = the number seen on TV). estimated_share > 0 means some shots lacked GPS and used inferred lies/distances — hedge conclusions accordingly.
Inputs: baseline, round_id, last_n_rounds. Returns: object
list_roundsA
List golf rounds, newest first, as compact summaries (date, course, score, putts, fairways, GIR, ratings). Dates are YYYY-MM-DD; course is a case-insensitive substring match. Use get_round for hole-by-hole detail.
Inputs: limit, course, end_date, start_date. Returns: object
query_golf_dataA
Run a read-only SQL SELECT over the golf database (DuckDB dialect). Tables: rounds, holes, shots, clubs, daily_health. Read the schema://data-dictionary resource for columns, units, and enums. Single statement, SELECT/WITH only, capped at 200 rows — aggregate server-side instead of selecting raw rows when possible.
Inputs: sql (required). Returns: object
sync_garmin_dataA
Pull golf data from Garmin Connect into the local cache, plus daily health (sleep, HRV, Body Battery, stress, readiness) for round dates.
Incremental and CHUNKED: each call syncs up to max_rounds new rounds
(default 25, newest first, ~2-4 minutes) and reports
rounds_remaining. To load a full multi-year history, simply keep calling
this tool until rounds_remaining is 0 — tell the user the total and give a
brief progress update between batches. Nothing is lost between calls; every
batch is permanent. full=True refetches already-cached rounds
(least-recently-synced first; pass max_rounds to bound it, otherwise it
runs unbounded). include_health=False skips the health pass. (Very large
backfills can also run outside chat: caddie-mcp sync in a terminal does
it in one go.)
Inputs: full, max_rounds, include_health. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have clearly distinct purposes, but get_round and get_shots both involve shot data, and query_golf_data could potentially retrieve anything. The descriptions do a good job of clarifying boundaries, so ambiguity is minimal.
Almost all tools follow the verb_noun pattern (get_*, sync_*, correlate_*, query_*), except garmin_status which is a noun phrase. This minor deviation is easily understood and does not undermine predictability.
With 13 tools, the server is well-scoped for a golf analytics platform. Each tool covers a distinct aspect of data ingestion, retrieval, analysis, and querying, without unnecessary bloat or thin coverage.
The tool set provides comprehensive coverage of the golf performance domain: syncing data, listing and inspecting rounds, shot-level details, stats (club, strokes gained, overall), handicap, course intelligence, health context, correlation analysis, and a general SQL query interface. No obvious dead ends or missing core operations.
Maintenance
Related MCP Connectors
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol (MCP) server for Garmin Connect integration. Access your activities, health data, training metrics, and more through Claude and other LLMs.2268MIT
- AlicenseNot gradedqualityBmaintenanceA local, single-user, read-only MCP server that gives Claude Code access to your Garmin health and training data, exposing tools for health snapshots, training status, run details, body metrics, and training analysis.1MIT
- AlicenseNot gradedqualityDmaintenanceThis MCP server exposes Garmin Connect health data—sleep, heart rate, HRV, stress, VO2max, and activities—to Claude through local tools, enabling natural language queries, data syncing, and statistical analysis like correlations and night-out detection.MIT
- AlicenseNot gradedqualityCmaintenanceA local, read-only MCP server that gives Claude access to your Garmin health and training data, exposing tools for health snapshots, training status, run details, body metrics, and training analysis.MIT