LM

lucasmaffei/mailgrant

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

1 stars 0 forks Качество 56 Тренд 16NOASSERTION

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}"}
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →