mcp-name: io.github.n24q02m/better-email-mcp
IMAP/SMTP email for AI agents -- read, send, organize, and manage attachments across accounts.
Power your agent
पब्लिशर का इंस्टॉल। PlugMCP एंडपॉइंट नहीं।
Host a copy with our keys and logs.
रजिस्ट्री में अभी कोई पैकेज्ड रिलीज़ नहीं है। रिपॉज़िटरी का README देखें.
रिमोट URL या आपकी मशीन पर कमांड? दोनों इंस्टॉल में क्या अंतर है
PlugMCP पर चलाएँ
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
लॉन्चपब्लिशर से
help) -- search, read, send, reply, forward, organize, and credential status in single callshelp tool + MCP ResourcesThe server runs in two modes: stdio (default, single-user, credentials from env vars) and HTTP (opt-in, single-user with a bearer token). For stdio, add it to your MCP client config:
{
"mcpServers": {
"email": {
"command": "npx",
"args": ["--yes", "@n24q02m/email@latest"],
"env": {
"EMAIL_CREDENTIALS": "[email protected]:app-password"
}
}
}
}
The package is @n24q02m/email (formerly @n24q02m/better-email-mcp; old package
receives one final release then freezes). The MCP Registry id stays
io.github.n24q02m/better-email-mcp, and the legacy better-email-mcp command is
kept as an alias of email.
Multiple accounts are comma-separated: [email protected]:pass1,[email protected]:pass2. See Configuration for all env vars, and Remote (HTTP Mode) to run a hosted multi-user server.
Most providers use an App Password (no OAuth setup); Outlook/Hotmail/Live use a bundled OAuth device-code flow in HTTP mode. Settings (IMAP/SMTP host, port) are auto-discovered from the email domain.
Full per-client walkthroughs: mcp.n24q02m.com/servers/better-email-mcp/setup/.
The package ships one binary, email (run via npx @n24q02m/email), also installed under its legacy name better-email-mcp. With no arguments it starts the MCP server over stdio; it also accepts one flag and one subcommand:
# stdio server (normally launched by your MCP client, not by hand)
EMAIL_CREDENTIALS="[email protected]:app-password" npx @n24q02m/email
# HTTP multi-user server
npx @n24q02m/email --http
# One-off Outlook OAuth device-code sign-in
npx @n24q02m/email auth [email protected]
# Sign out of a single account (or omit the email to clear all)
npx @n24q02m/email logout [email protected]
auth/logout are only for Outlook/Hotmail/Live addresses -- other providers use an App Password in EMAIL_CREDENTIALS. See Remote (HTTP Mode) for the HTTP config.
Published with a Smithery config (smithery.yaml). Smithery runs the server over stdio with no build config required; credentials come from the environment (see Configuration). The start command is:
startCommand:
type: stdio
commandFunction: |-
(config) => ({ command: 'npx', args: ['-y', '@n24q02m/email'] })
Full docs at mcp.n24q02m.com/servers/better-email-mcp/:
Install with AI agent -- paste this to your AI coding agent:
Install MCP server
The public send tool is replaced by messages with action: new, reply, or forward.
This follows the MCP N+2 standard: sending is an action in the messages domain, so keeping a
separate send entry would duplicate that domain and add redundant tool-list and help-topic
surface. The old name is removed directly; there is no compatibility alias.
How email stacks up against direct competitors in each pillar:
Run as a single-user HTTP server, authenticated with a shared bearer token:
{
"mcpServers": {
"email": {
"type": "http",
"headers": { "Authorization": "Bearer <your-token>" },
"url": "https://<your-host>/mcp"
}
}
}
Single-user mode: one shared bearer token; accounts come from env vars or email auth outlook <address>:
export EMAIL_MCP_TOKEN_HASH='scrypt$...' # required: the container binds 0.0.0.0 and refuses to start without it
export EMAIL_CREDENTIALS='[email protected]:app-password'
docker run -p 8080:8080 \
-e PORT=8080 \
-e EMAIL_MCP_TOKEN_HASH \
-e EMAIL_CREDENTIALS \
-e HOME=/data \
-v email-data:/data \
n24q02m/email:latest
Mint the hash with printf '%s' "$TOKEN" | email token hash; the token is read from stdin, never argv. Clients send the raw token as Authorization: Bearer <token>. Saved Outlook tokens live under /data/.better-email-mcp/ and persist when the /data volume is kept.
The repository ships docker-compose.http.yml, which builds the http image target and
publishes it on host loopback only (127.0.0.1:8082):
export EMAIL_MCP_TOKEN_HASH='scrypt$...' # required; see the note above
export EMAIL_CREDENTIALS='[email protected]:app-password'
docker compose -f docker-compose.http.yml up
The server is then reachable at http://localhost:8082. To serve other machines, put your own TLS reverse proxy on the same host in front of the loopback port. Prebuilt multi-arch images are published to Docker Hub (n24q02m/email)
and GHCR (ghcr.io/n24q02m/email).
Outlook/Hotmail/Live accounts use OAuth2 device-code. Run email auth outlook <address> once. On first use:
~/.better-email-mcp/tokens.json (created with mode 0600 on POSIX). In Docker that path is /data/.better-email-mcp/tokens.json.OAuth uses the bundled public Azure client (d56f8c71-9f7c-43f4-9934-be29cb6e77b0, Thunderbird-pattern) -- no user-side Azure registration needed.
In stdio mode, Outlook accounts use an App Password instead (Outlook Account Settings → Security → Advanced security options → App passwords).
To trust mise configuration automatically, set trusted_config_paths in the user-level config at ~/.config/mise/config.toml; do not add it to this project's .mise.toml.
[email protected]:pass1,[email protected]:pass2,[email protected]:pass3
# Custom hostname (default port 993, implicit TLS)
[email protected]:password:imap.custom.com
# Custom hostname with a custom port
[email protected]:password:imap.custom.com:1993
# Local IMAP proxy -- "localhost" is accepted as a host, even without a dot
[email protected]:password:localhost:1993
Each account can use its own host and port. A non-993 port is treated as plaintext/STARTTLS -- the usual shape for a local IMAP proxy (for example email-oauth2-proxy).
A mailbox in a Microsoft 365 organisation -- including one on your own domain -- signs in through Entra ID rather than the consumer directory, and Microsoft disabled basic auth for Exchange Online in 2024, so an App Password is not an option. Two settings make it work:
# Sign in against the directory that owns the mailbox
OUTLOOK_TENANT=common # or a tenant GUID / verified domain
# Route your own domain to OAuth instead of asking for a password
OUTLOOK_EXTRA_DOMAINS=company.com
OUTLOOK_TENANT applies to the token refresh as well as the initial sign-in --
refreshing a work/school token against the consumer directory fails with
AADSTS7000012: The grant was obtained for a different tenant.
If the mailbox was consented with a narrower grant (say IMAP but no SMTP), match
it with OUTLOOK_SCOPES so the refresh does not ask for more than was granted.
git clone https://github.com/n24q02m/email.git
cd email
bun install
bun run dev
Credentials are single-user: whoever runs the server (or your OS user for stdio) can read them. Storage depends on the deployment mode:
Apache-2.0 -- See LICENSE.
IMAP/SMTP email for AI agents -- read, send, organize folders, and manage attachments across multiple accounts, with auto-discovery.
टूल
अभी टूल सूची नहीं है। रिमोट सर्वर को पहले हेल्थ चेक के बाद सूची मिलती है।
FAQ
इस पेज पर Cursor, Claude Desktop, Claude Code या VS Code के लिए stdio कॉन्फ़िग कॉपी करें। यह पब्लिशर का इंस्टॉल इस्तेमाल करता है, PlugMCP प्रॉक्सी नहीं।
इस रिकॉर्ड में कोई ज़रूरी एनवायरनमेंट वेरिएबल दर्ज नहीं है।
Email stdio पर लोकल चलता है।
पिछली जाँच 2026-11-17 को हुई। IMAP/SMTP email for AI agents -- read, send, organize folders, and manage attachments across multiple accounts, with auto-discovery.