<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 정찬효</title>
    <description>The latest articles on DEV Community by 정찬효 (@roian6).</description>
    <link>https://dev.to/roian6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4178445%2F9bb3d63d-f59f-4d07-80bd-37ec097041ff.jpg</url>
      <title>DEV Community: 정찬효</title>
      <link>https://dev.to/roian6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/roian6"/>
    <language>en</language>
    <item>
      <title>Bring Apple Health history into an AI workflow with MCP</title>
      <dc:creator>정찬효</dc:creator>
      <pubDate>Mon, 12 Oct 2026 05:54:57 +0000</pubDate>
      <link>https://dev.to/roian6/bring-apple-health-history-into-an-ai-workflow-with-mcp-1328</link>
      <guid>https://dev.to/roian6/bring-apple-health-history-into-an-ai-workflow-with-mcp-1328</guid>
      <description>&lt;p&gt;I maintain Apple Health AI Bridge, a free, open-source project that makes Apple Health records available to AI tools and scripts. An iPhone companion sends the categories you permit to a receiver on your Mac or Linux computer. The receiver stores the history in SQLite and exposes a CLI and local read-only MCP server.&lt;/p&gt;

&lt;p&gt;The useful part is returning to the history with a new question. You can compare two periods, choose a different metric, or revisit the comparison after more records arrive, without preparing another archive for each conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ask about a period
&lt;/h2&gt;

&lt;p&gt;An example prompt for a compatible AI client is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Compare my recorded activity in October 1-7 with September 24-30. Show the sleep and workout records behind the comparison.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The client can request the periods through &lt;code&gt;get_daily_summary&lt;/code&gt;, then use &lt;code&gt;get_sleep_summary&lt;/code&gt; and &lt;code&gt;get_workouts&lt;/code&gt; for the relevant records. These tools accept &lt;code&gt;start_date&lt;/code&gt; and &lt;code&gt;end_date&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For the first period, the &lt;code&gt;get_daily_summary&lt;/code&gt; argument object is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-01"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"end_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-08"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the comparison period:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-09-24"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"end_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-01"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The start date is inclusive and the end date is exclusive. Each call covers seven days. Daily summaries include &lt;code&gt;sample_totals&lt;/code&gt; for sum-safe metrics and &lt;code&gt;sample_statistics&lt;/code&gt; for other sample metrics, along with source information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Go beyond the weekly summary
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;get_timeseries&lt;/code&gt; retrieves selected metrics using &lt;code&gt;type_codes&lt;/code&gt; and UTC &lt;code&gt;start_time&lt;/code&gt; and &lt;code&gt;end_time&lt;/code&gt; values. You can inspect heart rate or weight observations for a chosen interval, while sleep and workouts have their own tools.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;list_synced_metrics&lt;/code&gt; shows which metrics have reached your receiver. &lt;code&gt;list_supported_timeseries_types&lt;/code&gt; provides the catalog for time-series queries, and &lt;code&gt;explain_sources&lt;/code&gt; describes where the records came from. The CLI provides another way to inspect the same stored history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect your client
&lt;/h2&gt;

&lt;p&gt;You'll need an iPhone on iOS 18+ and a Mac or Linux receiver. The &lt;a href="https://healthbridge.chanhyo.dev/install/" rel="noopener noreferrer"&gt;install guide&lt;/a&gt; walks through the companion, routing, pairing and first upload.&lt;/p&gt;

&lt;p&gt;Setup generates a local stdio MCP descriptor with the executable command and database arguments. Use that descriptor to configure a compatible client on the receiver host. Once connected, you can ask about the stored history, including while the iPhone app is closed.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/roian6/apple-health-ai-bridge/blob/d97e15f23b5032a687fcfd580fc775ee9234d71a/src/health_bridge/mcp/tools.py" rel="noopener noreferrer"&gt;tool definitions&lt;/a&gt; show the input schemas. The &lt;a href="https://github.com/roian6/apple-health-ai-bridge" rel="noopener noreferrer"&gt;repository&lt;/a&gt; contains the receiver, iPhone source and supported-data reference.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>mcp</category>
      <category>ios</category>
      <category>selfhosted</category>
    </item>
  </channel>
</rss>
