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, dates and limits, and the server enforces them. It stores nothing, and it can't write.

$ brew trust bluetextrelay/tap
$ brew install bluetextrelay/tap/imx
$ imx setup
macOS 14+Read-onlyNothing storedNo accountFull source after purchase$9.99 once, lifetime updates

Privacy first

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

Your whole Messages history means two-factor codes, bank alerts and years of family chats. Blue Text Relay gives your agent only what you mean to share, and you own the code, so you can check every line.

storage

Nothing is stored

No mirror, no cache, no cloud. Every request reads live, then forgets.

write path

Read-only by construction

Opened read-only, no send tool. Your agent can't send, edit or delete.

permissions

The MCP is the permission

Threads, dates, caps and expiry per key. Enforced by the server, not the agent.

source

Review it, own it, change it

Full source with every purchase. Build it, change it, ship your own product on it. How it works.

ai

No AI inside

Fixed, compiled rules. No model ever reads your messages.

accounts

No accounts, no phone-home

No accounts, no telemetry, an offline license. Paddle™ handles payment.

redaction

Secrets stay home, by default

API keys and passwords become [redacted: …]. On by default.

Software, as it should be

You own the code.*

Every purchase includes the exact source of the app you run. Read it, build it, change it. Not open source, but nothing is hidden from you.

  • Every line, every releaseDownload it with your key, or imx source. Tagged to the build.
  • Make it yoursPlain Swift Package. swift build and run your own binary if you'd rather trust your compiler than ours.
  • Review it firstRead the code yourself before anything touches your messages. Every query, every filter, every byte that leaves.

* Read it. Mod it. Ship it. That's the whole license.

 audit
$ unzip blue-text-relay-1.0.0-source.zip
$ cd blue-text-relay-1.0.0-source

# every network call: the update check, and imx source on request
$ grep -rln URLSession Sources/
Sources/imx/main.swift
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 68 tests, with 0 failures

Build vs. buy

Sure, you could vibe code this. This one's already done.

Five minutes gets you a script that lets your agent read chat.db. What takes weeks is everything after it. That part is already built, tested and turnkey.

The usual route is to give the agent's process Full Disk Access, or run an MCP server that opens the whole Messages database. Blue Text Relay puts a permission layer in between.

Blue Text Relayready todayVibe code ita script on chat.db with Full Disk Access
Which threadsOnly the threads you switch on, per keyEvery conversation you've ever had
How far backA from-date per thread, enforced in search tooYour entire history
2FA codes, bank alertsOut of scope unless you share that threadReadable if they're in any thread
Secrets in chatsAPI keys and passwords are [redacted: …] by default, unless you turn it offReturned as-is
Sending messagesRead-only, no send toolComing: metered send, per threadWhatever your script allows
One key per agentThreads, caps and expiry per key; revoke one, the rest keep workingOne shared door, or all-or-nothing
Message textattributedBody decoded, SMS and iMessage merged, late iCloud deliveries caughtBlank messages and split threads until you work it out
NamesContact names, and you shown as youPhone numbers
Reach it remotelyTailscale, Funnel, Cloudflare or ngrok in one clickSet up and secure a tunnel yourself
Runs headlesslaunchd service and a scriptable CLIA terminal tab you keep open
Audit trailWho asked for what and when, never message textNone
InstallSigned, notarized app; Full Disk Access survives updatesRe-grant access after every rebuild

It costs less than those weeks, and probably less than the tokens you'd spend having an agent build them. Save yourself the trouble.

Permissions, not prompts

Each agent sees only the chats you pick.

  • Chats and datesOnly the chats you list exist for that key, and only from the date you set. 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"}

Connect it your way

One MCP server with a REST mirror, so Claude Code, Claude Desktop, Cursor or your own script can call it. Pick how it's reached by where your agent runs. Keys, scopes and caps work the same on every connection.

ConnectionReachWho can read it in transitURLBest for
This Mac onlyApps on this MacNobody, it never leaveslocalhostAgents on the same Mac
RecommendedYour own devicesOnly you, end-to-end encryptedStableAgents on your other machines
FunnelPublic, key requiredOnly you, TLS ends on your MacStableCloud agents
Quick TunnelPublic, key requiredCloudflare couldChanges each startQuick tests
TunnelPublic, key requiredCloudflare couldStable, your domainYour own domain
Public, key requiredngrok couldStable, free domainA fixed URL, no domain

Setup, limits and every privacy trade-off: Connections and privacy. Want another connector? Tell us.

Tailscale, Cloudflare and ngrok are trademarks of their owners. Blue Text Relay isn't affiliated with or endorsed by them.

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.

Headless-first: every setting is an imx command with --json, and it runs as a launchd service on a Mac mini in a closet. Private over Tailscale by default; Funnel, Cloudflare Tunnel or ngrok on your own account. Docs →

Rather do it by hand? The Mac app exports any thread to a Markdown transcript or JSONL, for all time, since your last export, or a date range, with photos and files if you want them. Same thing from the terminal with imx export.

Claude CodeClaude DesktopCursorAny MCP clientcurl

Why I built it

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 message 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.

I also wanted you to feel comfortable connecting your messages to it. That's why you (and your agent) can read the source code. Trust, but verify.

Chris Gonzalez · LinkedIn · GitHub

Box price · software sold the way it should be

Pay once. Get every update, forever.†

† Or for as long as we keep shipping them. We plan to be at this a while.

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
  • Public docs and security model, so you know exactly what you're buying

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)

Paddle is our merchant of record. Your key arrives by email within a minute. Our policy is no refunds, but if something's wrong, email us and we'll work it out (refund policy).

Sold by Paddle

Paddle.com Market Limited, 30 Old Bailey, London, EC4M 7AU, UK (Paddle.com Inc. for US orders). Provided by NKATA LLC.

Questions

The honest answers.

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.

Is there a free trial?

No. The docs, the security model and this page describe exactly what it does and how, and at $9.99 it's priced so you can just try it. Our policy is no refunds, but if something isn't working, email us and we'll work it out.

I'm an AI agent. Where do I start?

Read /llms.txt. Everything you need to install, connect and help your user buy is there.

Your messages. Your computer. Your rules.

Install
$ curl -fsSL https://bluetext.sh | sh