Quantified Self MCP Server
Quantified Self MCP Server
로컬 Model Context Protocol(MCP) 서버로, LLM(예: Claude Desktop)이 개인 건강 및 재무 데이터를 조회할 수 있게 해줍니다. 모든 데이터는 두 개의 로컬 SQLite 파일에 저장되며, 사용자가 제어하는 Python 프로세스가 디스크에서 직접 읽습니다. 클라우드 데이터베이스도, 대시보드도, 제3자 서비스도 없습니다.
포함 내용
quantified-self-mcp/
├── server.py # the MCP server (FastMCP) — 2 tools
├── init_db.py # loads a CSV file into the local SQLite database
├── requirements.txt
├── .gitignore # keeps data/ and .db files out of version control
└── sample_data/
├── health_sample.csv # 30 days of sample data, so you can try it immediately
└── finance_sample.csv # ~2 months of sample expensesinit_db.py를 실행하면 server.py 옆에 data/ 폴더가 생성되고 그 안에 health.db와 finance.db가 만들어집니다. 이 폴더는 사용자 자신의 데이터로 사용자 머신에서 생성되므로 여기에는 포함되지 않습니다.
Related MCP server: apple-health-mcp
노출되는 도구
도구 | 반환값 | 매개변수(모두 선택 사항) |
| 일일 걸음 수, 수면 시간, 안정 시 심박수 |
|
| 카테고리별 지출 원장 및 합계 |
|
두 도구 모두 일치하는 행 과 계산된 요약(건강 데이터의 평균/최소/최대, 재무 데이터의 카테고리별 합계)을 반환하므로, 모델이 여러 행에 걸쳐 직접 집계할 필요가 없습니다.
1. 환경 설정
Python 3.10+ 필요.
cd quantified-self-mcp
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt2. 데이터 불러오기
포함된 샘플로 즉시 사용해 보세요:
python init_db.py health sample_data/health_sample.csv
python init_db.py finance sample_data/finance_sample.csv자신의 데이터를 사용하려면 다음 열로 CSV로 내보낸 후, 동일한 명령을 자신의 파일에 대해 실행하세요:
health CSV:
date, steps, sleep_hours, resting_heart_ratefinance CSV:
date, category, amount, description(description은 선택 사항)
날짜는 ISO 형식(2026-08-23)이어야 합니다. MM/DD/YYYY 형식도 허용되며 변환됩니다. 금액/숫자에는 $와 ,가 포함될 수 있으며(예: $1,234.56) 자동으로 제거됩니다. 문제가 있는 행(잘못된 날짜, 숫자가 아닌 금액, 누락된 카테고리 등)은 전체 가져오기를 중단하지 않고 경고와 함께 건너뜁니다. 마지막에 출력되는 줄에는 항상 로드된 행 수와 건너뛴 행 수가 표시됩니다.
init_db.py health를 다시 실행하면 날짜 기준으로 업서트(upsert)됩니다(날짜를 추가하면서 다시 실행해도 안전). init_db.py finance는 원장에 자연스러운 고유 키가 없으므로 매번 새 행을 추가합니다. 두 명령 모두에 --replace를 추가하면 먼저 테이블을 비우고 실행합니다.
3. (선택 사항) 단독 테스트
클라이언트에 연결하기 전에 MCP Inspector를 열고 브라우저에서 도구를 직접 호출할 수 있습니다:
fastmcp dev inspector server.py4. Claude Desktop에 연결하기
Claude Desktop은 JSON 구성 파일을 기반으로 로컬 MCP 서버를 하위 프로세스로 실행하고 stdio를 통해 통신합니다:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
앱에서 바로 이동할 수 있습니다: Settings → Developer → Edit Config.
mcpServers 아래에 항목을 추가하되 절대 경로를 사용하세요. 중요한 점은 command를 단순한 python이 아니라 방금 만든 가상 환경 내부의 Python 인터프리터를 가리키게 해야 한다는 것입니다. Claude Desktop은 최소 환경에서 서버를 실행하므로 셸의 PATH나 활성화된 venv를 안정적으로 상속받지 못합니다. 따라서 단순한 "python"은 종종 잘못된 인터프리터(또는 아무것도)로 해석되어 서버가 조용히 시작에 실패합니다.
{
"mcpServers": {
"quantified-self": {
"command": "/absolute/path/to/quantified-self-mcp/.venv/bin/python3",
"args": ["/absolute/path/to/quantified-self-mcp/server.py"]
}
}
}Windows에서는 일반적으로 다음과 같습니다:
{
"mcpServers": {
"quantified-self": {
"command": "C:\\absolute\\path\\to\\quantified-self-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\absolute\\path\\to\\quantified-self-mcp\\server.py"]
}
}
}파일을 저장한 후 Claude Desktop을 완전히 종료하고 다시 열어야 합니다(창을 닫는 것만으로는 부족합니다. 구성 변경을 로드하려면 재시작이 필요합니다). 채팅 상자에서 망치/도구 아이콘을 찾아 quantified-self가 연결되었는지 확인하세요.
FastMCP에는 이 파일을 편집해 주는 CLI 단축 명령도 포함되어 있습니다 — fastmcp install claude-desktop server.py --name "Quantified Self" — 시도해 볼 만합니다(현재 플래그는 fastmcp install claude-desktop --help 실행). 하지만 위의 수동 JSON 방식은 항상 작동하며 문제가 있을 때 디버깅하기 더 쉽습니다. Anthropic에는 로컬 MCP 서버용 최신 원클릭 "Desktop Extension" 패키징 형식도 있습니다. 이와 같은 개인 용도에는 필요하지 않지만, JSON 편집에 익숙하지 않은 사람과 이 서버를 공유하려는 경우 알아두면 유용합니다.
5. (선택 사항) Docker에서 실행 / Glama에서 호스팅
#5-optional-run-it-in-docker--host-it-on-glama
로컬 venv 대신 컨테이너에서 실행하려는 사람을 위해 Dockerfile이 포함되어 있습니다. 여기에는 Glama에서 호스팅하는 것도 포함됩니다. Glama는 저장소에 Dockerfile이 있으면 그 파일에서 직접 빌드합니다.
docker build -t quantified-self-mcp .
docker run -i --rm -v "$PWD/data:/app/data" quantified-self-mcp이미지는 Python 전용입니다(python:3.12-slim + pip install -r requirements.txt). 이 프로젝트에는 Node.js가 전혀 없습니다. HEALTH_DB_PATH와 FINANCE_DB_PATH는 컨테이너 내부의 /data/health.db와 /data/finance.db를 기본값으로 사용하므로, 마운트된 볼륨(예: Glama의 /data 마운트)이 재배포 시에도 데이터베이스를 유지합니다. 재정의하려면 server.py 상단의 Configuration 섹션을 참조하세요.
glama.json은 의도적으로 최소한으로 유지됩니다. 단지 Glama가 이 저장소를 가리키게 할 뿐이며, 이미지가 어떻게 빌드되고 시작되는지(python server.py, stdio를 통해)에 대한 실제 정보는 Dockerfile이 담당합니다. 이전 버전의 glama.json은 Dockerfile을 사용하는 대신 일반 빌드팩(빈 debian:trixie-slim 베이스 이미지에 수동 pip install 빌드 단계와 cmdArguments 추가)을 수동으로 구성하려고 했습니다. 그 이미지에는 Python 인터프리터가 안정적으로 프로비저닝되지 않았고, 플랫폼은 이 저장소에 존재하지 않는 Node.js 엔트리포인트(Cannot find module '/app/server.js')를 실행하려고 시도했습니다. Dockerfile을 제공하면 이러한 모호성이 제거됩니다.
개인정보 보호 모델 — "로컬"이 실제로 의미하는 것
이 프로젝트의 핵심이므로 정확히 짚고 넘어가겠습니다:
두 SQLite 데이터베이스는 이 프로젝트의
data/폴더 안, 사용자 디스크에만 존재합니다. 서버는 네트워크 호출을 하지 않으며, 텔레메트리도 없고, 어디에도 동기화하지 않습니다.server.py는 두 데이터베이스를 SQLite의 읽기 전용 모드로 엽니다("쓰기를 실행하지 않는다"는 수준이 아니라 연결 자체가 물리적으로 쓸 수 없습니다). 버그가 있거나 악의적인 프롬프트라도 두 도구가 데이터를 수정할 수 없습니다. 터미널에서 사용자가 실행하는init_db.py만이 데이터베이스에 쓸 수 있습니다.MCP 클라이언트가 이 도구 중 하나를 호출하면 해당 쿼리에 대해 반환된 특정 행이 응답하는 모델에 전송되는 대화의 일부가 됩니다. 이것이 MCP가 모델에 정보를 제공하는 메커니즘입니다. 호스팅된 모델과 함께 Claude Desktop을 사용하는 경우, 질문한 데이터 조각이 해당 턴에 Anthropic으로 전송된다는 뜻입니다. 채팅에 입력하는 다른 모든 내용과 마찬가지입니다.
따라서 여기서 "로컬"이 의미하는 바는: 전체 데이터셋이 제3자 데이터베이스에 저장되거나 동기화되지 않으며, 도구가 실제로 호출되지 않는 한 아무것도 전송되지 않는다는 것입니다. 그리고 그 경우에도 전체 데이터베이스가 아니라 해당 호출이 반환한 행만 전송됩니다. 완전한 오프라인 엔드투엔드를 의미하지는 않습니다. 그러려면 완전히 로컬인 모델 런타임(예: Ollama)과 MCP 호환 클라이언트가 필요합니다.
문제 해결
Claude Desktop에 서버가 표시되지 않음:
command와args가 절대 경로를 사용하는지, venv의 Python 경로가 실제로 존재하는지, 앱을 완전히 종료하고 다시 열었는지 확인하세요. 로그는~/Library/Logs/Claude(macOS) 또는%APPDATA%\Claude\logs(Windows)에 있습니다.mcp-server-quantified-self.log에 이 서버의 stderr가 표시됩니다.도구에서 "No health/finance database found" 오류: 해당 데이터셋에 대해 먼저
init_db.py를 실행하세요. 도구는 의도적으로 빈 데이터베이스를 자동 생성하지 않으므로 조용히 빈 답변을 받지 않습니다.server.py편집이 적용되지 않는 것 같음: Claude Desktop을 다시 시작하세요. 서버 프로세스는 메시지마다가 아니라 앱 세션당 한 번 시작됩니다.Glama 호스팅이
Cannot find module '/app/server.js'오류로 실패: 배포가 Python 대신 Node.js 런타임으로 폴백되었음을 의미합니다. 이 저장소에는server.js가 없습니다. 일반 빌드팩 구성 대신 포함된Dockerfile(위의 "Docker에서 실행 / Glama에서 호스팅" 참조)로 빌드하여 플랫폼이 안정적으로python server.py를 실행하게 하세요.
확장하기
원한다면 자연스러운 다음 단계 몇 가지를 소개합니다. 이 중 어느 것도 구현되어 있지 않으며, 단지 패턴이 이끄는 방향입니다:
항목을 CSV/SQL 대신 LLM을 통해 추가할 수 있도록 쓰기 도구(
log_expense,log_daily_metric) 작성.더 많은 지표 — 체중, 운동, 기분, 수분 섭취 — 각각은 또 다른 테이블과 또 다른 읽기 도구일 뿐입니다.
read_finance_data합계를 사용자가 정의한 목표와 비교하는 예산 대비 실적(budget-vs-actual) 도구.
Available Tools
20 toolsaggregate_measurementsPreview a source-priority resolution of a day's measurementsARead-onlyIdempotent
Preview what one day's raw measurements would roll up to if a conflicting metric were resolved using source_priority, alongside that day's actual current daily_metrics values.
daily_metrics is a database-maintained projection (see db/schema.sql): every log_measurement/import automatically keeps it in sync the moment it's written, using each metric's fixed aggregation method: summed for steps, sleep_hours, workout_minutes and water_ml; averaged for resting_heart_rate, mood, heart_rate and hrv_ms; the latest reading for weight_kg (see aggregation_rules). When a metric has more than one source on a day, the projection uses only one source's observations, never a blend: the highest-ranked present source in the stored priority list (manual log_daily_metric entries rank first by default), else the source with the most hours that day, then the latest observation, then by name. This tool writes nothing: "aggregated" previews what the source_priority you pass would produce; "row" is the real, currently-stored value. If a metric has more than one source that day, use get_metric_provenance first to see whether they actually disagree.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: date (required), source_priority. Returns: row, date, aggregated
calculate_metric_trendCalculate metric trendARead-onlyIdempotent
Fit a simple straight-line trend to one metric over a window and
report its direction, slope (change per day), and r_squared (how well
a straight line actually fits — low r_squared means "noisy," not
"flat"; "insufficient_data" below 3 points). A low evidence.coverage_ratio
or claim.decision/data_health means flag the fit as sparse rather
than stating the slope as complete.
Use this tool when the user asks whether one metric is trending up/down/flat over a continuous window.
Do not use this tool when:
the user wants two specific, separately-defined ranges compared, rather than a single continuous slope -> use
compare_metric_periodsinstead.the user asks what's typical/normal rather than direction -> use
get_baselineinstead.the user asks about isolated unusual days rather than overall direction -> use
detect_metric_anomaliesinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: metric (required), end_date, start_date. Returns: claim, range, trend, metric, +2 more
clear_metricClear a single metricADestructiveIdempotent
Blank out (set to null) a single metric for a single day, without touching that day's other metrics. The counterpart to log_daily_metric for undoing a bad value — e.g. a mood logged for the wrong day, or a weight entered with the wrong units. Clears everything recorded for that metric/day — including individual log_measurement readings or imported rows, not just a value log_daily_metric wrote directly — so the metric genuinely goes back to "nothing recorded" rather than falling back to a blended value from whatever else is left.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: date (required), field (required). Returns: row, note, cleared
compare_metric_periodsCompare two periodsARead-onlyIdempotent
Compare one metric's average between two date ranges — e.g. "this
month vs. last month" or "since starting a new medication vs. before."
The two ranges may be any length and need not be adjacent or equal in
size; each is summarized with its own baseline first. Read
claim.decision/data_health before reporting — must_state has to be
mentioned, and claim.evidence_a/evidence_b can disagree sharply between
the two periods. delta/pct_change are null if either has no data.
Do not use this tool when:
there's only one continuous window and the question is about direction over time, not two discrete ranges -> use
calculate_metric_trendinstead.the user wants "what's normal" for a single window, not a before/after comparison -> use
get_baselineinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: metric (required), period_a_end (required), period_b_end (required), period_a_start (required), +1 more. Returns: claim, delta, metric, period_a, +7 more
detect_metric_anomaliesDetect metric anomaliesARead-onlyIdempotent
Flag days where one metric deviated sharply from its own baseline over
the window, using a median/MAD-based modified z-score rather than a
mean/stdev z-score — more robust for short, noisy personal-health
series, where the mean/stdev version is easily dragged around by the
very outliers it's supposed to catch. An empty result only means
"nothing unusual" when claim.decision (and data_health) says the
data supports it — tier "insufficient" means say the detector couldn't
score the series, not that it's clean.
Do not use this tool when:
the user wants a general sense of what's typical, with no interest in flagging specific days -> use
get_baselineinstead.the user asks about a steady increase/decrease over time rather than isolated spikes/dips -> use
calculate_metric_trendinstead.the user already has one specific date in mind and wants the full "why" behind it (baseline, anomaly, trend, and correlations together) -> use
explain_metric_changeinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: metric (required), end_date, threshold, start_date. Returns: claim, range, metric, evidence, +3 more
explain_metric_changeExplain a metric changeARead-onlyIdempotent
Build an evidence bundle for "why did my look like that on
?": that day's value against a 90-day baseline, whether it
qualifies as an anomaly, the trend leading into it, and any other
metric that correlates with it strongly enough to be worth mentioning.
Returns facts, not an explanation — turning "sleep was 2.6 stdev below
baseline and resting heart rate correlates at r=0.71" into an actual
answer for the person is what the calling model should do with these
facts, not something this tool guesses at itself. Use overall_decision
(weakest-of-N over the baseline, trend and every correlation) to decide
what to report/caveat, not the individual claim/evidence fields.
"narrative_facts" restates the bundle in plain English but does not
hedge on coverage itself; check data_health too.
Do not use this tool when:
scanning across many metrics for what changed lately, without a specific metric/date in mind -> use
get_recent_changesinstead.you only need one piece of this bundle (just the baseline, just the trend, just anomalies, or just a correlation) rather than the full why-explanation -> use
get_baseline,calculate_metric_trend,detect_metric_anomalies, orfind_metric_correlationdirectly instead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: date (required), metric (required). Returns: date, trend, value, metric, +13 more
export_health_data_csvExport health data to CSVADestructiveIdempotent
Write daily health metrics for a date range to a CSV file on disk, next to the database, instead of returning every row through this tool's own result.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Unlike read_health_data, this is not capped at MAX_ROWS_RETURNED and the row values themselves are not included in this tool's response — only the resulting file's path and a row count are, so a long-range export doesn't have to pass through a cloud LLM's context. Any metric listed in HEALTH_PRIVATE_FIELDS is still written as an empty cell, since those fields shouldn't leave the database at all.
Inputs: end_date, start_date. Returns: path, range, rows_exported
find_metric_correlationFind correlation between two metricsARead-onlyIdempotent
Compute the Pearson correlation between two metrics over the same window, joined by date. Correlation, not causation: a strong r just means the two moved together, not that one caused the other. A question phrased causally ("does my sleep affect my mood?") still gets only this association. The result does not show that one metric affects or causes the other, so report r, n and the wording the claim allows, and say nothing stronger.
Use this tool when the user names or implies two different metrics and asks whether they move together.
Do not use this tool when:
only one metric is in question -> use
get_baseline,calculate_metric_trend, ordetect_metric_anomaliesinstead, depending on what's being asked about that one metric.the question is why one metric looked the way it did on a specific date -> use
explain_metric_change, which already reports the other metrics that correlate with it.the question is whether one metric differs between two time periods (e.g. before vs. after a date) -> use
compare_metric_periods.
Reading the result: report what was observed (r, n, and how many days of each metric were present) separately from what may be claimed about it. Read claim.decision before reporting r. Its tier (insufficient, suggestive, detectable_not_meaningful or supported) is the strongest wording allowed, and a high r from a thin or gappy sample is capped there, not in r itself, so never judge a correlation from r alone. claim.decision.template is a sentence frame, not finished text: replace "..." with the finding, and {limiting_factors} with the must_state entries put into plain words. Those entries are codes, not sentences (practical_not_evaluated, for example, means that whether the difference matters in practice was not checked), so do not quote a code to the user. When data_health is not VALID, say why.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: metric_a (required), metric_b (required), end_date, lag_days, +1 more. Returns: n, r, note, claim, +6 more
get_baselineGet metric baselineARead-onlyIdempotent
Compute "what's normal" for one metric over a window: mean, median, and
standard deviation. The number every other analytics tool below measures
against, so a wider window (60-90+ days) is more stable than
read_health_data's 30-day default. Read claim.decision/data_health
before stating it — a thin window caps how it may be reported. Null
fields (n=0) mean no data in range, not an error.
Do not use this tool when:
the user asks whether a metric is going up/down over time -> use
calculate_metric_trendinstead.the user asks whether specific days looked unusual -> use
detect_metric_anomaliesinstead.the user wants two ranges compared against each other -> use
compare_metric_periodsinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: metric (required), end_date, start_date. Returns: claim, range, metric, baseline, +2 more
get_data_statusCheck how current the data isARead-onlyIdempotent
Report how current and complete the database is: latest data date, coverage window, gaps, last successful import, and an overall status of CURRENT, STALE, INCOMPLETE, NO_DATA or IMPORT_FAILED. Check this before drawing conclusions from any analysis, and say so when the status is anything other than CURRENT. The status and latest_data describe the database as a whole, so one metric still arriving keeps them current while another has stopped: read "stale_metrics" too (each metric's own latest day vs. its threshold, most behind first; it's when the data is for, not when imported) before presenting a listed metric as current.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: stale_after_days. Returns: gaps, as_of, action, reason, +12 more
get_import_statusList recent importsARead-onlyIdempotent
List the most recent import runs, newest first: which importer, the source file's name and SHA-256, whether the run succeeded, failed or was interrupted, and how many rows were loaded, skipped and written. A run still marked "running" long after it started was interrupted.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: limit. Returns: imports
get_metric_historyGet metric historyARead-onlyIdempotent
One metric's day-by-day values only, not the other metrics read_health_data always includes. Check "data_health" before trusting the points as complete.
Do not use this tool when:
the request is broad/general, across multiple metrics at once -> use
read_health_datainstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: metric (required), end_date, start_date. Returns: range, metric, points, evidence, +1 more
get_metric_provenanceBreak a metric down by sourceARead-onlyIdempotent
Show one metric's raw measurements for one day, broken down by which source reported them — answers "which one is correct?" when e.g. an Apple Watch and a Garmin disagree on resting heart rate, instead of silently averaging two different devices into one number.
Do not use this tool when:
the user just wants a plain day-by-day history for the metric, with no need to see the per-source breakdown -> use
get_metric_historyinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: date (required), metric (required). Returns: date, metric, sources, conflict
get_recent_changesGet recent changesARead-onlyIdempotent
Scan every (non-private) metric for what's changed lately: a recent
period vs. the four-times-as-long period before it (period-over-period
shift), any anomalies inside the recent period, and a trend over it.
The single best tool to start a "how have I been doing?" conversation
with — it does the scanning across all metrics that would otherwise
take one get_baseline/detect_metric_anomalies/calculate_metric_trend
call per metric. Only notable findings are included (reports signal, not
a status page). Each change carries its own claim/evidence — don't
state it as plain fact when evidence.confidence is "moderate"/"low".
Check data_health too.
Do not use this tool when:
the user already named a specific metric and wants the full why-bundle for it (value, baseline, anomaly flag, trend, correlated metrics) -> use
explain_metric_changeinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: days. Returns: changes, data_health, recent_range, baseline_range
log_daily_metricLog a daily metricADestructiveIdempotent
Record one or more health metrics for a single day, creating that day's row if it doesn't already have one.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Only the metrics you pass are written — anything left as null is not touched, so logging just today's mood doesn't erase today's steps if they were set earlier. To undo a value logged by mistake, use clear_metric rather than trying to overwrite it with a placeholder. Use this for a simple day-level value for one of the nine fixed metrics below.
Do not use this tool when:
the observation needs its own timestamp/source, or the day may have more than one reading of the same metric -> use
log_measurementinstead.it's a workout/exercise session -> use
log_workout_sessioninstead (workout_minutes here is just the daily total, not the session itself).
Inputs: date (required), mood, steps, hrv_ms, +6 more. Returns: row, logged
log_measurementLog a raw measurementA
Record a single raw observation — one metric, one value, one point in time — rather than a whole day's summary. Use this instead of log_daily_metric when the source, exact time, or the fact that there were multiple readings that day matters (e.g. three separate workouts, or a wearable's periodic heart-rate samples).
Do not use this tool when:
it's just a single end-of-day value for a fixed metric -> use
log_daily_metricinstead.it's a workout/exercise session -> use
log_workout_sessioninstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: value (required), metric (required), timestamp (required), unit, +2 more. Returns: measurement
log_workout_sessionLog a workout sessionA
Record one workout as a structured event — activity, timing, intensity, and heart-rate response — rather than folding it into the day's workout_minutes total. Use this alongside (not instead of) log_daily_metric/log_measurement for workout_minutes: this is what lets explain_metric_change say what the workout was, not just how long it ran. A day can have more than one session; each call adds a new row.
Do not use this tool when:
the user only wants to record the day's total exercise minutes as a single number, with no activity type/timing/intensity -> use
log_daily_metric(workout_minutes) orlog_measurementinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: date (required), activity_type (required), duration_minutes (required), notes, +5 more. Returns: session
read_health_dataRead health dataARead-onlyIdempotent
Read daily health metrics from the local database: steps, sleep hours, resting heart rate, weight (kg), workout minutes, mood, and water intake (ml). Best for a broad/general request across multiple metrics at once. Check "coverage" before treating "summary" as a full picture — a "confidence" of "moderate"/"low", or one metric's coverage_percent much lower than the rest, means say so.
Do not use this tool when:
the user wants one specific metric's history/trend over time -> use
get_metric_historyinstead.the user wants raw/individual measurement rows (timestamp, source) -> use
read_measurementsinstead.the user wants workout sessions specifically -> use
read_workout_sessionsinstead.the user is asking why something changed, or wants a trend, anomaly, comparison, or correlation -> use
explain_metric_change(one metric, one date) orget_recent_changes(scan across all metrics) instead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: end_date, start_date. Returns: rows, range, summary, coverage, +1 more
read_measurementsRead raw measurementsARead-onlyIdempotent
Read individual measurement rows (not the daily_metrics aggregate), most recent first. Use this to see exactly when and where each reading came from, rather than just a day's summarized value.
Do not use this tool when:
the user wants a broad, multi-metric overview -> use
read_health_datainstead.the user wants one metric's day-by-day history -> use
get_metric_historyinstead.the user wants workout sessions -> use
read_workout_sessionsinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: limit, metric, source, end_date, +1 more. Returns: count, measurements
read_workout_sessionsRead workout sessionsARead-onlyIdempotent
Read individual workout sessions (not the daily_metrics workout_minutes total), most recent day first. Use this to see what each workout actually was — activity, timing, intensity, heart rate — rather than just a day's summed minutes.
Do not use this tool when:
the user just wants the daily workout_minutes total, not individual sessions -> use
read_health_dataorget_metric_historyinstead.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Inputs: limit, end_date, start_date, activity_type. Returns: count, sessions
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
The tools are cleanly separated by purpose: raw vs daily logging, workouts, several read granularities, status, analytics, provenance, export, and clearing. Descriptions include explicit "Do not use this tool when" guidance that resolves subtle overlaps such as read_health_data vs get_metric_history vs read_measurements, and get_recent_changes vs explain_metric_change.
All names use consistent snake_case with a leading verb, e.g. log_measurement, read_health_data, get_baseline, detect_metric_anomalies. The verbs vary by operation but follow a predictable verb_noun pattern with no camelCase or arbitrary style mixing.
At 20 tools the surface is heavy for an agent to navigate, even though each tool targets a real operation. The analytics and read families are defensible individually, but the overall set would benefit from grouping or consolidation.
The server covers logging, daily/raw reading, workouts, analytics, data/import status, provenance, export, and clearing. Minor gaps remain: workout sessions cannot be updated or deleted, individual measurement rows cannot be deleted except via clear_metric, and there is no import-trigger tool despite import status being exposed.
Maintenance
Related MCP Connectors
Personal finance, bank account, and shared memory connector for Claude, ChatGPT, Gemini Spark & more
Ask Claude, ChatGPT or Cursor about your Apple Health data: workouts, sleep, food. Read-only.
Your health and performance memory: 100+ sources and your lab results, for any AI app.
Query, explore, and manage your databases through natural conversation.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server that allows users to query and analyze their Apple Health data using SQL and natural language, utilizing DuckDB for fast and efficient health data analysis.378 npm579MIT
- AlicenseNot gradedqualityDmaintenanceLoads Apple Health export data into a local SQLite database and exposes tools to query health metrics and workout records via natural language.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying personal data synced from services like Lunch Money and Strava using SQL via Claude.1MIT
- AlicenseBqualityDmaintenanceEnables AI agents to interact with local SQLite databases with full CRUD, schema introspection, foreign key relations, generated columns, and multi-format import/export (CSV, JSON, XLSX) through natural language.2614 npmMIT