List Your Mail.app Email Accounts with AI on Mac
Let AI list every Mail.app account on your Mac by name, then read and search the right inbox. Runs 100% locally with LMCP — no API keys, no cloud.
The list_email_accounts tool lets your AI assistant see every email account configured in Mail.app on your Mac, by name. It is the natural starting point for any email workflow: before an AI can read or search a specific inbox, it needs to know which accounts exist. A typical prompt is simply: "Which email accounts do I have set up in Mail?" The AI calls list_email_accounts and returns names like iCloud, Gmail, or Work (Exchange) — exactly as they appear in Mail.app.
Once it knows the account names, the AI can target the right mailbox precisely instead of guessing. That's the whole point: discover first, then act with confidence. Download LMCP to get started in a couple of minutes.
Which AI agents work?
LMCP exposes 150+ tools, including list_email_accounts, to a wide range of AI clients:
- Desktop clients — Claude Desktop, Cursor, VS Code (GitHub Copilot), Windsurf and Zed auto-configure over a local stdio connection. No keys, no setup files to hand-edit.
- Web AIs — ChatGPT, Claude.ai (web), Grok and Perplexity connect through the LMCP Cloud Relay connector, which securely bridges the web client to the server running on your Mac.
Whichever agent you use, the email accounts never leave your machine — only the account names you ask about are surfaced to the assistant.
Automation
On its own, list_email_accounts is a read-only discovery call. Its real power is as the first link in a chain. A common flow looks like this:
- Call
list_email_accountsto get the account names. - Pass a name into
list_emails(account="Gmail")to pull recent messages from that specific inbox. - Follow up with
search_emails,read_email, orsend_emailscoped to the right account.
Because the account name is exact, multi-account users avoid the classic mistake of an AI reading the wrong inbox. You can say "summarize unread mail in my work account" and the assistant resolves the name first, then reads only that account.
Context
This tool works with your real Mail.app setup — the actual accounts you've configured on the Mac, not a sandbox or a demo dataset. The AI sees the same account list you see in Mail's sidebar, so its answers reflect your genuine email environment. That grounding is what makes the rest of the email workflow trustworthy: the assistant operates on live, real data rather than assumptions.
Productivity
If you juggle a personal iCloud account, a Gmail, and a work Exchange mailbox, telling an AI which one to use is friction. With list_email_accounts the assistant figures that out instantly. Instead of opening Mail, scanning the sidebar, and copy-pasting an account name, you just ask a question in plain English and the AI routes itself. For someone triaging mail across three or four accounts every morning, that saves minutes per session and removes the "wait, which inbox?" back-and-forth entirely.
Privacy & GDPR
Everything runs locally on your Mac. LMCP reads your Mail.app accounts directly through native macOS APIs — there is no cloud copy of your mailbox, no third-party server storing your account names, and no data retained anywhere outside your machine. The server is a native macOS app that you install and control. This local-first design makes LMCP GDPR-compliant by architecture: data that never leaves your device can't be mishandled in transit or at rest. For web AIs, the Cloud Relay only brokers the connection — your email contents stay on the Mac.