Local Server With ngrok
Web-hosted MCP clients such as ChatGPT connectors and Claude custom connectors connect from cloud infrastructure, so localhost URLs do not work there. Use ngrok or an equivalent tunnel to run AIProfile on your desktop while exposing a public HTTPS endpoint.
For a full visual Claude walkthrough, see Claude: npm person profile.
Start AIProfile:
npm run build
npm startIn another terminal:
ngrok http 3000ngrok prints a public HTTPS forwarding URL, for example:
https://abc123.ngrok-free.app -> http://localhost:3000Configure AIProfile:
auth:
mode: local
anonymous_enabled: true
issuer: https://abc123.ngrok-free.app
resource: https://abc123.ngrok-free.app/mcpStop AIProfile after changing config.yaml and keep it stopped while you create the grant. With encrypted memory, the server loads the local database at startup, so the grant should exist before the server restarts.
Create a grant bound to the public MCP URL:
npm run auth -- grant add \
--subject chatgpt-owner \
--preset owner-full \
--resource https://abc123.ngrok-free.app/mcp
npm run auth -- grant listRestart AIProfile:
npm startUse this MCP URL in the remote client:
https://abc123.ngrok-free.app/mcpThe client discovers OAuth metadata and opens the AIProfile authorization page. Enter the printed one-time approval code.
Security notes:
- Stop AIProfile, create a new grant, and restart AIProfile whenever the tunnel URL changes.
- Keep public tunnels open only while needed.
- Prefer narrow presets such as
public-readfor testing. - Revoke grants when testing is done.
- Never expose
auth.mode: offthrough a public tunnel.