Skip to content

keithah/poke-beeper-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poke-beeper-proxy

Runs a local HTTP proxy that injects your Beeper auth token and keeps a poke tunnel alive so the Poke agent can reach Beeper MCP from anywhere. Runs as a macOS launchd service or Linux systemd user service that starts on login and survives crashes.

Once installed, Beeper tools appear automatically in your Poke agent — no manual MCP setup required.


How it works

Poke agent (internet)
       |
  poke tunnel
       |
  poke-beeper-proxy (localhost:23374)
  — injects Bearer token on every request
       |
  Beeper Desktop MCP (localhost:23373)

The proxy runs locally and adds your BEEPER_TOKEN to every request. The poke tunnel exposes the proxy so your Poke agent can reach it from anywhere. Once the tunnel connects, Beeper tools are automatically available in Poke.


macOS Setup

Prerequisites

  • macOS — launchd is required for service management
  • Node.js 18+ — verify with node --version
  • poke CLInpm install -g poke then poke login
  • Beeper Desktop — running with MCP enabled

NVM users: NVM-managed node paths may not resolve correctly inside launchd. Use Homebrew node (brew install node) for reliable service operation.

1. Clone and install

git clone https://github.com/keith/poke-beeper-proxy
cd poke-beeper-proxy
npm install

2. Authenticate poke

poke login

3. Install as a service

npm run install-service

The script prompts for your BEEPER_TOKEN, stores it in macOS Keychain, writes ~/Library/LaunchAgents/com.poke-beeper-proxy.plist, and starts the service immediately.

Getting your BEEPER_TOKEN

Open Beeper Desktop → Settings → MCP. Your token is listed there.

4. Verify

launchctl list com.poke-beeper-proxy   # PID in first column = running
tail -f ~/Library/Logs/poke-beeper-proxy.log

Expected log on healthy start:

2026-02-17T18:00:00.123Z INFO  [auth] BEEPER_TOKEN loaded from Keychain
2026-02-17T18:00:00.145Z INFO  [main] poke-beeper-proxy starting up
2026-02-17T18:00:00.167Z INFO  [tunnel] Starting poke tunnel → http://localhost:23374/v0/mcp (name: Beeper)
2026-02-17T18:00:00.189Z INFO  [proxy] Listening on http://127.0.0.1:23374

Uninstall (macOS)

npm run uninstall-service

Removes the plist, unloads the service, and deletes the Keychain entry.


Linux Setup

Prerequisites

  • Node.js 18+ — via your package manager or nvm
  • systemd with a user session active
  • poke CLInpm install -g poke then poke login
  • Beeper Desktop — running with MCP enabled

NVM users: NVM shims may not resolve in the systemd environment. If the service fails with "node: command not found", use a system Node.js install.

1. Clone and install

git clone https://github.com/keith/poke-beeper-proxy
cd poke-beeper-proxy
npm install

2. Authenticate poke

poke login

3. Install as a service

npm run install-service

The script prompts for your BEEPER_TOKEN, stores it in ~/.config/poke-beeper-proxy/token (chmod 600), writes a systemd user unit file, and starts the service.

4. Verify

systemctl --user status poke-beeper-proxy
journalctl --user -u poke-beeper-proxy -f

Uninstall (Linux)

npm run uninstall-service

Disables and stops the service, removes the unit file, and deletes the token file.

Running on login (headless / no desktop session)

By default, systemd user services only run while you're logged in. To start on boot regardless:

loginctl enable-linger $USER

Dev mode

Runs in the foreground with colorized terminal output. Reads BEEPER_TOKEN from environment or .env:

BEEPER_TOKEN=your_token npm start

Troubleshooting

Service not starting

macOS:

launchctl list com.poke-beeper-proxy   # second column = exit code
cat ~/Library/Logs/poke-beeper-proxy.log

Linux:

systemctl --user status poke-beeper-proxy
journalctl --user -u poke-beeper-proxy -n 50

Port already in use

The install script auto-selects the next free port if 23374 is occupied. To check what's using it:

lsof -i :23374

"poke: command not found" in logs

The service needs poke on its PATH.

macOS: The plist PATH includes /opt/homebrew/bin. Reinstall to regenerate:

npm run uninstall-service && npm run install-service

Linux: Edit the unit file to add your poke location:

systemctl --user edit poke-beeper-proxy

Add under [Service]:

Environment=PATH=/your/poke/bin:/usr/local/bin:/usr/bin:/bin

Then: systemctl --user daemon-reload && systemctl --user restart poke-beeper-proxy

Keychain dialog on first start (macOS)

macOS may show: "node wants to access Keychain item poke-beeper-proxy". Click Always Allow.

BEEPER_TOKEN not found

macOS — verify Keychain entry:

security find-generic-password -s poke-beeper-proxy -a beeper-token

Linux — verify token file:

ls -la ~/.config/poke-beeper-proxy/token   # should show -rw-------
cat ~/.config/poke-beeper-proxy/token

If missing, reinstall:

npm run uninstall-service && npm run install-service

Tools not appearing in Poke

  1. Verify the service is running
  2. Check logs for sync errors
  3. Verify Beeper Desktop is running with MCP enabled
  4. Verify your token is valid:
# macOS
curl -H "Authorization: Bearer $(security find-generic-password -s poke-beeper-proxy -a beeper-token -w)" http://localhost:23373/v1/accounts

# Linux
curl -H "Authorization: Bearer $(cat ~/.config/poke-beeper-proxy/token)" http://localhost:23373/v1/accounts

A valid token returns account data; an invalid token returns 401.

Tunnel keeps restarting

Verify poke is logged in:

cat ~/.config/poke/credentials.json

If missing, run poke login then restart:

# macOS
launchctl kickstart -k gui/$(id -u)/com.poke-beeper-proxy

# Linux
systemctl --user restart poke-beeper-proxy

After upgrading Node.js

Reinstall to update the embedded node path:

npm run uninstall-service && npm run install-service

Manual reload

macOS:

launchctl unload ~/Library/LaunchAgents/com.poke-beeper-proxy.plist
launchctl load -w ~/Library/LaunchAgents/com.poke-beeper-proxy.plist

Linux:

systemctl --user daemon-reload
systemctl --user restart poke-beeper-proxy

View all recent logs (including rotated)

macOS:

cat ~/Library/Logs/poke-beeper-proxy.log.1 ~/Library/Logs/poke-beeper-proxy.log

Linux:

journalctl --user -u poke-beeper-proxy --since "1 hour ago"
# or from log file:
cat ~/.local/share/poke-beeper-proxy/poke-beeper-proxy.log

About

macOS daemon that keeps a poke tunnel to Beeper MCP alive — HTTP auth proxy + launchd service

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors