Quantified Self MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HEALTH_DB_PATH | No | Optional path to the SQLite health database. If not set, the server uses its default database path. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
TOOL ROUTING:
For recording data:
simple daily metric (one value/day, e.g. steps, weight, mood) -> log_daily_metric
individual timestamped observation (has its own time/source, or a day may have several) -> log_measurement
workout/exercise session -> log_workout_session
For retrieving data:
broad/general health data across multiple metrics -> read_health_data
individual raw measurement rows -> read_measurements
workout sessions -> read_workout_sessions
history/trend of one specific metric -> get_metric_history
For analysis (why/trend/change/comparison/correlation):
why did one specific metric look like that on a given day -> explain_metric_change
broad scan of what changed lately across all metrics -> get_recent_changes
where a value came from, or whether sources agree -> get_metric_provenance
For data currency (check before trusting any analysis):
how current/complete the database is (CURRENT, STALE, INCOMPLETE, NO_DATA, IMPORT_FAILED) -> get_data_status
which imports ran, and whether the last one failed -> get_import_status
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| read_health_dataA | 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:
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. |
| export_health_data_csvA | 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. |
| log_daily_metricA | 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:
|
| clear_metricA | 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. |
| log_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:
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. |
| read_measurementsA | 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:
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. |
| aggregate_measurementsA | 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. |
| get_metric_provenanceA | 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:
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. |
| log_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:
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. |
| read_workout_sessionsA | 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:
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. |
| get_data_statusA | 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. |
| get_import_statusA | 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. |
| get_metric_historyA | 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:
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. |
| get_baselineA | 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 Do not use this tool when:
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. |
| detect_metric_anomaliesA | 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 Do not use this tool when:
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. |
| calculate_metric_trendA | 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 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:
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. |
| compare_metric_periodsA | 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
Do not use this tool when:
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. |
| find_metric_correlationA | 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:
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. |
| get_recent_changesA | 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 Do not use this tool when:
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. |
| explain_metric_changeA | 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 Do not use this tool when:
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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| weekly_health_review | Guided prompt for an AI assistant to conduct a comprehensive weekly health and recovery review. |
| doctor_visit_prep | Prepare an objective, data-backed summary of vitals, sleep, and activity for a doctor consultation. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Metric schema | The full set of metrics this server tracks, with each one's valid range (see logic.METRIC_BOUNDS) and whether it's currently configured as private (see HEALTH_PRIVATE_FIELDS). Read this to see accepted ranges up front, instead of discovering them one at a time from log_daily_metric's invalid_metric_value errors. |
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.