TopRelay Source on GitHub

Early development · open source

Your apps,
reachable by any AI.

TopRelay gives the apps on your computer a stable, private HTTPS address that claude.ai, ChatGPT, Grok and your own agents can use. It runs on your own free Cloudflare account, and you choose which tools each bot may use.

Who’s asking

Your Cloudflare

toprelay.you.workers.dev/notes/mcp

  • Signed in
  • Tool allowed
  • Key stripped

Your Mac · notes app

  • read-only
  • read-only
  • destructive

One outbound connection. No ports opened.

Ask:
  1. Pick a bot, then ask. Switch a tool off to see the relay refuse it.
Get the source

Free and open source (Apache-2.0). The CLI builds today; the Mac app is on its way.

No server to rent. No ports to open.

The relay is deployed into your own Cloudflare account. Your computer makes one outbound connection to it, so it works behind any router, carrier NAT or hotel Wi-Fi, and the address never changes.

  • Nothing goes through us: there is no TopRelay server, and no AI company sits in the middle.
  • Any local app: an MCP server over HTTP, a stdio MCP server it launches for you, or a plain local web service.
  • Sleeps for free: the connection hibernates between calls, and keepalives don’t wake it.
  • Fails fast: if your computer is asleep, a bot gets a clear answer at once, not a hang.

You choose the tools

Read-only tools are on by default; everything else waits for you. Hidden tools aren’t listed, and calls to them are refused, at the relay when the bot names the tool and again on your computer.

“Grok can search. Only Claude can delete.”

  • Rules per bot: by domain like claude.ai, by key, or by client.
  • Auth on everything: OAuth or a bearer key in front of every app, even one with no auth of its own.
  • The app’s key stays home: the bot’s credential is stripped at the relay, and your app’s own token is added on your computer.
  • Pick fewer: past 20 tools most models choose worse, so TopRelay tells you.

Rug-pull proof

Every tool’s definition is pinned by hash the day you allow it. If a server later changes what a tool says or does, that tool is held: hidden and refused until you look at the change.

toprelay pins shows what changed and lets you accept it.

Nothing leaks out

Before an answer leaves your computer, API keys, tokens, private keys and the app’s own credentials are redacted. Text that tries to give the model orders is flagged.

token: sk-live-•••••••• redacted

  • Secrets caught in answers: well-known key formats and the exact credentials you gave TopRelay.
  • Injections flagged: hidden Unicode and “ignore previous instructions” come with a warning attached.
  • Configurable: toprelay shield turns each check up, down or off per app.

Every call is provable

The call log is hash-chained and signed with Ed25519 on your computer. Edit one line, insert one or remove one, and verification says exactly where.

For app authors

Your app can tell a call came through the relay, and from which bot. Every relayed call carries a signed X-TopRelay-Caller header, with verifiers in Go, Swift, Python and Node.

  • Credentials from a file or the Keychain, never the command line, and changed live without reconnecting.
  • Nobody answers for your app: Unix sockets and macOS code-signature pins stop another program from taking its place.
  • One switch in your Mac app: TopRelayKit, a Swift package, adds “Reach from anywhere” with a copyable link per bot.

One address, every bot

  • claude.ai
  • ChatGPT
  • Grok
  • Claude API
  • OpenAI API
  • Gemini API
  • Qwen
  • Your own agents

Each gets its own connection steps. Real-account testing is next; the compatibility list is filled in only from real tests.

Questions

What does it cost?

Nothing. TopRelay is open source under Apache-2.0, and the relay runs on your own free Cloudflare account. There is no TopRelay server, so there is nothing of ours to pay for.

What can Cloudflare see?

The relay ends TLS inside the Worker on your Cloudflare account, so traffic between the bot and your app is not end-to-end encrypted. Cloudflare handles it the way it handles any Worker request. TopRelay logs no request bodies and stores only OAuth grants.

Why not ngrok or Tailscale Funnel?

They deliver requests; they don’t decide who may call which tool. Quick tunnels change their address every run, and Funnel is beta, ties you to *.ts.net names and passes no caller identity. TopRelay gives a stable address, puts OAuth or a key in front of every app, and lets you choose the tools per bot.

Why not OpenAI’s or Anthropic’s own tunnel?

Each serves only its own vendor’s bots and sends your traffic through that vendor. TopRelay serves all of them from one address on your account, and nothing goes through an AI company.

Can a bot do anything it likes on my computer?

Only what you allowed. Hidden tools aren’t listed and calls to them are refused, at the relay when the bot says which tool it wants and again on your computer. A stdio server runs with your permissions, so an allowed tool can do whatever that command can.

Is it ready?

Early. The engine works end to end and its tests pass, but it hasn’t been tried against real claude.ai, ChatGPT, Grok, Gemini or Qwen accounts yet. The Mac app is being built; the CLI builds from source today on macOS and Linux.

Give your apps an address.

Get the source

Security Protocol Support