GG

ghighi3f/garmin-grafana-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 3 forks 质量 79 趋势 12MIT

Bring your Garmin data to AI. An MCP server that bridges the garmin-grafana InfluxDB ecosystem with AI agents.

概览

An optional, self-hosted Model Context Protocol (MCP) server that exposes your Garmin training data to AI assistants. It is designed as a companion add-on to the arpanghosh8453/garmin-grafana project and reads directly from the InfluxDB instance that garmin-grafana already manages. It returns raw numbers from InfluxDB. All interpretation, analysis, and planning is delegated to the AI model consuming the tools — this server makes no assumptions about your fitness goals. Because this MCP server provides structured, context-aware data to LLMs like Claude, it acts as a world-class personal coach. Here is an actual, unedited response from Claude (via Copilot) summarizing a ride by cross-referencing simultaneously (Activity Details, Training Status, Sleep/Recovery, Training Zones, and Stress): "I just came back from my long Z2 ride. Please assess it in detail against our training plan!" View Claude's Analysis (Click to expand) - : HR locked at 121–122 bpm.

README

以下为原文 README 节选,完整内容请查看原文。

garmin-grafana-mcp-server

An optional, self-hosted Model Context Protocol (MCP) server that exposes your Garmin training data to AI assistants. It is designed as a companion add-on to the arpanghosh8453/garmin-grafana project and reads directly from the InfluxDB instance that garmin-grafana already manages.

This server is a pure data access layer. It returns raw numbers from InfluxDB. All interpretation, analysis, and planning is delegated to the AI model consuming the tools — this server makes no assumptions about your fitness goals.


Table of Contents


How it fits into the ecosystem

Garmin Device
      │
      ▼
garmin-grafana         ← you already have this running
  ├─ Garmin API sync
  ├─ InfluxDB (stores your data)
  └─ Grafana (dashboards)

garmin-grafana-mcp-server   ← this repo adds this
  └─ Reads from the same InfluxDB
  └─ Exposes MCP tools to AI clients (Claude, Copilot, etc.)

🪄 See it in action: The AI Coach

Because this MCP server provides structured, context-aware data to LLMs like Claude, it acts as a world-class personal coach.

Here is an actual, unedited response from Claude (via Copilot) summarizing a ride by cross-referencing six different MCP tools simultaneously (Activity Details, Training Status, Sleep/Recovery, Training Zones, and Stress):

Prompt: “I just came back from my long Z2 ride. Please assess it in detail against our training plan!”

1. SCORECARD vs PLAN

Metric Target Actual Grade
Duration 120–150 min 137.5 min ✅ Perfect
Time in Z1+Z2 — 99.4% (130.1 min) ✅ Excellent
Max HR ≤130 (ceiling) 135 bpm ⚠️ Brief breach
HR drift <5% -4.5% ✅ Excellent
Avg cadence 85–95 rpm 74 rpm ❌ Low

2. LAP-BY-LAP ANALYSIS

  • Laps 3–6 were textbook Z2: HR locked at 121–122 bpm. This is exactly the metabolic zone we wanted.
  • No cardiac drift: HR drift = -4.5%. This means your aerobic system handled the load comfortably.
在 GitHub 查看完整 README

安装

docker run -i --rm --network garmin-grafana_default --env-file /path/to/.env ghcr.io/ghighi3f/garmin-grafana-mcp-server:latest python server.py
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "garmin": { "type": "sse", "url": "http://<your-host>:8765/sse" } } }