Skip to content

Aimx

⬛ SMTP for AI agents. No middleman.

Install

$git clone https://github.com/uzyn/aimx

Install command taken from the project's README or registry entry. Always review code before running it.

AIMX — AI Mail Exchange

SMTP for AI agents. No middleman.

Join the AIMX Discord →

AIMX (AI Mail Exchange) is a self-hosted email server (SMTP) and MCP stdio server that gives AI agents their own email addresses. Plugs into Claude Code, Codex CLI, Gemini CLI, Goose, and any other agent harness. No Gmail, no OAuth, no SaaS. Runs on the same VPS you already provisioned for your agents.

Features

  • Single binary. With human-friendly guided set up process.
  • Markdown-based email, coupled with clean TOML frontmatter. Friendly for your LLMs, RAGs and AI brains.
  • Direct MTA-to-MTA. Email has become send-and-pray best-effort. AIMX turns it back into direct server-to-server delivery, like an API call.
  • Instant hooks Inbound mail fires on_receive hooks the moment SMTP DATA completes. Outbound delivery fires after_send hooks when the MX attempt resolves. No cron, no heartbeat.
  • Trust modeling. Built-in DKIM-based trust model. Widely compatible. Minimizes prompt injection attacks.
  • Built-in MCP server. Stdio MCP. Efficient. MCP server only runs on demand, kills off when done.
  • No third parties. Mail lives on your server,. No need to trust and third-party servers with your sensitive data.
  • One-line agent integration. Integrates directly into your favorite AI agents: OpenClaw, Hermes, NanoClaw, Claude Code, etc.
  • IPv6-ready. IPv4 by default, but future-proof with IPv6 support.
  • MIT licensed. Free and open source.

Read the Book to learn more.

Contributions are welcomed!

Requirements

  • A Linux server with port 25 open (inbound and outbound)
  • A domain or subdomain you control

Quick start

curl -fsSL https://aimx.email/install.sh | sh

This will lead you to a guided setup with the following steps:

  • Preflight checks on port 25
  • Set up domain and DNS
  • Set up STARTTLS certificate
  • Set up trust policy
  • Install AIMX service
  • Set up MCP for agent(s)

To upgrade, simply run sudo aimx upgrade.

How to build

git clone https://github.com/uzyn/aimx.git
cd aimx
cargo build --release
sudo cp target/release/aimx /usr/local/bin/

# Run setup and follow the guided instructions
sudo aimx setup

CLI Commands

Usage: aimx [OPTIONS] <COMMAND>

Operations (as current user):
  send         Send an email
  mailboxes    Manage mailboxes
  hooks        Manage hooks
  agents       Manage AI agent MCP wiring
  mcp          Start the stdio MCP server (for AI agents)

Server administration:
  setup        Run the interactive setup wizard
  serve        Start the SMTP daemon
  doctor       Show server health, DNS, and recent logs
  logs         Tail the aimx service log
  dkim-keygen  Generate a DKIM keypair
  portcheck    Check port 25 connectivity (inbound, outbound)
  uninstall    Uninstall the aimx service (config and data retained)
  upgrade      Fetch the latest release and swap the installed binary

  help         Print help for a subcommand

Options:
      --data-dir <DATA_DIR>  Data directory override (default: /var/lib/aimx) [env: AIMX_DATA_DIR=]
  -V, --version              Print version
  -h, --help                 Print help

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io