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 11,579 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. Also seen: mentions Codex.

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 11,579 This file is loaded in full into every session.
When invoked 11,579 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.11579 $0.11579
Opus 5.5 $0.04632 $0.04632
Sonnet 5.5 $0.02316 $0.02316
Haiku 4.5 $0.01158 $0.01158

Measured 9d ago against content hash 8030ce9fed51, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 9d 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 · 471 lines

How it starts

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

Garmin MCP App (Run Coach)

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 — including React, Recharts and @modelcontextprotocol/ext-apps — into one self-contained dist/app.html (no CDN, so it works in ChatGPT's stricter sandbox and offline)
  • Tools declare _meta.ui.resourceUri to link a UI to a tool invocation
  • App ↔ Server communication: app.callServerTool() (app-initiated) and app.addEventListener("toolresult", …) (server-pushed)
  • SDK: @modelcontextprotocol/ext-apps 2.x on the split MCP SDK 2.x packages — McpServer / StdioServerTransport from @modelcontextprotocol/server, Client / InMemoryTransport from @modelcontextprotocol/client (the old @modelcontextprotocol/sdk package is not used). Tool inputSchema / prompt argsSchema are z.object(...) (raw shapes are deprecated, removed in 3.0). Node 20+.
  • 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 (dev:ui:demo: with a fictional demo account, see below)
  • 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.

Read the full file on GitHub · 471 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. 9d ago Changed · +36 lines · +2,972 tokens per session 8030ce9fed51
  2. 20d ago Changed · +90 lines · +4,005 tokens per session 8fc8a9209dbf
  3. 1mo 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 (16 stars, last pushed yesterday), licensed MIT. It adds 11,579 tokens to every session, about $0.0463 per session on Opus 5.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

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 · 9,715 tokens

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,581 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens