Summary
When more than one mailbox or provider is already configured, email-agent-mcp configure should present an interactive picker rather than requiring the user to remember exact provider names and mailbox aliases on the command line.
Current behavior
Today, the CLI requires the user to know:
- Which provider flag to pass (
--provider microsoft or --provider gmail)
- Which
--mailbox alias they previously used (defaults to default)
If the user runs npx email-agent-mcp configure with no flags, it silently defaults to --provider microsoft (see runConfigure in packages/email-mcp/src/cli.ts:857). For users who set up Gmail months ago, this means typing the wrong command and reauthenticating the wrong account, or hitting trial-and-error until the right combination works.
Desired behavior
If configure is run interactively (TTY) and there is more than one mailbox already configured, present a picker that lists them by:
- email address (the human-meaningful identifier)
- provider (
microsoft / gmail)
- mailbox alias (the existing CLI key)
- last-authenticated timestamp (so the user can see which one is stale)
Example (illustrative — exact UX is up to the implementer):
? Which mailbox do you want to (re)authenticate?
1) steven@usejunior.com microsoft alias: work last auth: 2026-01-12
2) steven.obiajulu@gmail.com gmail alias: personal last auth: 2025-11-03
3) [add a new mailbox]
Selecting an existing mailbox should run the reauth flow for that exact provider + alias combination. Selecting "add new" should fall through to the existing wizard flow.
Notes
- The smart-default wizard in
cli.ts already runs a runWizardMenu when there are existing mailboxes and the user runs npx email-agent-mcp with no command. That wizard could be extended to handle the configure command too, or the picker logic could be lifted into a shared helper.
- For non-TTY callers (CI, MCP host startup), keep the existing flag-driven behavior — the picker should only activate in TTY mode.
- This is a small change but it removes a meaningful papercut for users who don't touch the CLI weekly.
Why this matters
Users who reauthenticate weeks or months after initial setup have to remember exact provider and alias names to pick the right mailbox. A picker removes that memorization burden and eliminates a class of "I reauthed the wrong account" mistakes.
Summary
When more than one mailbox or provider is already configured,
email-agent-mcp configureshould present an interactive picker rather than requiring the user to remember exact provider names and mailbox aliases on the command line.Current behavior
Today, the CLI requires the user to know:
--provider microsoftor--provider gmail)--mailboxalias they previously used (defaults todefault)If the user runs
npx email-agent-mcp configurewith no flags, it silently defaults to--provider microsoft(seerunConfigureinpackages/email-mcp/src/cli.ts:857). For users who set up Gmail months ago, this means typing the wrong command and reauthenticating the wrong account, or hitting trial-and-error until the right combination works.Desired behavior
If
configureis run interactively (TTY) and there is more than one mailbox already configured, present a picker that lists them by:microsoft/gmail)Example (illustrative — exact UX is up to the implementer):
Selecting an existing mailbox should run the reauth flow for that exact provider + alias combination. Selecting "add new" should fall through to the existing wizard flow.
Notes
cli.tsalready runs arunWizardMenuwhen there are existing mailboxes and the user runsnpx email-agent-mcpwith no command. That wizard could be extended to handle theconfigurecommand too, or the picker logic could be lifted into a shared helper.Why this matters
Users who reauthenticate weeks or months after initial setup have to remember exact provider and alias names to pick the right mailbox. A picker removes that memorization burden and eliminates a class of "I reauthed the wrong account" mistakes.