If you've ever pasted a health export into an LLM, you've probably seen the classic failure mode: it sees "HRV dropped 24%" and tells you you're overtraining — without noticing you had a 5-day logging gap, or switched from Apple Watch (SDNN) to Oura/WHOOP (RMSSD) mid-month.
I built Quantified Self MCP (v0.9.0, MIT) to solve that with local SQLite storage + deterministic N=1 data-quality checks:
- Direct
export.zip streaming for Apple Health: No need to manually unzip multi-hundred-MB XML files (quantified-self-init-db export.zip). Plus an automated iOS Shortcuts + launchd/cron incremental sync guide so you don't have to re-export every week. - Per-device provenance: Keeps readings tagged by source (
Apple Watch, Oura, WHOOP, Google Fit, Health Connect) so multi-wearable setups don't silently double-count steps or conflate incompatible metrics. - Honest
ClaimEvidence caveats: Every trend, comparison, correlation, or anomaly returns coverage stats (days logged, max gap, staleness, source conflicts) and caps confidence (insufficient / suggestive / supported) so the AI has to state caveats alongside the numbers. - Your choice of AI: Run 100% offline with LM Studio / Ollama, or connect Claude Desktop / Cursor (with
HEALTH_PRIVATE_FIELDS to block sensitive metrics like weight or mood from leaving your DB).
Quick test with 60 days of synthetic demo data:
pip install quantified-self-mcp
quantified-self-init-db --demo
GitHub: https://github.com/Thecimal/quantified-self-mcp
Would love feedback from multi-wearable users — especially anyone willing to test a real anonymized WHOOP v2 API export or contribute a Garmin/Fitbit adapter!
3. Show HN Post (Engineering & Architecture Angle)
Title: Show HN: Quantified Self MCP – Local SQLite health analytics with deterministic data-quality gates
Body: Hi HN,
I built Quantified Self MCP (MIT, Python + SQLite + FastMCP) because letting an LLM summarize personal health CSVs directly is a bad idea for two reasons: privacy (dumping raw exports into prompts) and silent statistical nonsense (hallucinated correlations, ignored logging gaps, or mixing Apple Watch SDNN with Oura/WHOOP RMSSD).
Repo: https://github.com/Thecimal/quantified-self-mcp
Instead of feeding raw rows to a model and hoping it behaves, the server enforces a deterministic boundary:
- Canonical ingestion & provenance (
ingest.py, import_adapters.py**):** Importers for Apple Health (streaming .zip/.xml), Oura v2, Android Health Connect, Google Fit Takeout, WHOOP v2 JSON (synthetic-tested), and mapped CSVs all validate through a single normalize_batch contract with UTC-offset handling, bounds checks, and per-device source_record_id deduplication. ClaimEvidence engine (qs_evidence/registry.yaml, evidence.py**):** Every analytical tool (calculate_trend, compare_periods, detect_anomalies, find_correlations, baseline) computes math in Python and attaches a ClaimDecision containing sample coverage, max gap days, freshness, source conflicts, and mandatory must_state caveats. Today, trends/correlations/anomalies cap at suggestive until practical effect-size checking is implemented; only baseline can reach supported.- Permission boundaries & prompt budget (
privacy.py, eval/agent/**):** HEALTH_PRIVATE_FIELDS redacts chosen metrics to null across reads, CSV exports, and coverage spans (backed by deterministic permission evals). All 20 tools also have strict token/character budget tests so they fit comfortably in smaller local models (LM Studio / Ollama) as well as Claude Desktop / Cursor. - Storage vs. inference clarity: SQLite (
health.db, optional SQLCipher encryption, WAL-safe quantified-self-backup) and Python analytics run locally with zero outbound network calls. For zero-cloud inference, pair with LM Studio or Ollama + Open WebUI.
Try it locally in 20 seconds with synthetic data:
pip install quantified-self-mcp
quantified-self-init-db --demo
Happy to answer questions on the ingestion invariants, SQLite trigger projection (measurements → daily_metrics), or MCP tool-surface tradeoffs.