garmin-mcp-app: Instructions file for Claude Code

CLAUDE.md

garmin-mcp-app CLAUDE.md is an instructions file for Claude Code from chenhunghan/garmin-mcp-app. It costs 4,602 tokens per session, scanned B, original, MIT.

Project instructions for a Garmin Connect integration that lets an MCP server and a React interface work together. It is organized as a monorepo, meaning one repository contains several related packages.

In plain words
What is it for?
Use it when developing the Garmin Connect server, its interactive React interface, or the shared TypeScript client for Garmin Connect login and data access.
Why use it?
It gives coding agents the project structure, communication rules, and development commands they need to change the integration safely.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is chenhunghan/garmin-mcp-app's own configuration. It tells Claude Code how to work on garmin-mcp-app itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything garmin-mcp-app configures →

Reuse

Borrowing it

Nothing to install: this file belongs to chenhunghan/garmin-mcp-app. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/chenhunghan/garmin-mcp-app/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/chenhunghan/garmin-mcp-app

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for garmin-mcp-app CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/chenhunghan/garmin-mcp-app/claude-md/github.svg)](https://agentmods.dev/instructions/chenhunghan/garmin-mcp-app/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/chenhunghan/garmin-mcp-app/claude-md"><img src="https://agentmods.dev/badge/instructions/chenhunghan/garmin-mcp-app/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for garmin-mcp-app CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/chenhunghan/garmin-mcp-app/claude-md"><img src="https://agentmods.dev/badge/instructions/chenhunghan/garmin-mcp-app/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,602 This file is loaded in full into every session.
When invoked 4,602 The same file — it is already loaded in full.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.04602 $0.04602
Opus 5 $0.02301 $0.02301
Sonnet 5 $0.00920 $0.00920
Haiku 4.5 $0.00460 $0.00460

Measured 10d ago against content hash d0f43e5d641a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

garmin-mcp-app CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

`npm run dev` works with Claude Desktop — it watch-builds both `dist/app.html` (Vite) and `dist/index.js` (esbuild). After changes, use **Developer > Reload MCP Configuration** in Claude Desktop to restart the server pro

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

In development, by default, tokens are saved at `~/.garminconnect/oauth2_token.json`. To test API endpoints directly with curl:
CLAUDE.md · 345 lines

How it starts

The opening of the file, as written. The whole thing — 345 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Garmin MCP App

MCP App server with interactive React UI for Garmin Connect integration.

Architecture

  • MCP Server (src/server.ts) — Node.js server over stdio, registers tools + UI resource
  • React UI (src/app.tsx) — Rendered in host's sandboxed iframe, communicates via postMessage
  • garmin-connect (packages/garmin-connect/) — TypeScript client library for Garmin Connect OAuth + API

The host (e.g. Claude Desktop) brokers all communication: Server ←stdio→ Host ←postMessage→ App iframe.

Key concepts

  • ui:// URIs are opaque identifiers, not real URLs — the host fetches them as MCP resources
  • vite-plugin-singlefile inlines all app JS/CSS into dist/app.html; React + Recharts loaded from esm.sh CDN at runtime via import maps; @modelcontextprotocol/ext-apps is bundled (not CDN) to avoid Zod version mismatches
  • Tools declare _meta.ui.resourceUri to link a UI to a tool invocation
  • App ↔ Server communication: app.callServerTool() (app-initiated) and app.ontoolresult (server-pushed)
  • See: https://modelcontextprotocol.io/docs/extensions/apps

Monorepo

npm workspaces (packages/*). Root scripts:

  • npm run dev — watch-build server + UI
  • npm run dev:ui — standalone UI dev wired to the MCP server
  • npm run test:lib — run garmin-connect tests
  • npm run pack — build + package .mcpb bundle

Dev UI (npm run dev:ui)

Runs the React UI standalone in a browser at localhost:5173, wired to the MCP server running in-process. This lets you test MCP app against the actual MCP server connecting to Garmin API without deploying to Claude Desktop.

Debugging the dev UI with agent-browser:

Use the agent-browser skill to inspect and interact with the dev UI:

agent-browser open http://localhost:5173/   # Open the dev UI
agent-browser snapshot                       # Full accessibility tree
agent-browser snapshot -i                    # Interactive elements only (forms, buttons)
agent-browser screenshot /tmp/dev-ui.png     # Take a screenshot
agent-browser console                        # Check browser console messages
agent-browser eval "document.body.innerHTML" # Inspect raw DOM

Read the full file on GitHub · 345 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 345 lines · 4,602 tokens per session scan B d0f43e5d641a

Subscribe to this mod's changes

garmin-mcp-app CLAUDE.md is an instructions file published in the GitHub repository chenhunghan/garmin-mcp-app (13 stars, last pushed 3mo ago), licensed MIT. It adds 4,602 tokens to every session, about $0.0230 per session on Opus 5. A static security scan graded it B with 2 findings (reads mcp configuration, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens