Connect an agent to Marrow
Marrow serves your Apple Health data over the Model Context Protocol, from your own iPhone or your own server. Nine read tools on the phone, thirteen on your own server (four of them answer in the app's own terms, scored against your own normal), twelve write tools behind a switch, bearer-token auth, no account anywhere. This page is the whole setup.
Agent on another machine, or need answers while the phone sleeps? Pair the self-hosted mirror (pip install marrow-mcp): it answers 24/7 for Claude Code, Cursor and OpenClaw. If you came here from the built-in Claude or ChatGPT connector, here is what it does that they don't.
Setup for one app at a time, Claude Code, Cursor, Codex and more, is on its own page under connections.
I want to connect my own Apple Health data to you. Marrow is a free iOS app that serves it over MCP, with no account and no subscription needed for this. It is on the App Store: https://apps.apple.com/app/id6800819435. Walk me through the whole thing: installing the app, turning the server on under Export then Local MCP, and adding the URL and bearer token it shows me to your MCP config as a Streamable HTTP server. If you cannot edit that config yourself, tell me the exact file and what to paste. Setup docs: https://marrowhealthapp.com/mcp. When it is connected, call health_summary for the last 7 days and tell me what stands out.
1. Turn the server on
It ships off. In the app: Export → Local MCP, then enable the server. You get a URL, a token, and a QR code. The server binds to your local network only, and the app shows the exact address it is listening on.
2. Point your client at it
Replace <phone-ip> and <token> with what the app shows you.
Claude Code
claude mcp add --transport http marrow \ http://<phone-ip>:21212/mcp \ --header "Authorization: Bearer <token>"
Claude Desktop, one click
Download marrow.mcpb on your computer and double-click it. Claude Desktop installs the extension and asks for the URL and token above. No terminal involved.
Claude Desktop (manual), Cursor, or any client using an mcp.json
{
"mcpServers": {
"marrow": {
"type": "http",
"url": "http://<phone-ip>:21212/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}
Check it by hand
curl -s http://<phone-ip>:21212/mcp \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
The tools
Reads are always there. Writes are a second switch. The phone's server lists the same twelve write tools as Cloud MCP (log_meal, log_water, log_weight, log_workout, log_strength, log_sleep, log_symptom, log_mood, edit_entry, delete_entry, set_targets, undo_entry) once you turn on Allow AI write under Local MCP, applied at once on the phone and written to Apple Health, every one of them undoable. Off, the server is read-only.
| Tool | Returns |
|---|---|
health_summary | Recent days across activity, heart, sleep and nutrition |
list_metrics | Every metric tracked, with units and coverage |
metric_daily | Daily values for any metric, up to 400 days |
metric_samples | Raw records with timestamps and source devices |
workouts | Workouts from every source. On the phone, also Marrow strength sessions set by set |
nutrition_log | Food diary with the full nutrient breakdown |
strength_log | Every lifting set with its set type, estimated 1RM per exercise, volume per muscle group. Warm-ups never count toward volume or records |
sleep_log | One night per wake day: bedtime, wake time, hours asleep, minutes per stage (self-hosted mirror) |
symptoms_and_mood | Symptoms with their severity, and State of Mind entries with feelings and what they were about (self-hosted mirror) |
Four more on the self-hosted mirror and on Cloud MCP. They start where the raw reads stop: each value is scored against your own trailing normal with the same math the app's Home page uses (the day itself excluded), so an agent begins from a read that is already true for you instead of judging a number against the population.
| Tool | Returns |
|---|---|
daily_brief | One day: each key metric with its value and the app's own phrase (normal for you, above your normal, well below your normal), food and water against your targets, last night's sleep, training done, mood and symptoms, and flags worth mentioning |
baselines | Your own normal per metric: mean and spread over the window, the latest value's z and phrase, the 7-day mean and the 90-day trend per month |
what_changed | The last week against the four before it: what moved and how notable it is for you, food, training, sleep and bedtime shifts, streams that started or stopped arriving |
data_quality | What the mirror holds and how fresh it is: per metric the latest day, coverage, cadence, sources and whether it has gone stale, so an agent never mistakes a gap for a fact |
The on-device server serves the first seven raw tools plus daily_brief and baselines (nine reads). The self-hosted mirror serves all thirteen, as does the hosted Cloud MCP copy. Every read on the mirror takes days back or from and to on the phone's calendar, and the mirror also offers four prompts (how_am_i_doing, weekly_review, doctor_prep, log_from_text) and four resources to clients that show them. Raw samples carry sleep stages and symptom severities.
There are 172 Apple Health metrics behind list_metrics, plus Marrow-native diary and strength data behind nutrition_log and strength_log, covering activity, heart, sleep, body, respiratory, mobility, hearing, nutrition, mind, symptoms, cycle and habits. Machine-readable version of this page: tools.json.
Keeping it up when the phone is not
The on-device server answers while the app is running. For 24/7 access, pair a self-hosted mirror: one Python stdlib file on a Pi, NAS or old laptop. The phone's background pushes keep it current, and it speaks the same MCP surface at http://<server-ip>:8800/mcp with its own token. The phone's tools use the app's metric keys (active_energy, heart_rate_variability). The server accepts both those and Apple's short names (active_energy_burned), so an agent can move between them without relearning. It is open source and installable:
pip install marrow-mcp marrow-server
Source: github.com/MarrowHealth/marrow-mcp. Listed in the official MCP registry as tech.skeletonarmy/marrow.
Origin Tech features Marrow, and mcptry lists Cloud MCP.
Do not port-forward either server to the open internet. Both are designed for a LAN or a tailnet. If you need remote access, front it with tailscale serve or an equivalent, so the transport is HTTPS and the device is authenticated before the bearer token is ever seen.
Troubleshooting
Start with the test below, run from the computer your AI runs on. It tells you which side the problem is on. Use the address and token from the connection's page in Marrow, with Marrow open on the phone.
curl -i http://<phone-ip>:21212/mcp \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
| What you get | What it means |
|---|---|
HTTP/1.1 200 OK and a list of tools | The phone works. The problem is in your app's settings: the address, the token, or a server type other than HTTP (Streamable HTTP). Fix the config and restart the app. |
401 Unauthorized | The token is wrong, or this connection is off in Marrow. Each connection in Your connections has its own token, and turning one off locks that app out while the others keep working. Switch it on, or copy its token again. |
404 Not Found with use POST /mcp | The path is wrong. The address ends in /mcp. |
| Connection refused, or no answer until it times out | The computer cannot reach the phone. Work through the list below. |
- Marrow must be open. The phone's server answers only while Marrow is open in front. When you switch apps or lock the phone, iOS soon pauses it. Open Marrow again and it answers again. For answers with the phone asleep, use Server MCP or Cloud MCP.
- Same Wi-Fi or tailnet. The computer and the phone must share a Wi-Fi network or a tailnet. Local MCP never answers over cellular. If Marrow says No network address found, join Wi-Fi or a tailnet. Guest and hotel Wi-Fi often stop devices reaching each other.
- Tailnet address or Wi-Fi address. Marrow shows one of the phone's addresses, usually its Wi-Fi one. A computer that reaches the phone over Tailscale needs the phone's tailnet address instead. The Tailscale app shows it (it starts with
100.). Put it in your config in place of the Wi-Fi address and keep the same port and token. - The address changed. A router can hand the phone a new Wi-Fi address after a while. Compare the address in Marrow with the one in your config. A reserved address on the router keeps it fixed.
- Local Network access is not the cause. iOS asks it when Marrow reaches out to a device on your network, such as a paired server. The phone's server answering a computer needs no permission, so turning that switch on or off does not change Local MCP.
- A VPN on the computer. A VPN other than your tailnet can send local traffic away from your Wi-Fi. Pause it and try the test again.
- A 405 in your app's log. The phone answers POST only and keeps no stream open, so a GET gets
405. Apps that speak Streamable HTTP carry on with POST, so this line alone is not the problem. - Your app takes only a command (stdio). Run the phone's address through the mcp-remote bridge. It needs
--allow-httpfor a plain http address that is not on the computer itself:npx -y mcp-remote http://<phone-ip>:21212/mcp --allow-http --header "Authorization: Bearer <token>". In a config file for Cursor, Codex or Claude Desktop on Windows, spaces inside args can get mangled. Write the header asAuthorization:${AUTH_HEADER}and setAUTH_HEADERtoBearer <token>in the server's env. - It reads but cannot log. Turn on Allow AI write under Local MCP. Entries apply at once on the phone and each one can be undone.
- The connection will not switch on. Free keeps 3 connections on at a time, Marrow Pro up to 20: AIs, servers and automations together. Sources never count. Turn one off in Your connections first.
Setup and fixes for one app at a time, Claude Code, Cursor, VS Code and more, are under connections.
What this costs
Nothing. Agent access is in the free tier, along with background sync, automated export, CSV and JSON export, and barcode scanning. Health Auto Export shipped an MCP server before Marrow did, and it is good, but theirs requires a Premium subscription. That difference, not primacy, is the claim worth making.
Requirements
- iOS 17 or later, and Apple Health. There is no Android or web version.
- Marrow is on the App Store, free: apps.apple.com/app/id6800819435.
- No Marrow account exists, so there is no hosted API to call without a user's own device.