Proton Mail¶
Give a workspace read and send access to Proton Mail through a host-side MCP server. The server connects directly to local Proton Mail Bridge IMAP and SMTP listeners and never gives a workspace the Bridge app password.
Prerequisites¶
- Proton Mail Bridge is running on the Pynchy host with its IMAP and SMTP listeners bound to
127.0.0.1. Bridge defaults to ports1143(IMAP) and1025(SMTP). - The Bridge account's app password is available to a host-local command. The command must print only the password to stdout and must be readable only by the Pynchy host user. Do not put the password in
pynchy.toml, source control, or a workspace environment.
Bridge's app password is separate from the Proton account password. On macOS, use a Keychain-backed command after explicitly authorizing the command in the logged-in graphical session. On Linux, use the host's secret service or another host-local secret manager. Pynchy executes the configured command as argv, not through a shell.
Configuration¶
Configure the direct Bridge identity and password command in the host-only MCP configuration, then select the tool in a profile:
[tools.proton-mail]
type = "mcp"
public_source = true
secret_data = true
public_sink = true
dangerous_writes = true
[tools.proton-mail.mcp]
runtime = "script"
command = "uv"
args = ["run", "python", "-m", "pynchy.plugins.integrations.proton_mail", "--port", "{port}"]
port = 8475
transport = "streamable_http"
env = {
PYNCHY_PROTON_BRIDGE_USERNAME = "[email protected]",
PYNCHY_PROTON_BRIDGE_PASSWORD_COMMAND = "/path/to/read-bridge-app-password",
# Set only when Bridge uses non-default ports.
PYNCHY_PROTON_BRIDGE_IMAP_PORT = "1143",
PYNCHY_PROTON_BRIDGE_SMTP_PORT = "1025"
}
[profiles.mail-research]
tools = ["proton-mail"]
[workspaces.mail-research]
profiles = ["mail-research"]
The password command is intentionally explicit: it lets the host use its existing secret store without passing a Bridge credential into agent containers or embedding it in the Pynchy configuration.
Available tools¶
proton_list_mailboxeslists mailboxes as{name, mailbox}.nameis for display; pass the returnedmailboxidentifier to the other tools, including for internationalized mailbox names.proton_list_maillists message metadata. It returns amessage_id, not an IMAP UID, because Proton Bridge UIDs are not stable across connections.proton_read_mailfetches bymessage_idand uses a readonly mailbox plusBODY.PEEK, so it does not alter the message's read/unread state.proton_send_mailsends a plain-text message from the Bridge identity. It acceptsto,subject, andbodyand returns the generatedmessage_id.proton_delete_mailpermanently removes a message bymessage_idfrom a selected mailbox.
Mail content arrives from outside the workspace and mail delivery can send data to external recipients. Pynchy therefore marks this tool as a public source, secret data, public sink, and dangerous write. Sending or deletion follows the normal human-approval flow; the Bridge credential remains on the host.