whoop-mcp
Copilot instructions165 starsChanged 8 months agoMITView on GitHub
An MCP server wrapping the WHOOP REST API for AI assistant access to health/fitness data.
In this repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-and-interface-designSkill
- browser-testing-with-devtoolsSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- frontend-ui-engineeringSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- incremental-implementationSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- using-agent-skillsSkill
The file
We split this copilot-instructions.md into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 31
Write tests before code (TDD)
- Distinctive: line 33
Test hierarchy: unit > integration > e2e (use the lowest level that captures the behavior)
- Very specific: line 36
Run npm test after every change
- Distinctive: line 40
Every PR must pass: lint, type check, tests, build
- Distinctive: line 41
No secrets in code or version control
- Distinctive: line 46
Never mix formatting changes with behavior changes
- Distinctive: line 56
All 10 tasks complete (scaffold, types, token store, API client, OAuth, MCP server shell, tool implementations, error handling, entry point …
- Distinctive: line 63
Always: Run tests before commits, validate input with Zod, store tokens securely (0600)
- Very specific: line 65
Never: Commit secrets, remove failing tests, skip verification, use any, hit real WHOOP API in tests
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project: whoop-mcp
An MCP server wrapping the WHOOP REST API for AI assistant access to health/fitness data.
Tech Stack
- TypeScript ~5.x (strict, no
any), Node.js >= 18, nativefetch @modelcontextprotocol/sdk, Zod, Vitest, ESLint, Prettier- Build:
tsc— no bundler. No runtime deps beyond SDK + Zod.
Commands
npm run build # Build TypeScript
npm test # Run tests (Vitest)
npm run lint # ESLint
npm run lint:fix # ESLint + fix
npm run format # Prettier
npm run typecheck # tsc --noEmit
npm run dev # Dev mode (tsx)Code Conventions
- Files:
kebab-case.ts| Types:PascalCase| Functions:camelCase| Constants:SCREAMING_SNAKE_CASE - MCP tool names:
snake_case(MCP convention) - Named exports only (no default exports)
- Explicit return types on all exported functions
- One tool per file — handler + Zod schema co-located
- Errors throw typed errors, never return error codes
- Tests mirror
src/structure intests/directory
Testing
- Write tests before code (TDD)
- For bugs: write a failing test first, then fix (Prove-It pattern)
- Test hierarchy: unit > integration > e2e (use the lowest level that captures the behavior)
- Mock the WHOOP API — never hit real API in tests. Use
vi.fn()for fetch. - Coverage target: >80% on
src/auth/andsrc/api/, >70% overall - Run
npm testafter every change
Code Quality
- Review across five axes: correctness, readability, architecture, security, performance
- Every PR must pass: lint, type check, tests, build
- No secrets in code or version control
Implementation
- Build in small, verifiable increments
- Each increment: implement → test → verify → commit
- Never mix formatting changes with behavior changes
Key References
- Spec:
docs/specs/whoop-mcp-server.md - Implementation plan:
docs/specs/implementation-plan.md - Code review:
docs/reviews/code-review-checkpoint-1.md(Tasks 1–5 approved) - WHOOP API base:
https://api.prod.whoop.com/developer(v2 endpoints) - OAuth: Authorization Code flow, tokens at
~/.whoop-mcp/tokens.json(0600 perms)
Implementation Status
- All 10 tasks complete (scaffold, types, token store, API client, OAuth, MCP server shell, tool implementations, error handling, entry point + CLI, docs + publish prep)
- 212 tests passing, typecheck clean, build clean, lint clean
- ✅ MCP Inspector integration tested 2026-04-12 — OAuth flow,
get_profiletool returning real data - ✅ Claude Desktop integration tested 2026-04-12 — server connected, OAuth completed, tools accessible
- ✅ Published to npm 2026-04-12 —
whoop-ai-mcp@0.1.0at https://www.npmjs.com/package/whoop-ai-mcp
Boundaries
- Always: Run tests before commits, validate input with Zod, store tokens securely (0600)
- Ask first: New runtime dependencies, token storage changes, new API endpoints, OAuth flow changes
- Never: Commit secrets, remove failing tests, skip verification, use
any, hit real WHOOP API in tests
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

