Skip to main content

marrow-mcp

Give your AI agents read-only access to your own Apple Health data.

Marrow is a free iOS app that pulls 174 Apple Health metrics, your food diary and your workouts into one place. This repo is its self-hosted companion server: one Python file, standard library only, that keeps a SQLite mirror of your data on hardware you own and serves it over the Model Context Protocol so agents can query it 24/7, phone in your pocket.

Nothing here talks to a cloud. Data flows phone → your machine, full stop.

Run it

python3 marrow_server.py                      # prints a pairing URL
python3 marrow_server.py --port 8800 --data ./data

or

docker compose up -d

Open the pairing URL on any screen, then in Marrow: Server → Pair with a server → scan. From then on the app's background pushes keep the mirror current with the app closed.

Connect an agent

The server speaks MCP over Streamable HTTP (JSON-RPC 2.0, protocol version 2025-06-18), authenticated with a bearer token it generates on first run and prints alongside the pairing link.

Claude Code

claude mcp add --transport http marrow \
  http://<server-ip>:8800/mcp \
  --header "Authorization: Bearer <mcp token>"

Claude Desktop, Cursor, or anything using an mcp.json

{
  "mcpServers": {
    "marrow": {
      "type": "http",
      "url": "http://<server-ip>:8800/mcp",
      "headers": { "Authorization": "Bearer <mcp token>" }
    }
  }
}

Check it by hand

curl -s http://<server-ip>:8800/mcp \
  -H "Authorization: Bearer <mcp token>" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Tools

All read-only. Nothing an agent can call writes to your health record.

Tool Returns
health_summary Recent days across activity, heart, sleep and nutrition
list_metrics Every metric in the mirror, 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, including set-by-set strength detail

Then ask your agent things like "how did my sleep change once I started training in the mornings?" and let it go and look.

The other three ways in

This server is one of four, and you do not need it to give agents access:

  1. On-device MCP. Marrow runs the same MCP surface on the iPhone itself at http://<phone-ip>:21212/mcp, answering while the app is running. Richest data, zero extra hardware.
  2. This server. Always-on mirror on your own box.
  3. Relay gateway. Serves the mirror when the phone is asleep.
  4. Manual files. CSV, JSON and GPX out of the share sheet, plus scheduled webhook pushes to any URL (Home Assistant, n8n, your own endpoint).

All four are in the free tier. Setup for all of them: https://skeletonarmy.tech/mcp.

Security

  • Both servers are built for a LAN or a tailnet. Do not port-forward this to the open internet. If you need it remotely, front it with tailscale serve, Caddy, or an equivalent so the transport is HTTPS and the device is authenticated before the bearer token is ever presented.
  • Two separate tokens live in --data: .app-token for the phone's pushes and .mcp-token for agents. Rotating one does not disturb the other.
  • Ingest is idempotent and UUID-keyed, so a replayed batch cannot double-count.

Status

Marrow is in TestFlight beta (0.2.0, build 85), iOS 17+, and requires Apple Health. Ask for an invite.

The iOS app is closed source; this server is not, because you should be able to read anything you are asked to run on your own hardware.

Licence

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marrow_mcp-0.2.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marrow_mcp-0.2.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file marrow_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: marrow_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for marrow_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4b5b502227eca988353e85d207685097127bbe954639acebc7d3298d8bc4987b
MD5 ee5d55977922a4e48d448e105c341e2a
BLAKE2b-256 fc111e4d94962f6192b5760206e7b5bd50bffa54e80051562c11c14a91a6fd47

See more details on using hashes here.

File details

Details for the file marrow_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: marrow_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for marrow_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a9b655ae80ace23876078b5e3e4bbfb8380dcda2e3f1596373a30b5a9d9f555
MD5 4e145957164f1d450c1513ea2d2c211a
BLAKE2b-256 835a3b42ae91a10a9121e71b4ea188543d5c6c8ebf2505595ace4363d3193316

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

This release

0.2.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page