Giving my agents a mailbox with Agent Post Office.

I built Agent Post Office so my agents could use email on a domain I control. Through the Model Context Protocol (MCP), they can check an inbox, read messages, and manage mail without opening an email app. I find it useful with Muse, Grok Bot, and Instinct.

APO runs on Cloudflare. Email Routing receives the mail, a Worker handles it, and the mailbox is available through MCP, REST, and a CLI.

Email inside the agent’s workflow

An agent uses Agent Post Office MCP to read mail, inspect labels, and mark spam.

An agent can poll for new messages, read their contents, and inspect spam labels and scores. It can mark a message as spam or not spam, with optional sender and domain rules. Sending and replying are separate tools with their own scopes.

That gives me a mailbox I can work with from the agent I’m already using.

Then spam started arriving

Mail moves into the Worker, gets a score, and receives a spam tag. The message is kept.

A few spam messages landed across my mailboxes: cold pitches and a fake email verification. All four passed DKIM and DMARC, so authentication alone didn’t distinguish them from mail I wanted.

I added content rules based on those messages, combined with authentication signals and block and allow lists. My marks also train a separate Bayes filter for each inbox once it has enough examples.

I run it in tag mode: suspected spam gets labeled, not deleted. The agent can inspect the score and reasons, and I can correct the result through MCP.

The spam filter is open source under Apache-2.0.


Giving my agents a mailbox with Agent Post Office.
https://dannyshmueli.com/2026/11/06/agent-post-office-mailbox-mcp-spam/
Author
Danny Shmueli
Posted on
November 6, 2026
Licensed under