Connections / AI assistants
Codex CLI and Marrow Health
OpenAI's coding agent in your terminal, signed in with your ChatGPT account. It reads your phone, your own server or Cloud MCP, which makes it the way to use Marrow with OpenAI's models on Free and Plus.
Open in Marrow works on an iPhone with Marrow 1.4.2 or later.
Which way?
- Cloud MCP if you want answers any time with nothing to run. Part of Marrow Pro.
- Local MCP if the computer running it shares your phone's Wi-Fi or tailnet. Free, and it answers while Marrow is open.
- Server MCP if you keep a small server running. Free, and it answers any time.
Cloud MCP Local MCP Server MCP
Cloud MCP Pro
A private copy of your data on Marrow's server. Your AI reads it any time, phone asleep, and every sign-in is approved on your phone. You need: A ChatGPT account, any plan.
- In Marrow, open Export and tap Codex CLI. Pick Cloud MCP.
- Turn Cloud MCP on (Marrow Pro) and add Codex CLI to Your connections. Marrow shows your link.
- Add the block below to
~/.codex/config.toml.[mcp_servers.marrow] url = "https://connect.marrowhealthapp.com/t/<your-id>/mcp" - Run codex and ask.
- Run
codex mcp login marrow. Type the code the page shows into Marrow and approve. - Ask: How am I doing today?
Placeholder shown: Marrow fills in your own link.
Local MCP Free
A server on your iPhone. It answers while Marrow is open, to apps on the same Wi-Fi or tailnet. Nothing leaves your network. You need: A ChatGPT account, any plan.
- In Marrow, open Export and tap Codex CLI. Pick Local MCP.
- Turn Local MCP on and add Codex CLI to Your connections. Marrow shows the address and a token made for this connection.
- Add the block below to
~/.codex/config.toml.[mcp_servers.marrow] url = "http://<phone-ip>:21212/mcp" http_headers = { "Authorization" = "Bearer <token>" } - Run codex and ask.
- Ask: How am I doing today?
Placeholders shown: Marrow fills in your phone's address and the token.
Server MCP Free
Marrow's open-source server on a computer you keep on (a Pi, a NAS, an old laptop). The phone keeps it current and it answers any time. You need: A ChatGPT account, any plan.
- Run Marrow's server on a computer you keep on and pair it with the app (how).
- In Marrow, open Export, tap Codex CLI and pick Server MCP. Add it to Your connections. Marrow shows the server's address. The token is the mcp token your server printed when it started.
- Add the block below to
~/.codex/config.toml.[mcp_servers.marrow] url = "http://<server-ip>:8800/mcp" http_headers = { "Authorization" = "Bearer <token>" } - Run codex and ask.
- Ask: How am I doing today?
Placeholders shown: Marrow fills in your server's address. The token is the one your server printed.
What it can do
- Read. A daily brief scored against your own normal, your baselines, what changed this week, any metric day by day, workouts, lifts set by set, sleep stages and your food diary.
- Log. Your AI logs meals, water, weight, workouts, sleep, symptoms and mood when you ask, after you turn on Allow AI write for that way in Marrow. Every entry can be undone.
Try asking
- How am I doing today?
- What changed in my sleep this week compared with my normal?
- Chart my resting heart rate for the last 90 days.
- Log a turkey sandwich and an apple for lunch.
If it does not work
In Codex CLI
- Codex does not list marrow. Codex reads
~/.codex/config.toml, orconfig.tomlin$CODEX_HOMEwhen that is set. Check the block is in that file and runcodex mcp list. In the TUI,/mcp verboseshows the details. - 401 from the phone or your server. When Codex finds no token it connects without one, so the server answers 401. Check that the
http_headersline holds Bearer and the token from Marrow. - Signing in to Cloud MCP. Run
codex mcp login marrow, or/mcp login marrowin the TUI. It opens the sign-in page. Type the code it shows into Marrow and approve. - A timeout while it starts. Codex waits 10 seconds for a server by default. Add
startup_timeout_sec = 30to the[mcp_servers.marrow]block. - It works in the terminal but not in the IDE. The Codex IDE extension and the ChatGPT desktop app read the same config.toml. Restart them after an edit.
Cloud MCP checks
- The sign-in waits in Marrow. The sign-in page shows a 6-character code. Open Marrow, go to Export, type the code and tap Approve. A request expires after ten minutes and three wrong codes deny it. If that happens, start again from your AI.
- The page says the link did not match a Marrow. In Marrow, open your AI under Connections, tap Copy your link and paste the whole link.
- It worked, then stopped. When Cloud MCP is off, or Marrow Pro has ended, the copy is paused. Switching Cloud MCP off also signs every AI out. Turn it back on, switch this connection on in Your connections and sign in again from your AI.
- Approve stops at the limit. Each AI is one connection. Free keeps 1 connection on at a time. Marrow Pro keeps up to 10: AIs, servers and automations together. Turn one off in Your connections, then approve again.
- It reads but cannot log. Turn on Allow AI write for Cloud MCP in Marrow. An entry reaches the phone within seconds when notifications are allowed for Marrow, or the next time you open the app.
Local MCP checks
- Keep Marrow 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.
- Same Wi-Fi or tailnet. The computer must be on the phone's Wi-Fi or tailnet, never cellular. Guest Wi-Fi often stops devices reaching each other. Over Tailscale, use the phone's tailnet address (it starts with 100.) in place of its Wi-Fi address, and check the Wi-Fi address again if your router hands out a new one.
- 401 Unauthorized. The token is wrong, or this connection is off in Marrow. Each connection has its own token, and turning one off locks that app out. Switch it on in Your connections, or copy the token again.
- Test from the computer. The curl line in the Local MCP guide shows whether the phone answers, and with which error.
Server MCP checks
- Reach the server first. From the computer running your AI, open
http://<server-ip>:8800/health. It answers without a token. If it does not, the server is not running or the address is wrong. Then try the curl test on the Server MCP page. - 401 from the server. Agents use the mcp token the server printed when it started. It is also in the
.mcp-tokenfile in the server's data folder. The phone's pairing token does not work for agents. - Old data, or Not delivering in Marrow. The phone cannot reach the server to push. Check the server is running and that its address in Marrow still works from the phone. For a server on your home network, Marrow needs Local Network access: Settings, Privacy and Security, Local Network.
- It reads but cannot log. Turn on Allow AI write for this server in Export, Your connections. Entries wait on the server and land when Marrow next opens or wakes.
More fixes in the guides: Cloud MCP, Local MCP, Server MCP.