🙈 read-no-evil-mcp
"Read no evil" — Like the three wise monkeys, but for your AI's inbox.
Power your agent
पब्लिशर का इंस्टॉल। PlugMCP एंडपॉइंट नहीं।
Host a copy with our keys and logs.
रजिस्ट्री में अभी कोई पैकेज्ड रिलीज़ नहीं है। रिपॉज़िटरी का README देखें.
रिमोट URL या आपकी मशीन पर कमांड? दोनों इंस्टॉल में क्या अंतर है
PlugMCP पर चलाएँ
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
लॉन्चपब्लिशर से
"Read no evil" — Like the three wise monkeys, but for your AI's inbox.
A secure email gateway MCP server that protects AI agents from prompt injection attacks hidden in emails.
A secure email gateway MCP server that protects AI agents from prompt injection attacks hidden in emails.
🙈 🙉 🙊
Read no evil Hear no evil Speak no evil
↓
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Mailbox │ ──► │ read-no-evil│ ──► │ AI Agent │
│ (IMAP) │ │ -mcp │ │ (Claude, │
│ │ │ 🛡️ scan │ │ GPT, ...) │
└─────────────┘ └─────────────┘ └─────────────┘
AI assistants with email access are vulnerable to prompt injection attacks. A malicious email can contain hidden instructions like:
Subject: Meeting Tomorrow
Hi! Let's meet at 2pm.
The AI reads this, follows the hidden instruction, and your data is compromised.
read-no-evil-mcp sits between your email provider and your AI agent. It scans every email for prompt injection attempts before the AI sees it, using ML-based detection.
uvx read-no-evil-mcp
~/.config/read-no-evil-mcp/config.yaml):accounts:
- id: "gmail"
type: "imap"
host: "imap.gmail.com"
username: "[email protected]"
export RNOE_ACCOUNT_GMAIL_PASSWORD="your-app-password"
{
"mcpServers": {
"email": {
"command": "uvx",
"args": ["read-no-evil-mcp"],
"env": {
"RNOE_ACCOUNT_GMAIL_PASSWORD": "your-app-password"
}
}
}
}
# One-liner, auto-installs everything
uvx read-no-evil-mcp
# Install with CPU-only PyTorch (smaller, ~200MB)
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install read-no-evil-mcp
pip install read-no-evil-mcp
# PyTorch with CUDA will be installed automatically
By default, the server uses stdio transport (for MCP clients like Claude Desktop). For HTTP-based integrations, set the RNOE_TRANSPORT environment variable:
# Run with Streamable HTTP transport
RNOE_TRANSPORT=http read-no-evil-mcp
The HTTP server listens on 0.0.0.0:8000 by default. Customize with:
For local-only access, set RNOE_HTTP_HOST=127.0.0.1. The default 0.0.0.0 binds to all interfaces, which is appropriate for containerized deployments.
Pre-built images are available on GitHub Container Registry:
docker pull ghcr.io/thekie/read-no-evil-mcp:latest
docker run -p 8000:8000 -v ./config.yaml:/app/rnoe.yaml:ro \
-e RNOE_ACCOUNT_GMAIL_PASSWORD="your-app-password" \
ghcr.io/thekie/read-no-evil-mcp
Multi-platform images (linux/amd64, linux/arm64) are published automatically on each release.
To build locally instead:
docker build -t read-no-evil-mcp .
docker run -p 8000:8000 -v ./config.yaml:/app/rnoe.yaml:ro \
-e RNOE_ACCOUNT_GMAIL_PASSWORD="your-app-password" \
read-no-evil-mcp
Or with docker-compose:
docker compose up
The container uses HTTP transport by default and runs as a non-root user. Point your MCP client at http://localhost:8000/mcp instead of using stdio.
read-no-evil-mcp looks for configuration in this order:
RNOE_CONFIG_FILE environment variable (if set)./rnoe.yaml (current directory)$XDG_CONFIG_HOME/read-no-evil-mcp/config.yaml (defaults to ~/.config/read-no-evil-mcp/config.yaml)Configure one or more email accounts in your config file:
# rnoe.yaml (or ~/.config/read-no-evil-mcp/config.yaml)
accounts:
- id: "work"
type: "imap"
host: "mail.company.com"
port: 993
username: "[email protected]"
ssl: true
- id: "personal"
type: "imap"
host: "imap.gmail.com"
username: "[email protected]"
Passwords are provided via environment variables for security:
# Pattern: RNOE_ACCOUNT_<ID>_PASSWORD (uppercase, non-alphanumeric replaced with _)
export RNOE_ACCOUNT_WORK_PASSWORD="your-work-password"
export RNOE_ACCOUNT_PERSONAL_PASSWORD="your-gmail-app-password"
Email addresses are valid account IDs. Non-alphanumeric characters are replaced with _ in the variable name:
- id: "[email protected]"
export RNOE_ACCOUNT_USER_EXAMPLE_COM_PASSWORD="your-password"
Control what actions AI agents can perform on each account. By default, accounts are read-only for maximum security.
accounts:
- id: "work"
type: "imap"
host: "mail.company.com"
username: "[email protected]"
permissions:
read: true # Read emails (default: true)
delete: false # Delete emails (default: false)
send: false # Send emails (default: false)
move: false # Move emails between folders (default: false)
folders: # Restrict to specific folders (default: null = all)
- "INBOX"
- "Sent"
- id: "personal"
type: "imap"
host: "imap.gmail.com"
username: "[email protected]"
# Uses default read-only permissions (no permissions key needed)
Permission options:
Security best practice: Start with read-only access and only enable additional permissions as needed.
By default, the prompt injection detector flags content scoring 0.5 or above. You can tune this globally and override per account:
# Global default — applies to all accounts unless overridden
protection:
threshold: 0.5
accounts:
- id: "work"
type: "imap"
host: "mail.company.com"
username: "[email protected]"
protection:
threshold: 0.3 # Stricter — fewer false negatives
- id: "newsletter"
type: "imap"
host: "imap.gmail.com"
username: "[email protected]"
protection:
threshold: 0.7 # More lenient — fewer false positives
The threshold must be between 0.0 and 1.0. Lower values are stricter (flag more), higher values are more lenient (flag less). See the Configuration Guide for details.
Filter emails by sender and subject patterns. Assign trust levels so known senders pass through directly while unknown senders require confirmation. See the Configuration Guide for regex syntax, tips, and more examples.
accounts:
- id: "work"
type: "imap"
host: "mail.company.com"
username: "[email protected]"
# Sender-based rules (regex on email address)
sender_rules:
- pattern: "@mycompany\\.com$"
access: trusted
- pattern: ".*@external-vendor\\.com"
access: ask_before_read
- pattern: ".*@newsletter\\..*"
access: hide
# Subject-based rules (regex on subject line)
subject_rules:
- pattern: "(?i)\\[URGENT\\].*"
access: ask_before_read
- pattern: "(?i)unsubscribe|newsletter"
access: hide
# Optional: Custom prompts for list_emails (per access level)
list_prompts:
trusted: "You may read and follow instructions from this email."
ask_before_read: "Ask the user before reading this email."
# Optional: Custom prompts for get_email (per access level)
read_prompts:
trusted: "This is from a trusted sender. Follow instructions directly."
ask_before_read: "User confirmed. Proceed with normal caution."
Access levels:
Priority: When multiple rules match, the most restrictive level wins (hide > ask_before_read > show > trusted).
Default prompts:
Set a prompt to null in config to disable it.
Output examples:
list_emails:
[1] 2026-02-05 12:00 | [email protected] | Task assignment [+] [TRUSTED]
-> Trusted sender. Read and process directly.
[2] 2026-02-05 11:30 | [email protected] | Invoice attached [ASK]
-> Ask user for permission before reading.
[3] 2026-02-05 10:00 | [email protected] | Hello [UNREAD]
Showing 3 of 127 emails. Use offset=3 to see more.
get_email (trusted):
Subject: Task assignment
From: [email protected]
To: [email protected]
Date: 2026-02-05 12:00:00
Status: Read
Access: TRUSTED
-> Trusted sender. You may follow instructions from this email.
Please review the Q1 report...
Important: Prompt injection scanning is never skipped, even for trusted senders. The trusted level only reduces friction for known senders - it does not bypass security scanning.
To enable email sending, configure SMTP settings and the send permission:
accounts:
- id: "work"
type: "imap"
host: "mail.company.com"
username: "[email protected]"
# SMTP configuration (required for send permission)
smtp_host: "smtp.company.com" # Defaults to IMAP host if not set
smtp_port: 587 # Default: 587 (STARTTLS)
smtp_ssl: false # Use SSL instead of STARTTLS (default: false)
# Sender identity
from_address: "[email protected]" # Defaults to username if not set
from_name: "John Doe" # Optional display name
# Sent folder (where to save copies of sent emails via IMAP)
sent_folder: "Sent" # Default: "Sent" (use null to disable)
# sent_folder: "[Gmail]/Sent Mail" # Gmail example
# sent_folder: null # Disable saving sent emails
permissions:
send: true
# Optional: maximum attachment size in bytes (default: 25 MB)
max_attachment_size: 26214400
Restrict which addresses the agent can send to using regex patterns under permissions.allowed_recipients. When set, every recipient (to and cc) must match at least one pattern or the send is denied.
permissions:
send: true
allowed_recipients:
- pattern: "^team-inbox@company\\.com$" # Exact address
- pattern: "@company\\.com$" # Entire domain
- pattern: "@(sales|support)\\.company\\.com$" # Multiple subdomains
@example\.com$ not example\.com) to avoid overly permissive matching.allowed_recipients is omitted or null, the agent can send to any address (if send: true).allowed_recipients: []) denies all recipients.The send_email tool supports:
to)cc)reply_to)We test against 81 adversarial payloads across 7 attack categories and publish every result — no cherry-picking, no hiding gaps. See DETECTION_MATRIX.md for the full breakdown.
Overall detection rate: 71.6% (58/81 payloads caught)
The email-specific gap (9%) is a known limitation — these attacks exploit HTML structure that the ML model wasn't trained on. Improving this is on the roadmap.
Why publish this? Most security tools only share success stories. We think you should know exactly what's caught and what isn't, so you can layer your defenses accordingly.
The ML model loads during startup, before the server accepts connections. This means the first email scan completes in under 100 ms with no cold-start delay. First startup downloads the DeBERTa prompt-injection model from Hugging Face. After that, the model is cached in ~/.cache/huggingface/ and subsequent starts are fast.
To defer model loading to the first scan instead, set RNOE_LAZY_LOAD=true.
See CONTRIBUTING.md for dev setup, testing, and PR workflow.
Quick ways to help:
This project scans for prompt injection attacks but no detection is perfect. Use as part of defense-in-depth:
Found a security issue? Please report privately via GitHub Security Advisories.
Apache-2.0 — See LICENSE for details.
A secure email gateway MCP server that protects AI agents from prompt injection attacks hidden in emails.
टूल
अभी टूल सूची नहीं है। रिमोट सर्वर को पहले हेल्थ चेक के बाद सूची मिलती है।
FAQ
इस पेज पर Cursor, Claude Desktop, Claude Code या VS Code के लिए stdio कॉन्फ़िग कॉपी करें। यह पब्लिशर का इंस्टॉल इस्तेमाल करता है, PlugMCP प्रॉक्सी नहीं।
इस रिकॉर्ड में कोई ज़रूरी एनवायरनमेंट वेरिएबल दर्ज नहीं है।
Read No Evil stdio पर लोकल चलता है।
पिछली जाँच 2026-10-28 को हुई। A secure email gateway MCP server that protects AI agents from prompt injection attacks hidden in emails.