Agent setup guide

This page is written to be read by an AI agent, not just a human. If you are an agent trying to connect a user's mailbox to give them triage, follow it in order.

1. Add this MCP server

Use the public HTTPS MCP URL. If you are using a bearer API key, configure your agent against:

https://getinboxtriage.com/mcp
Authorization: Bearer <agent API key>

When your agent client supports Connect (OAuth 2.1), use Connect to attach the server. Do not make editing a local config file the primary path.

Local/stdio (same machine as a self-hosted server only):

node ${INSTALL_DIR}/src/mcp-server.js

2. Get the human subscribed

Call get_subscription to check the account's current plan, status, connected-inbox limit, sync window size, and whether send is available before assuming a state. Open https://getinboxtriage.com/pricing for the human to approve a plan (Pro, from $8/mo with 1 inbox included and +$2 per extra inbox up to 10, is the default recommendation).

3. Issue an agent API key

The human creates the key from Settings while signed in; an API key cannot create more keys. The key is shown once. Store it, and never ask the human to repeat it back to you in chat.

4. Connect each inbox

  1. Call propose_connection with the email address. It detects the provider: Google (gmail.com/Workspace), Microsoft (outlook.com/hotmail.com/live.com/Microsoft 365), iCloud (icloud.com/me.com/mac.com), or generic IMAP for any other domain. It returns sayToHuman (show that) plus agentOnly.next (run quietly; do not paste tool names or JSON into chat). If the human tells you a custom domain is hosted on Workspace or Microsoft 365, pass provider explicitly to add_inbox instead of letting it default to IMAP.
  2. Call add_inbox to register it (status: pending_credentials). Show only its sayToHuman. For a generic-IMAP inbox, imapHost is required (e.g. mail.example.com); imapPort defaults to 993 and imapUser defaults to the email address.
  3. Google: call start_google_oauth. Microsoft: call start_microsoft_oauth. iCloud or generic IMAP: call start_imap_secret_capture. All return a URL plus sayToHuman.
  4. Show only sayToHuman and the URL to the human, then stop. Do not paste raw tool JSON, tool names, or inboxIds. Do not ask them to paste back a password, app-specific password, or OAuth code. Poll get_connection_status if you need to know when they're done. If a previously-connected inbox starts failing to sync (credential expired or revoked), the same connect URL is also the repair flow. There is no separate "repair" tool.

5. Sync and triage

6. Attachments

7. When a limit trips

  1. Inbox count is the limit that bites: Pro covers 10 connected inboxes, the trial covers 1.
  2. Tell the human what is blocked and give them the pricing link. Do not ask for card details in chat.
  3. Attachments have no monthly allowance. A file over 50 MB is the only hard stop, and the mail app handles those.

8. Triage profile, VIPs, and coordination leases

Personal daily-triage preferences (cadence, what counts as junk, VIP people/domains, quiet hours) live on the server per account, with sparse per-inbox overrides, so every connected agent follows the same rules without relearning them each session. See get_triage_profile and update_triage_profile below. A short-lived per-inbox lease (begin_triage / heartbeat_triage / end_triage) keeps two agents from working on the same inbox at once during a pass that archives, labels, marks junk, or drafts in batches.

There is no setup wizard to send anyone to. When get_subscription or get_triage_profile shows triageSetup.completed: false, ask the human the questions yourself in chat (how often to check mail, what counts as junk, what to do with it, quiet hours), then call update_triage_profile with the answers and setupCompletedAt set to the current ISO timestamp. For VIPs, use add_vip as you learn who matters rather than asking for a list up front.

Do not request or relay a password, app-specific password, or OAuth authorization code through chat. Every credential path in this product is a link a human opens directly.