AI agents
Codex CLI
Add Glassmail to Codex with one command, then ask Codex about your mail.
Steps
- In Glassmail, open Settings › Agents and turn on Allow AI agents to read my mail.
- Click Set Up next to Codex CLI. Glassmail adds a
[mcp_servers.glassmail]section to~/.codex/config.toml, after backing the file up. - Start a new Codex session and ask about your mail.
Or in Terminal
codex mcp add glassmail -- /Applications/Glassmail.app/Contents/MacOS/Glassmail --mcp
Or add it to ~/.codex/config.toml yourself:
[mcp_servers.glassmail]
command = "/Applications/Glassmail.app/Contents/MacOS/Glassmail"
args = ["--mcp"]
What the agent can do
- Read: search every account, list unread mail, summarise a week or a month with the
overviewtool, read whole conversations, find attachments and read the text of PDFs, Word files and spreadsheets, list who emails you most, find dates and deadlines in your mail, and see what changed since it last looked. - Change, only if you allow it: archive, mark as read, star, snooze, and save a draft for you to send. These are off until you turn on Let AI agents make changes (always asks first) in Settings › Agents. Each request then opens a panel in Glassmail, “Claude wants to archive 14 conversations”, with the list and Allow, Deny or Allow for This Session. Every change is listed in Settings › Agents with Undo.
- Never: send an email or delete one. Glassmail has no tool for either.
What stays private
- Glassmail itself sends nothing anywhere. The agent reads your mail through Glassmail on your Mac.
- The mail an agent reads goes to that agent’s AI provider (Anthropic for Claude, OpenAI for Codex, and so on), under that provider’s privacy terms. Glassmail’s own built-in AI is different: it runs on your Mac and sends nothing.
- In Settings › Agents, under Hide from agents, you can hide whole accounts, folders and senders. Junk, Trash and Drafts are hidden from the start. Hidden mail never reaches an agent, not even in counts.
- Glassmail tells the agent that email content is untrusted and must never be followed as instructions, and marks where each email’s text starts and ends.
If it doesn’t work
Codex doesn’t list any Glassmail tools
- Start a new Codex session. Codex reads its MCP servers when a session starts.
- In Glassmail, open Settings › Agents and check that Allow AI agents to read my mail is on and that Codex says Connected.
- If Codex says Set up for another copy of Glassmail, Glassmail was moved or reinstalled. Click Update.
“Glassmail isn’t sharing mail right now”
Turn on Allow AI agents to read my mail in Glassmail › Settings › Agents.
“Glassmail isn’t open”
Reading works with Glassmail closed. Changing mail, downloading an email whose text hasn’t arrived yet, and reading an attachment need Glassmail open, because Glassmail does those, not the agent.
The agent can’t find mail you know is there
Check Hide from agents in Settings › Agents. Mail in a hidden account, folder or from a hidden sender is left out of every answer.
Still stuck? Write to hi@glassmail.app and a person replies, usually within a day. Never send us a password.