Self-hosted MCP server for iMessage · v1.0.0

There's no iMessage API.
So run your own.

Blue Text Relay turns the Messages database on your Mac into an MCP server for your agents. You pick the threads, the dates and the limits, and the server enforces them. It stores nothing, and it can't write.

$ curl -fsSL https://bluetextrelay.com/install.sh | sh
$ imx setup
macOS 14+Read-onlyNothing storedNo accountFull source after purchase$9.99 once, lifetime updates14-day trial

Privacy first

Privacy isn't a setting here. It's the architecture.

Giving an agent your whole Messages history means two-factor codes, bank alerts and years of family chats. Blue Text Relay is built so the agent only ever gets what you meant to share.

01 / storage

Nothing is stored

No mirror, no cache, no cloud. Each request reads the Messages database at that moment and returns only what the calling key allows. Turn a thread off and it's gone right away.

02 / write path

Read-only by construction

The database is opened read-only and there is no send tool. Your agent can't send, edit or delete a message, even if someone tells it to.

03 / permissions

The MCP is the permission

Every key carries its own threads, from-date, daily cap, per-call cap and expiry. The server enforces them, so you don't depend on the agent behaving.

04 / redaction

Secrets never leave

API keys, tokens, private keys, passwords in URLs and stream keys become [redacted: …] before any text leaves the database. On by default.

05 / ai

No AI inside

Every filter is a fixed, deterministic rule compiled into the app. No model, local or remote, reads your messages inside Blue Text Relay.

06 / network

Never phones home

No telemetry, no account, and the license is verified offline. The only outbound call is an optional update check you can switch off.

Full disclosure

Not open source. Fully open to you.

Software that reads your messages should be auditable by the person running it. Every purchase includes the complete source of every release: the exact code behind the binary you run. Read it, build it yourself, diff it between versions. Nothing hidden, no closed core.

  • Every line, every releaseA source zip ships next to each download, tagged to the build.
  • Build it yourselfPlain Swift Package. swift build and run your own binary if you'd rather trust your compiler than ours.
  • Modify it for yourselfPatch it, harden it, add a rule. The license lets you change it for your own use.
  • Paid for, so it's maintainedA box price keeps one person accountable for it without ads, data deals or a subscription. The one thing you can't do is redistribute it.
 audit
$ unzip blue-text-relay-1.0.0-source.zip
$ cd blue-text-relay-1.0.0-source

# every network call the app makes
$ grep -rln URLSession Sources/
Sources/ExporterCore/UpdateChecker.swift

# how Messages is opened
$ grep -rln SQLITE_OPEN_READONLY Sources/
Sources/ExporterCore/SQLite.swift

$ swift build -c release && swift test
✓ Executed 51 tests, with 0 failures

Permissions, not prompts

One key per agent. Every limit enforced at the server.

  • Thread scopeOnly the threads you list exist for that key, including in search.
  • History floor"From October 1 onward." Anything older can't be fetched, searched or counted.
  • MeteringDaily request caps, per-call message caps and usage counts per key.
  • Revoke in one commandExpiry dates, instant revoke, and an audit log that never contains message text.
 zsh
$ imx keys add "claude-on-mini" --threads 3f9c2e1a,7b0d4e6f \
    --daily 500 --per-call 200 --expires 2027-01-01
Created key "claude-on-mini". Token (shown once):
••••••••••••••••••••••••••••••••

$ imx history 7b0d4e6f 2026-10-01
Agents can read 7b0d4e6f from Oct 1, 2026 onward

# meanwhile, on the agent's machine
→ get_new_messages {"thread_id": "7b0d4e6f", "cursor": "88190"}
← {"messages": [{"from": "Sam", "text":
     "staging key is [redacted: Stripe key], deploy at 4"}],
   "next_cursor": "88213"}

Search your threads, not your whole life

Five tools. Use it like a search engine for the threads you allow.

MCP over Streamable HTTP with JSON responses, plus a REST mirror under /api. Names are resolved from your contacts, and you show up as you, not "me".

list_threads

Ids, names, participants, message counts and each thread's history floor.

get_messages

JSON, oldest first, with since, until and limit.

get_transcript

Clean Markdown grouped by day, ready to drop into context.

search_messages

Case-insensitive search across the threads this key can see.

get_new_messages

Cursor-based polling that never misses or repeats a message, including late iCloud deliveries.

Claude CodeClaude DesktopCursorAny MCP clientcurl

Headless first

Everything from a terminal. The app is optional.

Run it on a Mac mini in a closet. Every setting has a command, and every command has --json, so your agent can drive the setup too.

imx setup

Check access, pick threads, create a key, choose the network.

imx service install

A launchd service that runs at login and restarts if it stops.

imx remote tailscale

Private over your tailnet. Funnel, Cloudflare Tunnel and ngrok are one command each.

imx status --json

License, server, threads, keys and remote in one machine-readable call.

imx export --threads 7b0d4e6f --since 2026-10-01

Markdown plus JSONL for batch AI intake, with "since last export".

imx privacy on

Credential redaction for exports and the server. Use --raw when you need it off.

Your network, your accounts

Private by default over Tailscale.

The server binds only to localhost and your Tailscale address, so traffic is end-to-end encrypted between your own devices. Need a public URL? Tailscale Funnel, Cloudflare Tunnel or ngrok each set up with one click, on your own account, never ours. The app tells you what each provider can see before you turn it on.

 imx remote status
● Mode        Tailscale (private)
  URL         http://your-mac.your-tailnet.ts.net:8766/mcp
  Bound to    127.0.0.1, 100.x.y.z
  Encryption  WireGuard, end to end
  Rate limit  20 req/s · 10 bad keys → 15 min lockout

Why it exists

I didn't want my agent reading everything.

My agent runs on a machine that does real work. It needed a handful of my work threads, kept up to date. What I didn't want was to give that machine every iMessage I've ever received: 2FA codes, bank alerts, family chats, a decade of history. One bad prompt and all of it is in play.

So I built the thing I wanted. It reads my Mac and shares only what I allow, with limits the agent can't talk its way around. It can't write anything. It's yours to run, inspect and keep.

— Chris Gonzalez, maker of Blue Text Relay

Box price · software sold the way it should be

Pay once. Get every update, forever.

Launch price $19.99

$9.99once, lifetime
  • Every future update and version, for life
  • Mac app and the imx CLI
  • Full source of every release, for a complete audit
  • Offline license key, use it on the Macs you own
  • 14-day free trial, no card needed
  • 14-day no-questions refund

What you won't get

  • A subscription
  • An account to create
  • Usage-based billing
  • Paid upgrades
  • Telemetry or analytics
  • Your messages on our servers (we have none)

Checkout by Paddle, our merchant of record. Your key arrives by email within a minute.

Are you an AI agent?

Everything you need to install, connect and help your user buy is in plain text. Start with /llms.txt, or read the agent guide.

$ curl https://bluetextrelay.com/llms.txt

Questions

The honest answers.

Is there an official iMessage API?

No. Apple doesn't offer a public API for reading iMessage conversations. Blue Text Relay reads the Messages database on your own Mac, with the Full Disk Access permission you grant, and serves the threads you pick as an MCP server.

Why not just give my agent Full Disk Access?

Because then it can read everything: every thread, every 2FA code, all of your history, plus the rest of your disk. Blue Text Relay holds that permission so your agent doesn't need it, and hands out narrow, revocable, metered access instead.

Can it send messages?

No. It's read-only by design. There is no send tool and no write path.

Does my Mac need to be on?

Yes. The endpoint is live while the app or service runs. Agents are told to back off and retry, and their cursor picks up exactly where it left off.

Is this allowed by Apple?

It uses Full Disk Access, the permission macOS provides for exactly this, to read your own data on your own Mac. It bypasses nothing and modifies nothing. Blue Text Relay is an independent product, not affiliated with Apple.

Intel or Apple silicon?

Both. macOS 14 or later.

What happens when the trial ends?

The server answers HTTP 402 with JSON that tells your agent exactly how to help you buy and activate. Nothing is deleted. Paste your key with imx license <KEY> and it's back.

Your messages. Your Mac. Your rules.

Install
$ curl -fsSL https://bluetextrelay.com/install.sh | sh