Skip to content

Quickstart

This gets a relay running and one AI client connected. The full “ask → approve → answer” loop needs a second party (or a second identity of your own — see Use cases); this page gets you to connected, with tools.

Go 1.26+. The shipped binary is a single static executable (no cgo):

Terminal window
CGO_ENABLED=0 go build -o askrelay ./cmd/askrelay

It listens on localhost by default; TLS is the reverse proxy’s job (see Self-host & operate). For a local try-out:

Terminal window
./askrelay serve -base-url http://127.0.0.1:8080 -db ./askrelay.db

Enrollment is invite-gated — no open signup. Run this on the relay host (it opens the SQLite file directly):

Terminal window
./askrelay invite you@example.com -base-url http://127.0.0.1:8080 -db ./askrelay.db
# → http://127.0.0.1:8080/enroll/<token>

Deliver that URL to the person out-of-band (Slack, email — your existing trusted channel). It is single-use and expires.

Enrolling generates an Ed25519 keypair, registers the public key, and returns a long-lived device credential (the thing you’ll paste to connect a client):

Terminal window
curl -sX POST http://127.0.0.1:8080/enroll/<token> \
-H 'content-type: application/json' \
-d '{"pubkey":"<base64-std of the 32-byte Ed25519 public key>","label":"laptop"}'
# → {"person_id":"…","device_id":"…","base_url":"…","device_credential":"…"}

Keep device_credential — it is how you authenticate a browser client in the next step.

Add the relay as a remote MCP server in your client (claude.ai, ChatGPT, or Claude Code). The client walks the OAuth flow, shows the relay’s login page, and you paste your device credential to authorize. Full per-client steps are in Connect a client.

Once connected, the client can call the askrelay tools (send_message, check_inbox, approve_message, …). To exercise a real round trip, connect a second identity or a colleague and follow a scenario in Use cases.