Perplexity Computer connects as a remote MCP client, so GBrain must be served
over HTTP and reachable at a public HTTPS URL. Perplexity does not run
gbrain serve (stdio) the way Claude Code does — it needs a reachable endpoint:
Perplexity Computer
→ ngrok tunnel (https://YOUR-DOMAIN.ngrok.app/mcp)
→ gbrain serve --http (built-in OAuth 2.1 transport)
→ Postgres / PGLite
gbrain serve --http --port 3131 --bind 0.0.0.0 \
--public-url https://YOUR-DOMAIN.ngrok.app--bind 0.0.0.0is required. Since v0.34,--httpdefaults to127.0.0.1, so without it the tunnel reaches the server but the connection is refused (ECONNREFUSED).--public-urlmust match the tunnel. The OAuth issuer in the discovery metadata has to line up with the URL Perplexity actually hits (RFC 8414 §3.3), or OAuth client-credentials auth fails.
ngrok http 3131 --url YOUR-DOMAIN.ngrok.appSee the ngrok-tunnel recipe for a persistent tunnel.
Two supported auth paths.
OAuth 2.1 client credentials (recommended, v0.26.0+). Perplexity is a cloud service, so it holds whatever credential you give it. OAuth is the correct choice: least-privilege scopes + short-lived rotating access tokens instead of a long-lived full-access secret. Mint a client and print the connector fields in one step (on the brain host):
gbrain connect https://YOUR-DOMAIN.ngrok.app/mcp --agent perplexity --oauth --registerOr register separately and pass the creds (works anywhere, no DB needed):
gbrain auth register-client perplexity --grant-types client_credentials --scopes "read write"
gbrain connect https://YOUR-DOMAIN.ngrok.app/mcp --agent perplexity --oauth \
--client-id gbrain_cl_xxx --client-secret gbrain_cs_xxxconnect --oauth prints the Issuer URL + Client ID + Client Secret to paste
in step 4.
Legacy bearer token (simplest, best for local/personal):
gbrain auth create "perplexity"
gbrain connect https://YOUR-DOMAIN.ngrok.app/mcp --token gbrain_xxx --agent perplexity(Perplexity is a GUI connector, so there's no --install — connect prints the
exact values to paste in step 4.)
- Open Perplexity (requires Pro subscription).
- Go to Settings → Connectors (or MCP Servers).
- Add a new remote connector:
- URL:
https://YOUR-DOMAIN.ngrok.app/mcp - Authentication: API Key / Bearer Token, or OAuth client credentials
- Paste the token (bearer) or
client_id+client_secret(OAuth).
- URL:
- Save.
In a Perplexity conversation, ask it to use your brain:
Use my GBrain to search for [topic]
Have it call get_brain_identity (whose brain this is), then list_skills
(everything it can do).
- Perplexity Computer is available to Pro subscribers; both the Mac app and web version support remote MCP connectors.
- The Mac app can also use a local MCP server (
gbrain servestdio) if you'd rather not expose an HTTP endpoint. - A
gbrain auth createtoken is a long-lived, full-access secret. Keep it private and prefer a scoped token where possible.