๐Ÿฅท The AnonSec MCP Server enables anonymous email management via Firefox Relay with defense-in-depth PQC for data at rest.

Firefox Relay MCP Server - Anonymous Email Management

Production-Ready MCP Server for Firefox Relay Anonymous Email Operations

License: MITNode.jsTypeScriptMCP

// crafted for the security community โ€” funding keeps it maintained

GitHub SponsorsOpen CollectiveKo-fiBuy Me a Coffeethanks.dev

Overview

Firefox Relay MCP Server (anonsec-mcp-server) is a production-grade Model Context Protocol server that provides comprehensive anonymous email management capabilities through Firefox Relay addresses. Built with privacy, security, and operational excellence as core principles, this server enables AI agents and applications to send, receive, and process emails while maintaining complete anonymity.

Core Value Proposition

  • Privacy-First: All email operations maintain sender anonymity through Firefox Relay infrastructure
  • PQC-Ready: Post-Quantum Cryptography ready encryption architecture for data at rest
  • Production-Grade: Built with golden-standard programming practices for reliability and security
  • MCP Native: Full Model Context Protocol 2.0 compliance with tools and resources

Quick Start

Prerequisites

  • Node.js >= 18.0.0
  • npm or yarn
  • Firefox Relay account and API access

Installation

# Clone the repository
git clone https://github.com/VrilLabs/anonsec-mcp-server.git
cd anonsec-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm run dev

Configuration

Create a .env file with your Firefox Relay credentials:

FIREFOX_RELAY_API_KEY=your_api_key_here
ENCRYPTION_KEY=your_32_byte_hex_key_here
DATABASE_PATH=./data/anonsec.sqlite
PORT=3000

The encryption key must be exactly 32 bytes (64 hex characters). Generate one with:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Capabilities

Email Management

  • List new/unread emails from Firefox Relay addresses
  • Read full email content with decryption
  • Retrieve all emails with filtering
  • Get latest email from any relay address

OTP Handling

  • Extract OTP codes from emails
  • Validate OTP format and confidence
  • Check OTP expiration
  • Re-extract OTP from email body

Email Sending

  • Send anonymous emails through relay addresses
  • Support for plain text and HTML content
  • Custom headers and metadata
  • OTP email simulation

Project Structure

.
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts          # Server entry point and configuration
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ””โ”€โ”€ index.ts      # Firefox Relay API client
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ””โ”€โ”€ index.ts      # Configuration management
โ”‚   โ”œโ”€โ”€ db/
โ”‚   โ”‚   โ””โ”€โ”€ index.ts      # SQLite database service
โ”‚   โ”œโ”€โ”€ tools/
โ”‚   โ”‚   โ”œโ”€โ”€ all_emails.ts
โ”‚   โ”‚   โ”œโ”€โ”€ latest_email.ts
โ”‚   โ”‚   โ”œโ”€โ”€ latest_email_otp.ts
โ”‚   โ”‚   โ”œโ”€โ”€ new_emails.ts
โ”‚   โ”‚   โ”œโ”€โ”€ read_emails.ts
โ”‚   โ”‚   โ””โ”€โ”€ send_anon_email.ts
โ”‚   โ”œโ”€โ”€ types/
โ”‚   โ”‚   โ””โ”€โ”€ index.ts      # Type definitions
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ crypto.ts     # Encryption utilities
โ”‚       โ””โ”€โ”€ otp.ts        # OTP extraction utilities
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

Tools

The server provides 6 MCP tools:

  1. new_emails - Retrieve new/unread emails
  2. read_emails - Read full email content
  3. all_emails - List all emails with filtering
  4. latest_email - Get the latest email
  5. latest_email_otp - Extract OTP from latest email
  6. send_anon_email - Send anonymous emails

Resources

  • urn:anonsec:relay/addresses - Firefox Relay address management
  • urn:anonsec:email/collection - Email collection access
  • urn:anonsec:otp/emails - OTP emails collection
  • urn:anonsec:server/info - Server information
  • urn:anonsec:audit/logs - Audit logs
  • urn:anonsec:email/{emailId} - Individual email access

Security Features

  • AES-256-GCM Encryption for data at rest
  • Immutable audit logs for all operations
  • Request ID tracking for traceability
  • Security validation for sensitive operations
  • OTP code masking in responses (never exposed)
  • Sensitive data redaction in audit logs

Architecture

The server follows a clean, production-ready architecture:

  1. MCP Server Layer - Server initialization, tool registration, request handling
  2. Tools Layer - Individual tool implementations
  3. Core Services Layer - Database, API client, configuration, types, utilities
  4. Data Layer - SQLite database with PQC-ready encryption

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Security

See SECURITY.md for vulnerability reporting and security practices.

License

This project is licensed under the MIT License - see LICENSE for details.

MCP Server ยท Populars

MCP Server ยท New

    JanYork

    LWC โ€” Proactive Memory for AI Agents

    Agent-driven proactive memory CLI for AI agents โ€” autonomously recall, maintain, and evolve persistent, source-grounded knowledge across sessions.

    Community JanYork
    mixelpixx

    Konnect *BETA Release

    AI-assisted PCB design for KiCAD 10. Native KiCAD plugin โ€” a single Rust binary exposing 171 schematic, layout, routing, design-review, and manufacturing tools to Claude, or the LLM of your choosing

    Community mixelpixx
    mixelpixx

    Nimrod

    Web research for Claude over MCP: quality-scored Google search, clean extraction, deep research. Hosted connector for claude.ai/Desktop/Code + Nimrod Desktop toolkit (skills, agent, hooks).

    Community mixelpixx
    Minima-AI-Inc

    minima

    On-premises conversational RAG with configurable containers

    Community Minima-AI-Inc
    Minima-AI-Inc

    minima MCP server

    On-premises conversational RAG with configurable containers

    Community Minima-AI-Inc