Skip to main content
Glama
VRIL-LABS

anonsec-mcp-server

by VRIL-LABS

License: MIT Node.js TypeScript MCP

// 为安全社区精心打造 — 赞助以维持维护

GitHub Sponsors Open Collective Ko-fi Buy Me a Coffee thanks.dev


概述

Firefox Relay MCP Server(anonsec-mcp-server)是一个生产级 Model Context Protocol 服务器,通过 Firefox Relay 地址提供全面的匿名邮件管理能力。该服务器以隐私、安全和卓越运营为核心原则,使 AI 代理和应用程序能够在保持完全匿名的同时发送、接收和处理邮件。

Related MCP server: agent-inbox

核心价值主张

  • 隐私优先:所有邮件操作均通过 Firefox Relay 基础设施保持发件人匿名

  • PQC 就绪:为静态数据提供后量子密码学就绪的加密架构

  • 生产级:采用黄金标准编程实践构建,确保可靠性和安全性

  • MCP 原生:完全符合 Model Context Protocol 2.0,支持工具和资源

快速开始

前置条件

  • Node.js >= 18.0.0

  • npm 或 yarn

  • Firefox Relay 账户和 API 访问权限

安装

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

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm run dev

配置

使用您的 Firefox Relay 凭据创建 .env 文件:

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

加密密钥必须恰好为 32 字节(64 个十六进制字符)。使用以下命令生成一个:

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

功能

邮件管理

  • 列出来自 Firefox Relay 地址的新邮件/未读邮件

  • 读取完整邮件内容(含解密)

  • 检索所有邮件并支持过滤

  • 从任意中继地址获取最新邮件

OTP 处理

  • 从邮件中提取 OTP 验证码

  • 验证 OTP 格式和置信度

  • 检查 OTP 过期状态

  • 从邮件正文中重新提取 OTP

邮件发送

  • 通过中继地址发送匿名邮件

  • 支持纯文本和 HTML 内容

  • 自定义标头和元数据

  • OTP 邮件模拟

项目结构

.
├── 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

工具

该服务器提供 6 个 MCP 工具:

  1. new_emails - 检索新邮件/未读邮件

  2. read_emails - 读取完整邮件内容

  3. all_emails - 列出所有邮件并支持过滤

  4. latest_email - 获取最新邮件

  5. latest_email_otp - 从最新邮件中提取 OTP

  6. send_anon_email - 发送匿名邮件

资源

  • urn:anonsec:relay/addresses - Firefox Relay 地址管理

  • urn:anonsec:email/collection - 邮件集合访问

  • urn:anonsec:otp/emails - OTP 邮件集合

  • urn:anonsec:server/info - 服务器信息

  • urn:anonsec:audit/logs - 审计日志

  • urn:anonsec:email/{emailId} - 单个邮件访问

安全特性

  • AES-256-GCM 加密,用于静态数据

  • 不可篡改的审计日志,记录所有操作

  • 请求 ID 跟踪,实现可追溯性

  • 安全验证,用于敏感操作

  • OTP 验证码掩码(永不暴露)

  • 敏感数据脱敏,在审计日志中

架构

该服务器采用简洁、生产就绪的架构:

  1. MCP 服务器层 - 服务器初始化、工具注册、请求处理

  2. 工具层 - 各工具的具体实现

  3. 核心服务层 - 数据库、API 客户端、配置、类型、工具函数

  4. 数据层 - 带 PQC 就绪加密的 SQLite 数据库

贡献

欢迎贡献!请参阅 CONTRIBUTING.md 了解指南。

安全

请参阅 SECURITY.md 了解漏洞报告和安全实践。

许可证

本项目采用 MIT 许可证 授权 - 详情请参阅 LICENSE。


Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to create disposable email inboxes and automatically extract OTPs, magic links, and verification codes from incoming emails.
    14 npm
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    Enables AI agents to create temporary email addresses, receive confirmation emails, and extract verification links, automating sign-up and email verification workflows without manual intervention.
    6
    27 npm
    62
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables email management via IMAP and SMTP with multi-account support, safe sending with confirmation, and read-only modes.
    MIT