r/ClaudeAI • u/thecimal • 8d ago
Built with Claude I built an open-source MCP server to query Apple Health, WHOOP & Oura locally in Claude Desktop (trimmed tool tokens in v0.8.2)
I built Quantified Self MCP, an open-source MCP server designed specifically for Claude Desktop and Claude Code that lets you query, correlate, and analyze your personal health data completely offline.
What it does
Health data is sensitive, so instead of uploading it to cloud aggregators, this project keeps everything on your local machine in an SQLite database. It connects Claude directly to your wearable data:
- Supported Sources: Apple Health (XML/Shortcuts), WHOOP API JSON, Oura Ring API JSON, Android Health Connect, and generic CSVs.
- Statistical Evidence Engine: Rather than letting the LLM hallucinate medical conclusions, it provides tools for Pearson correlation analysis, IQR anomaly detection, 7d/30d moving averages, and data completeness checks.
- Provenance Tracking: Tracks which device logged which metric (e.g., Apple Watch vs. Oura Ring) to prevent multi-device data conflation.
- Privacy Granularity: Configurable privacy masks (hide sensitive metrics, add noise, or restrict date windows).
How Claude and Claude Code helped build it
I used Claude Code extensively throughout development:
- Architecting the MCP tool surface: Claude helped structure the schemas across all 20 analytical tools. In the latest v0.8.2 release, I used Claude Code to audit and trim verbose tool descriptions, saving significant context tokens so Claude Desktop stays responsive even when multiple MCP servers are active.
- Statistical Engine & Safety Guardrails: Claude helped implement and test the core analytical logic (handling missing data windows, preventing causal claims on correlations, and enforcing metric bounds).
- Test Suite: Claude Code helped write the comprehensive test suite, including deterministic prompt surface budget tests (
tests/test_tool_surface_size.py) to prevent token bloat regressions.
It is 100% Free & Open-Source (How to try it)
The project is completely free, licensed under MIT, has no paid tiers, and requires no API keys or third-party accounts.
You can test it out in Claude Desktop in under 2 minutes using the built-in demo dataset (60 days of realistic synthetic data):
- Install with uv or pip:
uv tool install quantified-self-mcp
# or: pip install quantified-self-mcp- Seed the demo database:
quantified-self-init-db --demo(Or import your real data anytime via quantified-self-init-db export.xml*)*
- Add to your Claude Desktop config: Add this to your
claude_desktop_config.json:
{
"mcpServers": {
"quantified-self": {
"command": "uvx",
"args": ["quantified-self-mcp"]
}
}
}Restart Claude Desktop, and you can immediately ask things like:
- "How did my sleep duration correlate with my HRV last month?"
- "Detect any anomalies in my resting heart rate over the last 30 days."
GitHub repo: https://github.com/Thecimal/quantified-self-mcp
Feedback, questions, and PRs are very welcome!
1
u/shimoheihei2 8d ago
The annoying part with Apple Health is that you need to manually export it as xml. It works a lot better from a native app that can integrate in the Health app directly.