Filing mail, writing rules and sorting folders by hand is a chore. An AI agent such as Claude can do it for you: connect it to InCloseMail and it can read and search the mailboxes you choose, draft replies, translate mail written in other languages, and propose folders, rules and cleanups. You see every proposed change with the agent’s reason, and nothing changes until you click Apply. Undo puts it all back.
It works with Claude Desktop, Claude Code, Codex and any other AI app that uses the Model Context Protocol (MCP). InCloseMail never sends mail for an agent.
Turn it on
- Open File → Options → AI Agents.
- Check Let AI agents on this PC read my mail through InCloseMail.
- Under Mailboxes they may use, uncheck any mailbox the agent should stay out of: for example, an added account or a shared mailbox.
- Let them save drafts in Drafts for me to check and send is checked, so the agent can write drafts for you. Uncheck it if you don't want that.
- Click OK.
It’s off until you turn it on, and it works only while InCloseMail is open, only for you on this PC.
Connect your AI app
In the same place, InCloseMail gives you what your AI app needs. Either way, the app starts InCloseMail’s small agent bridge, which connects it to the InCloseMail you have open. InCloseMail keeps the bridge in your AppData folder, where updates don’t touch it, so your AI app stays connected while InCloseMail updates and picks up again when it starts.
Claude Code: one click
- Click Connect Claude Code. InCloseMail shows a short message, already filled in for your PC.
- Click Copy Message, paste it into Claude Code (the app or the terminal) and send it. Claude sets up the connection and checks that it works.
- Start a new session in Claude Code and ask it about your mail.
If you’d rather do it yourself, the message boils down to running this once in a terminal (your path may differ):
claude mcp add --scope user inclosemail -- "C:\Users\you\AppData\Local\InCloseMail\AgentBridge\InCloseMail.AgentBridge.exe" --mcp
Codex: one click
- Under Connect Codex, InCloseMail shows a short message, already filled in for your PC.
- Click Copy Message below it, paste it into Codex (the app, the terminal or the editor extension) and send it. Codex sets up the connection and checks it. It changes Codex’s settings, so Codex may ask you to approve the command.
- Start a new session in Codex and ask it about your mail. Typing
/mcpthere lists InCloseMail’s tools.
If you’d rather do it yourself, run this once in a terminal (your path may differ):
codex mcp add inclosemail -- "C:\Users\you\AppData\Local\InCloseMail\AgentBridge\InCloseMail.AgentBridge.exe" --mcp
Grok: one click
Grok connects through Grok Build, xAI’s own agent for the terminal. To install it, run irm https://x.ai/cli/install.ps1 | iex in PowerShell. It works with a pay-as-you-go API key from console.x.ai (set XAI_API_KEY) as well as with a Grok sign-in, so you don’t need SuperGrok or X Premium.
- Under Connect Grok, InCloseMail shows a short message, already filled in for your PC.
- Click Copy Message below it, paste it into Grok Build and send it. Grok sets up the connection and checks it with
grok mcp doctor inclosemail. It changes Grok’s settings, so Grok may ask you to approve the command. - Start a new session in Grok and ask it about your mail. Typing
/mcpsthere lists InCloseMail’s tools.
Grok Build on your PC is a session of its own: it doesn’t share memory or history with the Grok app, grok.com, X or Grok Bot. Grok Bot and Grok’s apps run on xAI’s computers, so they can’t reach InCloseMail on your PC. If you’d rather do it yourself, run this once in a terminal (your path may differ):
grok mcp add inclosemail -- "C:\Users\you\AppData\Local\InCloseMail\AgentBridge\InCloseMail.AgentBridge.exe" --mcp
Claude Desktop
- Click Copy Setup for Claude Desktop in InCloseMail. It puts the settings on the clipboard.
- In Claude Desktop, open Settings → Developer → Edit Config. This opens
claude_desktop_config.json. - Paste the settings in. If the file already has an
mcpServerssection, add theinclosemailentry to it rather than pasting a second one. - Save the file and restart Claude Desktop. InCloseMail then shows in its list of connectors.
The settings look like this (your path may differ):
{
"mcpServers": {
"inclosemail": {
"command": "C:\\Users\\you\\AppData\\Local\\InCloseMail\\AgentBridge\\InCloseMail.AgentBridge.exe",
"args": [ "--mcp" ]
}
}
}
Other AI apps
Any app that can start a local MCP server can use InCloseMail: give it the command InCloseMail.AgentBridge.exe (in %LOCALAPPDATA%\InCloseMail\AgentBridge) with the argument --mcp, as in the settings above.
What an agent can do
- Read: list your mailboxes and folders, list and search messages (as the search box does, with
from:,subject:and so on), and read a message or a whole conversation. Messages reach the agent as clean text, without the quoted earlier replies. - Read attachments, if you allowed it: text and CSV files, web pages, attached emails, Word, Excel and PowerPoint files, and .zip and .gz archives of those (an attached email comes with its own attachments, so a report forwarded inside an email reads through). A DMARC report starts with a short summary: who sent it, your domain’s policy, the dates, and each sending server’s results, the failing ones first, so “is anyone spoofing our domain?” gets a quick answer. Files that can run code are never opened, inside an archive either, and password-protected archives aren’t read.
- Find what’s still open: the conversations where someone wrote to you and you haven’t answered, and those where you wrote last and no one has answered you. See Catch up, reply and get ready.
- Spot cold email: people outside your company who wrote to you and whom you have never written to. See Block cold email.
- Read your rules: each rule in the order it runs, what it looks for and what it does.
- See how full a mailbox is: its size, its limits, how much is used and its 10 largest folders. See When your mailbox is full.
- Translate: show its translation of a message in InCloseMail, in place of the original. See Translate mail.
- Save drafts in Drafts, if you allowed it: new messages, or replies that stay in the conversation, as if you had clicked Reply or Reply All, with the original quoted below. A draft can be sent from one of your aliases, as the From box offers them (ask, for example, “from sales@”), or from a distribution list, Microsoft 365 group or shared mailbox in your organization’s directory, as with Other E-mail Address. Exchange checks that you have Send As rights on it when you send it. Looking up lists needs the Groups permission for that account once (File > Info > Permissions). An agent can change or take back its own drafts for 30 days, even after InCloseMail restarts, as long as you haven’t changed them. You check them and send them yourself. Never in a mailbox that is read-only in InCloseMail.
- Propose changes for you to approve. See below.
- Set color categories on mail right away, without a proposal, only if you check Let them set color categories on my mail right away, without asking me (off unless you turn it on). It doesn’t move, delete or send anything, and Undo (Ctrl+Z) takes it back. Useful for a job that runs while you’re away, such as marking each request Green or Red.
An agent can never send mail, and it can’t change anything on its own.
Catch up, reply and get ready
The agent reads the mail you let it see, so you can ask about it the way you’d ask an assistant. For example:
- “I was away all week. What needs me, and what can wait?”
- “Summarize the thread about the office move, and say who’s waiting on whom.”
- “Which emails from real people this month haven’t I answered?” or “Who still owes me an answer?”
- “Draft replies to those, in the tone I use in Sent Items.”
- “I’m meeting Lukas tomorrow. What did we last agree by email, and what’s still open?”
For “what haven’t I answered?” InCloseMail gives the agent the open conversations of the last few weeks (two by default, up to 90 days) from every folder, so mail your rules file away counts too, and so does a reply you sent from your phone. It leaves out mail from systems (noreply@ and alerts), mailings, meeting messages and automatic replies.
Drafts wait in Drafts, a reply in the conversation it answers: open one, check it, and send it yourself. The agent can’t send, and it only knows what’s in the mailboxes you checked (not your calendar).
Block cold email
Ask “Block cold email” or “Who’s pitching me that I’ve never talked to?” InCloseMail gives the agent the people outside your company who wrote to you in the last month (from every folder but Junk Email), leaving out anyone you have written to or have in your contacts or Auto-Complete list, and systems such as noreply@. The agent reads their mail and picks the sales pitches. It leaves out anyone who might be a real contact, and suggests unsubscribing from newsletters rather than blocking them.
To block them, it sends a proposal: a rule that moves their mail to Junk Email (or to a folder such as Cold email, if you’d rather look through it), run on your Inbox now. You check the senders and click Apply, and Undo takes it back.
Let it organize your mail
Ask the agent in your own words, for example:
- “Look at my Inbox and suggest folders and rules for the mail I get most.”
- “File everything from the GitHub and Slack status pages into their own folders, and make rules for new mail.”
- “Find newsletters I never open, unsubscribe me from them and clear them out.”
- “My rules have grown messy. Tidy them up.”
The agent looks first (your folders, rules and mail), then sends one proposal. It can propose:
- Folders: make, rename or move a folder; put a folder, with its mail and subfolders, in Deleted Items; or merge two folders (all the mail of one moves to the other, however much there is, and the emptied folder goes to Deleted Items). The proposal shows how many messages and subfolders go with each one. It won’t take away a folder a rule still files into unless that rule goes too, a folder already in Deleted Items, or folders Outlook keeps for itself, such as Sync Issues.
- Hidden folders: hide a folder in the folder pane (Sync Issues and RSS Feeds included), or show a hidden one again. Only InCloseMail’s folder pane changes; the folder and its mail stay in your mailbox. See Hide folders you never use.
- Rules: add a rule (who it’s from, words in the subject or body, who it was sent to, with exceptions; move it, mark it as read, categorize it or put it in Deleted Items), and run a new rule on mail already in a folder. Turn rules on or off, delete them, or change their order.
- Mail: move messages, mark them as read, or put them in Deleted Items (up to 500 messages per change; for more, it proposes a rule and runs it).
- Old and automated mail, however much there is: move a folder’s mail received before a date to another folder, or put it in Deleted Items; or put the mail in a folder that’s from certain senders or has certain words in the subject in Deleted Items (or another folder), older than a date if the agent says so. For example, “everything from noreply addresses in Akamai that’s over a year old”, while mail from people stays. The folder and the rest of its mail stay. The change shows how many messages match now, with a few of them, and InCloseMail finds them again when you click Apply.
- Unsubscribe from mailings, as the Unsubscribe button in the reading pane does: in one click in the background where the sender offers it, else by sending the sender’s unsubscribe email from your mailbox, else by opening their unsubscribe page in your browser for you to finish. The change lists each sender and which way it will go. Never for mail in Junk Email or with signs of phishing (unsubscribing there only tells a spammer your address is read), and unsubscribing can’t be undone.
- Signatures: add, change, rename or delete an email signature, or choose which one each account adds to new messages and to replies and forwards, as in Signatures and Stationery. The proposal shows the whole signature (for a change, as it reads now and as it will read, with where its links go), and it’s saved as the signature editor saves it, scripts left out. To turn it off, clear Let them read my signatures and propose new or changed ones in File > Options > AI Agents.
Review it
InCloseMail opens the proposal in the proposals window, with the agent’s summary at the top and a list of changes. Every proposal that’s still open has a tab there, in the order they came, so p1 is the first tab, then p2, p3; a new one adds a tab and doesn’t move you off the one you’re reading. Close (or Esc) closes the tab you’re on, and the window closes with the last tab. The window’s title says which proposal it is, what it’s about and when it came, for example p3 · File the GitHub status mail · 3:31 AM. Each change says what it does, in plain words, with the agent’s Why. For messages, it shows a few of their subjects.
- Every change starts checked. Uncheck any you don’t want. Select All and Clear All do them all.
- Apply makes the checked changes: folders first, then rules (in one save), then mail, and last the folders that are deleted or merged. If one doesn’t work, it says why in red under that change, and the rest still go ahead. A very large folder can take the server longer than one request allows: InCloseMail then checks whether it got to Deleted Items anyway, and tries again if it didn’t (“attempt 2 of 3”).
- After Apply, each change says what happened to it: Made, Partly made (with how far it got, such as how many messages a new rule moved before you canceled), Not made (and why), or, after Undo, Undone.
- Decline changes nothing. Before Apply, Cancel and closing the window do the same.
- If the mailbox is read-only in InCloseMail, Apply asks to allow changes first, as any change does.
- While Apply runs, it counts as it goes (“Reading the messages: 2,000 of 28,247”, then “4,200 of 28,247 messages moved”), so you can see it’s working. Cancel (or closing the window) stops it after the step it’s on. The window stays open and says what was made and what wasn’t, and Undo puts back what was made.
- The agent is told what happened (applied, partly applied, failed, canceled, declined or undone), with how far a long job has got and, for each change that didn’t work, why, so it can explain and suggest a fix.
- When an agent sends several proposals, they’re steps, applied in the order they came: each tab says Step 2 of 3 from Claude Code, and a later one’s Apply waits until the ones before it are applied or declined. An agent can also say that a proposal needs another one applied first, or ask you to do something first that InCloseMail can’t check (“Before you apply, Claude Code says: after Deleted Items is emptied”).
- If you ask the agent for something different while a proposal is still open, it sends a revised one that takes the old one’s place in the same window, marked Updated proposal (replaces p1). It can also withdraw a proposal that’s still open: the window closes, and the status bar says why. A proposal you’ve applied or declined stays as it is.
- All the window’s text can be selected and copied: Ctrl+C copies what you selected, or the whole proposal when nothing is selected. Right-click the text → Copy All copies the whole proposal, each change with its details, its Why and what happened to it.
You can keep working in InCloseMail while the window is open. If you’re in another app when a proposal comes (a game, a video), the proposals window opens behind that app without taking the focus, and it’s there when you come back to InCloseMail.
When your mailbox is full
A mailbox at its size limit refuses to take mail into its folders, so moves and rules that file mail fail (Exchange’s words: “exceeded its storage quota”). The agent can see how full your mailbox is and which folders are largest, and puts the changes that free space first when it’s nearly full.
- Apply checks the mailbox’s size first. If it’s full, nothing starts: the window says so, for example “This mailbox is full (52.1 GB of 49.5 GB). Moving mail may fail. Empty Deleted Items or remove large folders first.” Click Apply anyway to go ahead (deleting mail still works), or Cancel to decline it and free some space first.
- When it’s nearly full, the window says so and Apply goes ahead.
- A change that fails says why in plain words under it, with what to do next. If Outlook showed Rules in Error at the same time, the window explains that too: it’s the same problem.
- The size limit comes from Exchange when it gives one, else from File → Options → Mail → Mailbox size, else from your Microsoft 365 plan.
Undo
After Apply, Undo puts things back as they were:
- the rules it touched go back to how they were, and new rules are removed;
- moved messages go back to their folders, and messages it marked as read are unread again;
- new folders go to Deleted Items, if they’re still empty;
- deleted folders come back from Deleted Items to where they were, with their own names, and merged mail goes back to its folder.
One exception: when a new rule does more than move or delete mail by sender or subject, InCloseMail runs it as Run Rules Now does, and Undo can’t bring that mail back. The window says so after Apply.
Unsubscribing can’t be taken back: Undo leaves it as it is, and the window says so.
Nothing is ever deleted for good: mail goes to Deleted Items, which you empty yourself.
Clean up your whole account
InCloseMail has tools for tidying by hand: Clean Up My Inbox, the Rules Wizard and Start over with your rules. They still work, but you don’t need them. With an agent connected, you can describe the account you want in a few sentences and let it do the whole job: it reads your folders, rules and mail, works out a plan, and proposes the changes. You only check and apply them.
Why this works well:
- It sees the whole account at once. It notices that three folders hold the same company’s mail, that a rule files into a folder you renamed, or that half your Inbox is status alerts.
- You say what you want, not how. “Keep anything from real people, file the rest by company” is enough. The agent turns it into folders, rules and moves.
- Nothing changes until you say so. Each step is a proposal with a reason on every change, and Undo puts it back.
Tell it what you want
The more the agent knows about how you work, the better its plan. A good request says what you want to end up with, what matters to you, and what to leave alone. For example:
“Clean up my whole mailbox. I want a short Inbox with only mail from real people and things I have to act on. File everything else into folders by company, under one Companies folder. Status pages and alerts (GitHub, Slack, Atlassian) go in their own folders and are marked as read. Newsletters I haven’t opened in a year can go to Deleted Items. Tidy my rules too: merge the ones that do the same thing and remove ones that file into folders I no longer use. Don’t touch my Clients folder or anything from my accountant. Tell me your plan before you propose anything.”
Shorter requests work too:
- “I want to start cleaning up and organizing my you@example.com email account in InCloseMail.”
- “Look at my whole account and tell me what you’d clean up. Don’t change anything yet.”
- “I have 20 years of mail in my Inbox. Sort it into a sensible set of folders, with rules so it stays that way.”
- “My folders are a mess. Suggest a simpler structure and move things into it.”
- “Find rules that never match anything or file into folders I don’t use, and remove them.”
- “Check what landed in my Inbox this month and suggest rules for anything that keeps coming.”
How it goes
- Ask for the plan first. The agent looks through your folders, rules and mail and tells you what it found and what it would do. Talk it over and change anything you don’t like before it proposes a thing.
- Go a step at a time. A big account takes a few proposals: for example, folders first, then rules, then the old mail. Each proposal holds up to 100 changes; each change moves up to 500 messages it names, and for more the agent proposes a change InCloseMail finds the messages for (by date, sender or subject), runs a rule on the folder, or merges the whole folder into another.
- Check each proposal in the AI Agent Proposal window, uncheck anything you don’t want, and click Apply. The agent is told what you applied, so it can continue with the next step.
- Look at the result in InCloseMail. If a step went wrong, click Undo in its window, or tell the agent what to change.
- Empty Deleted Items yourself when you’re happy. Until then nothing is gone.
Afterward, your rules keep new mail where it belongs, as they always have; the agent only wrote them for you. Every month or so, ask it to look again.
Good to know
- What it reads goes to your AI app’s provider. A whole-account cleanup means the agent reads a lot of your mail. If you’d rather it didn’t read the messages themselves, ask it to work from senders and subjects only, and uncheck any mailbox it shouldn’t see. See Your privacy.
- It can’t empty Deleted Items. Folders it deletes go there, like mail, and stay until you empty it. Undo brings them back until then.
- It changes a rule by replacing it: a new rule in its place, and the old one deleted. Both show in the proposal.
- Mail filed by a new rule run on a folder can’t always be undone (see Undo). For a large cleanup, ask the agent to say which changes those are.
Translate mail
Got a message in a language you don’t read? Select it in InCloseMail and ask the agent, for example:
- “Translate the email I have open.”
- “Translate the latest message from Lukas into English.”
The agent reads the message, translates it, and InCloseMail shows the translation in place of the original, in the Reading Pane and in the message’s own window, subject included. A bar above it says who translated it and from what language. Click Show original to see the message as it came, and Show translation to go back.
Nothing in your mailbox changes: the translation is only on your screen, and it lasts until you close InCloseMail. The agent translates into your language unless you ask for another. To reply in the sender’s language, ask it to draft the reply.
Your privacy
- Only the mailboxes you checked, only while InCloseMail is open, and only AI apps running on this PC as you.
- What you let the agent read goes to that AI app, and from there to its provider (Anthropic, for Claude), under the app’s own terms. InCloseMail sends nothing anywhere else.
- Open Log (next to Copy Setup for Claude Desktop) shows what agents asked for and when: which tool and which mailbox, never what the mail says. At 5 MB it starts over; the one before is kept as ai-agents.1.log in the same folder.
- Uncheck the AI agents box to cut every agent off at once.
Without connecting an app
To use a chatbot in your browser instead, give it text yourself:
- Right-click a message → AI → Copy for AI copies the whole conversation as clean text (who wrote what and when, without the quoted repeats), to paste into ChatGPT, Claude or any other AI.
- Right-click messages → AI → Export for AI saves the selected messages in full as one Markdown file.
- Right-click a folder → Export → Export Folder for AI saves its newest messages (up to 500) the same way.
For administrators
To keep AI agents off for everyone, use the Turn off AI agents policy (registry value DisableAiAgents, 1, under SOFTWARE\Policies\InCloseMail) in InCloseMail’s Group Policy and Intune templates. File → Options then says your organization has turned them off. Copy for AI and Export for AI stay, as they only make text the person chooses to paste or save. See For administrators.
If it doesn’t work
- The agent says InCloseMail isn’t running, or AI agents are off: open InCloseMail, check the box in File → Options → AI Agents, and ask again.
- InCloseMail doesn’t show in Claude Desktop: check the config file is valid JSON (one
mcpServerssection, commas between entries), then restart Claude Desktop completely (from the tray icon too). - Claude Code doesn’t see InCloseMail: start a new Claude Code session after connecting (a session that was already open doesn’t pick it up). Running
claude mcp get inclosemailin a terminal shows whether it’s set up and connected; if not, click Connect Claude Code again and send the message once more. - Codex doesn’t see InCloseMail: start a new Codex session after connecting, then type
/mcpto see whether InCloseMail’s tools are there. Runningcodex mcp get inclosemailin a terminal shows whether it’s set up; if not, copy the Codex message again and send it once more. - Grok doesn’t see InCloseMail: start a new Grok session after connecting, then type
/mcpsto see whether InCloseMail’s tools are there. Runninggrok mcp doctor inclosemailin a terminal shows whether it’s set up and connected; if not, copy the Grok message again and send it once more. - A mailbox is missing: it’s unchecked under Mailboxes they may use, or isn’t open in InCloseMail.
- Drafts aren’t saved: select the drafts box, and check the mailbox isn’t read-only.
- During an update your AI app stays connected, and InCloseMail answers again as soon as it’s back. If you set up your AI app before the agent bridge came (its setup names
Program Files\InCloseMail\InCloseMail.exe), an update ends its connection: click Connect Claude Code again (or copy the new setup) once, and it stays connected from then on.