LM

lucasmaffei/mailgrant

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

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}"}
GitHub で README 全文を見る

インストール

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

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →