List Mail.app Email Accounts with AI on Mac
Let your AI assistant list every email account configured in Mail.app on your Mac. Local, private, no API keys. Works with Claude, ChatGPT, Cursor and more.
The list_accounts tool lets your AI assistant read the list of email accounts you have set up in Apple Mail. It connects directly to Mail.app on your Mac and returns the accounts it finds — for example iCloud, Gmail, Outlook, or a work IMAP account. You simply ask in plain language: "Which email accounts do I have configured in Mail?" and the assistant answers with the real list from your machine.
This is the natural starting point for almost any email workflow. Before an AI can search, read, or send mail on your behalf, it needs to know which mailboxes exist. list_accounts gives it that map instantly. Download LMCP to get started — it is a free, native macOS MCP server with 150+ tools.
Which AI agents work?
LMCP works with every major AI assistant. Desktop clients configure automatically over a local stdio connection, while web-based AIs connect through the LMCP Cloud Relay connector.
- Desktop (auto-configured via local stdio): Claude Desktop, Cursor, VS Code (GitHub Copilot), Windsurf, and Zed.
- Web (via LMCP Cloud Relay connector): ChatGPT, Claude.ai, Grok, and Perplexity.
Whichever you use, the tool runs the same way: locally on your Mac, against your actual Mail.app data.
Automation
On its own, list_accounts is read-only and lightweight, but it shines as the first link in a chain. A typical sequence:
- Call
list_accountsto discover the iCloud and Gmail mailboxes. - Run
list_emailsorsearch_emailsscoped to a specific account from that list. - Feed the results into
read_email, thenreply_emailor create a follow-up with the Reminders or Calendar tools.
Because the AI knows the exact account names, it can route each step to the right mailbox instead of guessing — no more searching your personal inbox when you meant your work one.
Context
The whole point of LMCP is that the assistant works with your real data, not a generic template. list_accounts returns the accounts you actually have, in the order Mail.app stores them. If you add a new work account next week, the AI sees it next time it asks. There is nothing to sync, import, or paste — the source of truth is Mail.app itself, live on your Mac.
Productivity
Manually, checking which accounts are configured means opening Mail, going to Settings, and clicking through the Accounts pane. With LMCP the assistant does it in a single prompt and immediately moves on to the useful work: "Summarize unread mail from my Gmail account" or "Find the invoice from my work account last month." Over a busy week of triaging mail across two or three mailboxes, skipping that manual navigation on every request adds up to real saved minutes — and keeps the AI from acting on the wrong account.
Privacy & GDPR
Everything runs locally on your Mac. list_accounts reads Mail.app directly through macOS, and the account names never leave your machine — there is no cloud copy, no server-side storage, and no API keys handed to a third party. This is privacy by architecture, not policy. Read more about how this makes LMCP GDPR-compliant by architecture.