Aliasflare logo

Aliasflare

Self-hosted Cloudflare email aliases with forwarding, alias replies, OTP extraction, and MCP tools for AI agents.

Install Aliasflare

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "aliasflare": {
      "command": "npx",
      "args": [
        "-y",
        "github:charleswei118/aliasflare"
      ],
      "env": {
        "DOMAIN": "YOUR_VALUE_HERE",
        "DESTINATION": "YOUR_VALUE_HERE",
        "ADMIN_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env DOMAIN=YOUR_VALUE_HERE --env DESTINATION=YOUR_VALUE_HERE --env ADMIN_TOKEN=YOUR_VALUE_HERE --transport stdio aliasflare -- npx -y github:charleswei118/aliasflare

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y github:charleswei118/aliasflare

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

aliasflare runs an email alias mailbox on Cloudflare Workers, D1, and Email Routing using your domain and Cloudflare account. It forwards incoming mail to a verified destination, can hide the original sender, extract verification codes into subjects, remove tracking pixels, and send from aliases through configured outbound providers. Its HTTP MCP endpoint and bundled stdio bridge let AI agents create aliases, inspect messages, retrieve codes, and send mail. Reach for it when you want self-hosted aliases without placing message storage on a third-party alias service.

Use cases

  • Create a separate address for each website signup
  • Extract verification codes for an AI agent
  • Disable an alias when it starts receiving spam
  • Reply to senders without exposing the real inbox
  • Forward domain mail through a Cloudflare Worker

Key features

  • Unlimited aliases across configured domains
  • Automatic verification-code extraction
  • Alias-based replies and outbound sending
  • Tracking-pixel removal
  • REST API and MCP tools
  • Cloudflare Workers and D1 deployment

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

7/7 checks healthy over the last 27d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · github:charleswei118/aliasflare (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars37Stargazers on the source repository.
Last commit22d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.

How Aliasflare works

What aliasflare does

aliasflare provides self-hosted email aliases for one or more domains managed through Cloudflare. Incoming mail is delivered by Cloudflare Email Routing to a Worker, which processes the message and forwards it to a verified inbox. Aliases can be created in the dashboard, through the REST API, through MCP, or automatically when mail arrives if AUTO_CREATE remains enabled.

Each alias can be disabled independently. In rewrite mode, forwarded messages identify the alias rather than exposing the original sender address, and replies can travel through a private reply address so the real inbox address is not disclosed. The service can also send new messages from an alias.

Verification codes detected in several languages can be added to the subject line. Tracking pixels and other known one-pixel or hidden images can be removed. D1 stores message metadata rather than message bodies, and if message rewriting fails, the original message is forwarded unchanged.

How it works

Cloudflare Email Routing sends mail for the configured domain to the Worker's email() handler. The Worker associates the recipient address with an alias, applies forwarding and message-processing settings, and sends the result to DESTINATION.

Replies use addresses in the reply+ form. The Worker accepts those reply addresses only for messages coming from the configured destination and passing the relevant SPF or DMARC checks, then forwards the reply to the original sender. Outbound replies and new messages require a configured sending route.

The service exposes an authenticated HTTP API and an MCP endpoint at /mcp. For clients that only support stdio, the repository includes a bridge that runs locally and forwards MCP calls to the deployed Worker. A Dockerfile is available for running that bridge in a container.

Setup and configuration

Deployment requires a domain on Cloudflare, enabled Email Routing, and a verified destination address. The Cloudflare Deploy button can create the Worker and D1 database; manual deployment uses Wrangler, migrations, and npm run deploy. After deployment, configure the catch-all Email Routing rule to send mail to the Worker.

Set DOMAIN, DESTINATION, and ADMIN_TOKEN as secrets. RESEND_API_KEY is optional. Resend, Brevo, or Cloudflare Email Sending can provide outbound delivery; without one of these routes, receiving, forwarding, alias management, and code extraction work, but replies and new outbound messages do not.

The main settings are AUTO_CREATE, FORWARD_MODE, BLOCK_TRACKERS, CODE_IN_SUBJECT, and BANNER. HTTP API and MCP requests use Authorization: Bearer <ADMIN_TOKEN>. The stdio bridge uses ALIASFLARE_URL and ALIASFLARE_TOKEN in its local client configuration.

Tools and capabilities

The MCP endpoint provides these tools:

  • create_alias creates an alias, with an optional note.
  • get_latest_code retrieves a recent verification code.
  • list_aliases lists configured aliases.
  • set_alias_enabled enables or disables an alias.
  • recent_messages reads recent message metadata.
  • send_from_alias sends a message using an alias.

The REST API covers configuration, alias creation and updates, message queries, code lookup, and sending. The web dashboard provides administrative access after authentication with ADMIN_TOKEN.

Limitations and notes

Cloudflare Email Routing limits messages to 25 MiB. The free Workers plan allows 100,000 requests per day and 10 ms of CPU time per invocation; large messages with many attachments may exceed the CPU limit and fall back to plain forwarding. Cloudflare Email Sending is beta.

Outbound deliverability depends on the reputation of the sending domain and provider. New domains or free subdomains may be placed in spam or rejected. The catch-all rule must remain enabled for aliases to receive mail, and a verified destination is required for forwarding. Keep the admin token private; it protects the dashboard, API, and MCP endpoint.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Aliasflare

aliasflare is an MCP server that connects AI agents to a self-hosted Cloudflare email alias mailbox. Its main tools create aliases, list aliases, enable or disable them, read recent messages, retrieve verification codes, and send mail from an alias through a deployed Worker.

Deploy aliasflare to Cloudflare, enable Email Routing, configure the Worker and D1 database, then add its `/mcp` URL with a bearer token to your MCP client. For stdio-only clients, run the bundled `npx` bridge with `ALIASFLARE_URL` and `ALIASFLARE_TOKEN`.

Yes, aliasflare works with Cursor through the bundled local stdio bridge. Configure Cursor to run `npx -y github:charleswei118/aliasflare`, and provide the deployed Worker URL and admin token as `ALIASFLARE_URL` and `ALIASFLARE_TOKEN`.

Yes, aliasflare can send replies and new messages from an alias when an outbound provider is configured. Supported routes include Resend, Brevo, and Cloudflare Email Sending; without one, receiving and forwarding continue to work but outbound sending does not.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAliasflare AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/aliasflare?style=directory)](https://allmcps.com/mcp/aliasflare)
HTML Embed
<a href="https://allmcps.com/mcp/aliasflare"><img src="https://allmcps.com/api/badge/aliasflare?style=directory" alt="Aliasflare on AllMCPs" /></a>