@sr-labs/agentmail-ui
v0.3.1
Published
Localhost proxy that adds a bearer token so an MCP Agent Mail web UI can be browsed without exposing the token.
Readme
@sr-labs/agentmail-ui
agentmail-ui --url <server> serves an MCP Agent Mail
web UI on http://localhost:8766, adding Authorization: Bearer $AGENTMAIL_TOKEN to every request. Browsers
can't send that header themselves, and passing the token as ?token= leaves it in history and drops it on
plain links. The proxy keeps the token out of the browser entirely.
echo 'AGENTMAIL_TOKEN=<token>' >> .env # keep .env gitignored
agentmail-ui --url https://agentmail.example.com # or: devkit agentmail --url ...
# open http://localhost:8766/mail| Flag | Env | Default | Meaning |
| ------------ | ----------------- | ------- | --------------------------------------------- |
| --url | AGENTMAIL_URL | - | Agent Mail server origin (required) |
| --port | AGENTMAIL_PORT | 8766 | Local port |
| --path | - | /mail | Start page printed on launch |
| --env-file | - | .env | Env file loaded if present (does not override the environment) |
| - | AGENTMAIL_TOKEN | - | Bearer token (required; env only, never a flag, to keep it out of shell history) |
The server binds to 127.0.0.1 only: anyone who can reach the proxy gets the token's access. Redirects to the
upstream origin are rewritten to stay on the proxy. createProxy({ upstream, token }) is exported for embedding.
See the devkit README.
Not using the umbrella package? npx @sr-labs/devkit setup agentmail walks you through setting this one up.
