
lucasmaffei/mailgrant
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Self-hosted email MCP server and IMAP/SMTP gateway for AI agents: one token per agent with its own mailboxes and scopes, an audit log, and a passkey webmail PWA.
개요
The self-hosted email gateway for AI agents. Each agent gets its own token, its own mailboxes and its own permissions. The mailbox passwords stay with you. English · Português · Español · Français · 简体中文 Without a gateway, every agent that touches email (Claude, Codex, OpenClaw, your own scripts) holds a copy of every mailbox password. With mailgrant you register each mailbox , and each agent gets a token that opens only the mailboxes and actions you chose. Agents talk MCP or REST, and every call is checked and logged. You need a machine with Docker, and the IMAP/SMTP details of at least one mailbox (an app password is best). The config holds two lists: (what the gateway can reach) and (who may use which mailbox, and for what). It prints the token, which you give to the agent, and its hash, which goes in the config. The token is shown only once and isn't stored anywhere. next to it, so the config holds no secret: It prints who may touch what, or exactly what is wrong:
README
원문 README의 일부입니다. 원문 보기.
mailgrant
The self-hosted email gateway for AI agents. Each agent gets its own token, its own mailboxes and its own permissions. The mailbox passwords stay with you.
English · Português · Español · Français · 简体中文
Without a gateway, every agent that touches email (Claude, Codex, OpenClaw, your own scripts) holds a copy of every mailbox password. With mailgrant you register each mailbox once, and each agent gets a token that opens only the mailboxes and actions you chose. Agents talk MCP or REST, and every call is checked and logged.
Install: 1. Get it · 2. Configure · 3. Run · 4. Connect an agent Use: Day to day · The web app · Documentation
1. Get it
You need a machine with Docker, and the IMAP/SMTP details of at least one mailbox (an app password is best).
git clone https://github.com/lucasmaffei/mailgrant && cd mailgrant
cp config.example.yaml config.yaml
2. Configure
The config holds two lists: mailboxes (what the gateway can reach) and agents (who may use which mailbox, and for what).
Create a token for your first agent:
docker compose run --rm mailgrant mailgrant token --name support-bot
It prints the token, which you give to the agent, and its hash, which goes in the config. The token is shown only once and isn’t stored anywhere.
Replace the contents of config.yaml with your mailbox and that agent:
mailboxes:
- name: contact
imap: {host: mail.example.com, username: [email protected], password: "${CONTACT_PASSWORD}"}
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →