# Fluxmail

Self-hosted email backend connecting mailboxes to AI agents via MCP. Useful for reading incoming mail, preparing drafts, and sending replies.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7
- Author: fluxmailai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/fluxmailai/fluxmail/tree/HEAD/packages/server
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/fluxmail

## What it does

Fluxmail connects mailboxes directly to autonomous coding assistants using MCP or HTTP. It handles Gmail, Microsoft 365, Outlook.com, and standard IMAP or SMTP accounts. Agents gain tools to inspect threads, compose drafts, and trigger sends.

Developers control the service with the bundled CLI or integrate web applications via its REST API. Local execution uses stdio, while containerized setups rely on streamable HTTP. Node.js 22.22 or newer is required. The free Personal plan caps usage at three mailboxes for one user, requiring an upgraded key for larger workloads.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `FLUXMAIL_DATA_DIR`, `FLUXMAIL_LICENSE_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --env FLUXMAIL_DATA_DIR=<FLUXMAIL_DATA_DIR> --env FLUXMAIL_LICENSE_KEY=<FLUXMAIL_LICENSE_KEY> --transport stdio server -- npx -y fluxmail
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add server --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --env FLUXMAIL_DATA_DIR=<FLUXMAIL_DATA_DIR> --env FLUXMAIL_LICENSE_KEY=<FLUXMAIL_LICENSE_KEY> -- npx -y fluxmail
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "server": {
            "command": "npx",
            "args": [
                "-y",
                "fluxmail"
            ],
            "env": {
                "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
                "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>",
                "FLUXMAIL_DATA_DIR": "<FLUXMAIL_DATA_DIR>",
                "FLUXMAIL_LICENSE_KEY": "<FLUXMAIL_LICENSE_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "fluxmail"
            ],
            "env": {
                "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
                "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>",
                "FLUXMAIL_DATA_DIR": "<FLUXMAIL_DATA_DIR>",
                "FLUXMAIL_LICENSE_KEY": "<FLUXMAIL_LICENSE_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> -e GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> -e FLUXMAIL_DATA_DIR=<FLUXMAIL_DATA_DIR> -e FLUXMAIL_LICENSE_KEY=<FLUXMAIL_LICENSE_KEY> server npx -y fluxmail
```
Replace <…> with your own values

## When to use it
- search and read incoming emails across Gmail, Outlook, and IMAP accounts
- prepare draft responses and send outbound messages from the agent interface
- sort and organize message folders directly within autonomous workflows

## Example prompts
- Check the latest unread emails in my Gmail inbox from today
- Draft a reply to the newest email from the client
- Search Outlook messages for unread invoices received last week

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
