Skip to main content
Glama
Beeper MCP Relay

Beeper MCP Relay

by jardenberg
README.md
# Beeper MCP Relay

Connect Beeper Desktop on an always-on Mac to ChatGPT and other remote MCP clients.

Keep one Beeper Desktop session running on your Mac, then use it from ChatGPT on your phone, laptop or desktop. The relay uses the official [Beeper CLI](https://github.com/beeper/cli) locally and provides an authenticated remote MCP connection for your AI application.

This independent community project is maintained by [Joakim Jardenberg](https://github.com/jardenberg). Beeper is a trademark of its owner. Beeper's Matrix network bridges are documented separately at [Bridges & Self-hosting](https://developers.beeper.com/bridges/).

## Why this exists

We wanted to ask ChatGPT about our conversations, find a group chat, read its recent messages, and send a message when requested, from whichever device we happened to be using. Our always-on iMac already had Beeper Desktop signed in to the messaging accounts. The goal was to make that existing session available through one ChatGPT connection across our devices.

Beeper provides a built-in MCP server through its Desktop API. We started with the direct approach: connect ChatGPT to that server. Its default address is `http://localhost:23373/v0/mcp`, so we used Tailscale Funnel to give the Mac's endpoint a reachable HTTPS address. That established a network route. The remaining work was getting ChatGPT to discover the tools and authenticate successfully.

### Where the direct connection failed

Our attempts encountered failures at several layers. An early plugin package contained an unsupported manifest field, so the desktop client rejected it before connecting. A shell-sandbox restriction was also initially misread as a network failure. Correcting those diagnoses still left us without a working cloud tool connection.

The decisive authentication evidence came from Beeper's own logs. In our 2 December 2026 setup, using Beeper Desktop 4.3.366, Beeper rejected the OAuth client registration for ChatGPT's remote connection with this error:

```text
redirect_uris must contain at least one loopback HTTP/HTTPS or private-use URI scheme redirect
```

The registration implementation accepted callbacks to a local address or a native application's private URI scheme. ChatGPT's remote OAuth flow needed a public HTTPS callback, which that implementation rejected. Registration failed before the sign-in approval flow could complete. Exposing the endpoint through HTTPS solved reachability, but could not change which OAuth clients Beeper would accept.

Meanwhile, the official Beeper CLI could successfully access the existing session on the Mac. That gave us a working local integration to build on. We turned it into a small background service and connected that service to a cloud MCP gateway with authentication suitable for ChatGPT.

These are the observations behind this project's original deployment. The version and date matter when comparing them with a newer Beeper release or another client's authentication flow.

## How access from your phone actually works

In our ChatGPT deployment, the phone runs the ChatGPT interface. When ChatGPT uses a Beeper tool, its backend calls the authenticated cloud MCP gateway. The gateway sends the named operation over HTTPS to the relay on the Mac. The relay runs the corresponding allowlisted CLI command, and the CLI talks to Beeper Desktop locally. The result returns through the gateway to ChatGPT, which answers in your conversation.

```mermaid
sequenceDiagram
    participant Device as ChatGPT app
    participant AI as ChatGPT backend
    participant Gateway as MCP gateway
    participant Mac as Mac relay and CLI
    participant Beeper as Beeper Desktop
    Device->>AI: Ask about a conversation
    AI->>Gateway: Authenticated MCP tool call
    Gateway->>Mac: HTTPS request with relay secret
    Mac->>Beeper: Authorized local API operation
    Beeper-->>Mac: Result
    Mac-->>Gateway: Result
    Gateway-->>AI: MCP tool result
    AI-->>Device: Answer
```

You connect the plugin to your ChatGPT account and select it when you need fresh messaging data or an action. Supported ChatGPT clients on your other devices can use the same connection. Tailscale runs on the Mac providing the HTTPS endpoint; your phone and other computers need only access to ChatGPT and its connected plugin. The Mac remains the machine running Beeper and must stay available.

The two connections have separate authentication. Beeper's local authorization stays on the Mac. The cloud gateway authenticates the AI client and uses a separate relay secret to reach the Mac. In the ChatGPT Sites adapter, Sites handles the ChatGPT account authentication. Other MCP applications can use the standalone bearer adapter when they support its authentication method. Here, an **MCP host** means the AI application that discovers and calls these tools, such as ChatGPT.

## What it can do

The full catalog has 18 tools for accounts, chat and message search, contacts, message lookup, sending, editing, deletion, reactions, archiving and reminders. New installations start with 8 read-only tools. Enable writes explicitly when you want them.

The first private deployment was verified from ChatGPT on desktop and phone. Host support, account permissions and custom-MCP availability vary. A working HTTP endpoint alone does not establish that a particular host has loaded its tools.

## Install on your Mac

You need macOS, Node.js 22 or later, and a signed-in Beeper Desktop with its Desktop API enabled. Both Apple Silicon and Intel Homebrew paths are discovered through `PATH`. Release checks document which hardware was actually exercised.

Install the prerequisites and authorize the official CLI against your existing session.

```sh
brew install node beeper/tap/cli
beeper setup --local --json
```

Download the `.tgz` package from [GitHub Releases](https://github.com/jardenberg/beeper-mcp-relay/releases), verify it against the release's `SHA256SUMS`, then install that local file.

```sh
npm install -g ./jardenberg-beeper-mcp-relay-1.1.1.tgz
beeper-mcp-relay install --start-apps
beeper-mcp-relay status
```

`--start-apps` requires Tailscale at `/Applications/Tailscale.app` and adds login jobs for it and Beeper Desktop. Omit it if you manage app startup yourself. Install Tailscale from its official macOS distribution and sign in first.

To enable message changes, rerun the installer with `--enable-writes`. Use `--read-only` to turn writes off again. The service restarts during this operation, so wait until current requests finish.

```sh
beeper-mcp-relay install --enable-writes --start-apps
```

The service binds to `127.0.0.1:23374`. Configuration is stored with owner-only permissions at `~/Library/Application Support/Beeper MCP Relay/config.json`. A per-user LaunchAgent starts it at login and restarts it on exit. After a reboot, macOS login is required. Keep Beeper signed in and the Mac awake, powered on and online. Setting display sleep is compatible with keeping the computer awake.

## Connect the remote gateway

1. Make the local service reachable through an authenticated HTTPS transport. The tested route uses Tailscale Funnel to forward HTTPS to `http://127.0.0.1:23374`. The relay's bearer secret remains required even when Funnel is public. Read [deployment instructions](docs/deployment.md) before changing an existing Funnel route.
2. Deploy the bundled MCP gateway using either the owner-private ChatGPT Sites adapter or the standalone bearer adapter. Configure its agent URL and secret in the hosting platform's secret store.
3. Generate a distinct Ed25519 signing key and configure it on the gateway. The gateway exposes public verification metadata and signs successful tool responses and errors.
4. Connect your MCP host to the gateway's `/mcp` endpoint. Test `get_accounts` before trying conversation access or changes.

The ChatGPT Sites route handles ChatGPT authentication and provisions its plugin. Standalone bearer mode works with hosts supporting a configured Authorization header. It does not implement an OAuth authorization server. See [deployment and authentication](docs/deployment.md).

## Development and packaging

```sh
git clone https://github.com/jardenberg/beeper-mcp-relay.git
cd beeper-mcp-relay
npm ci
npm run check
npm pack
```

The package has no install hooks. Installing it alone does not start a service or access your messages. `install` is the explicit service installation command.

`npm run build` bundles the cloud Worker and generates its runtime version from `package.json`. `npm run check` tests protocol behavior, authentication, command validation, process lifecycle and signatures, then audits the package contents.

## Updates and removal

Install a newer release package and rerun `beeper-mcp-relay install` using your chosen options. Existing secrets are retained. The installer preserves previous release directories and backs up the private configuration and launch pointer. Gateway updates are deployed separately. See [operations and recovery](docs/operations.md).

```sh
beeper-mcp-relay uninstall
```

Uninstall removes this package's login jobs. Configuration, logs and recovery versions remain available for your review and recovery.

## Limits

- Text messaging operations are supported. Attachment upload/download and desktop focus are outside the current tool catalog.
- One CLI operation runs at a time. Busy requests fail explicitly. Check delivery before retrying a timed-out change.
- A signature proves the server's signed representation, not message truth or sender identity. See [verification](docs/verification.md) and [security](SECURITY.md).
- This first public package uses CLI/setup steps and best-effort community support.

MIT licensed. See [changelog](CHANGELOG.md), [contribution guidance](CONTRIBUTING.md), and [release evidence](docs/release-1.1.0.md).