DingusMail

DingusMail

MCP server for parsing .eml email files, extracting metadata, content, and attachments with smart organization into folders. Enables AI to read and handle email files offline without triggering trackers.

Category
访问服务器

README

DingusMail - Smart Email Handling for Dumb AI

🤖💌📬 Your Emails are in safe hands! - Bro, trust me the robot said so... 😃👍

WOAH, MATE!

A basic MCP server for parsing.eml email files, Extracting the metadata, content, and attachments, AND it puts them into folders!?

IT MUST BE CHRISTMAS! 🎄

You heard me right, folks.

It's a tool for your robot - that can read and handle your electronic mail. The future is here and it is beautiful. 🥺

tl;dr:

this tool connects to local ai and allow the ai to read and extract from raw .eml files both on and offline, this means tracking emails can be summarized with ai, all content extracted, and the sender left on 'delivered' like your messages to your ex

Earth Shattering Features

  • Parse email metadata Is it an email from your aunt wishing you a happy holidays? Is it your monthly bank statement? is it your renewal for the premium hub? - WHO CARES!? That's robot work now.
  • Extract attachments with smart organisation: it takes your emails, it makes a folder, it puts the emails... IN THE FOLDER. simply incredible
    • Small files (<10KB) → small_files/
    • Documents (PDFs, Office) → documents/
    • Images (inline + regular) → images/
    • Everything else → attachments/ -that is 4 whole new levels of organization you could only dream of!
  • Efficient parsing - uses GOVCERT-LU/eml_parser for reliable email parsing.... this code is actually quite good so I can't even make a joke here Thank you to the author for making such a great bit of open source software!

Installation

We use UV in this house.

If you don't like it? You can find regular Python instructions further down.

i'm not mad, i'm disappointed

# Install UV (one-liner for Unix/macOS)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Clone or download this repository, then install dependencies:

# Navigate to the project directory
cd eml_parser_mcp

# Create virtual environment and install dependencies
uv venv
uv pip install -e .

How to make it work!*

...no refunds

Run the MCP Server

uv run eml_parser_mcp.py

Plug it into Claude or your Local AI 🔌

Add to your claude_desktop_config.json (or equivalent like your mcp.json file in LM Studio):

{
  "mcpServers": {
    "eml-parser": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/eml_parser_mcp/",
        "run",
        "eml_parser_mcp.py"
      ]
    }
  }
}

For LM Studio 🔨

This code is currently untested on Local AI! Future versions will be optimized for local AI if required, but the code does most of the heavy lifting for the bot - if your bot can call tools and read? This SHOULD work.

I will be using this with my local AI when my new PC is running but if you want to be the first to try:

Add MCP Server eml-parser to LM Studio

This should add the connector to your mcp.json file in LM studio!

NOTE: you will need to set the install directory manually

It probably works with Docker and the rest too idk I just wanted Claude to read .emls without writing a conversion script every time


The Tool Calls

Tool 1: parse_eml

Get metadata and attachment info WITHOUT downloading files:

{
    "filepath": "path/to/email.eml"
}

Returns:

  • Full metadata (subject, from, to, cc, dates)
  • Message content (text/HTML)
  • Attachment metadata (filename, size, type)
  • Inline image metadata
  • Summary counts

Tool 2: extract_eml_attachments

Takes files, puts them into folders, like its PEOPLE! Your bot just fills out this small questionnaire;

{
    "filepath": "path/to/email.eml",
    "output_dir": "extracted_files",  # optional
    "organize": true,                 # optional, smart organization
    "create_zip": false              # optional, zip everything
}

And it gets:

  • List of all extracted files with paths
  • Category breakdown
  • ZIP file path you can ask it to zip it all up! Wish it was my idea!
  • Size summaries - Actually very useful if you don't want your bot pulling a 200,000 token attachment directly into context.

"But wait you said it can zip and sort email..."

Ah, There's the thing! IT CAN!

Something even major tool developers don't know about is a little phenonenon called "writing bloated code and hoping enough compute will fix it".

This is why so many MCP servers will have 50 seperate tool calls (preloading the context window with 60,000 tokens) and such poor compatibility across different models with different interpretations of the Schema and how each tool interacts.

The fix? 🩹

  • Less tool to choose from
  • More parameters within the tool to choose from.

<!-- CLAUDE_GENERATED_START -->


📝 In Claude's Own Words:

Look—instead of building 47 different tools where one sorts, one zips, one filters by size, this uses two tools with parameters. That's it.

  • parse_eml → Preview first (check if it's actually important or just spam)
  • extract_eml_attachments → Extract, organize, AND zip in one call

The organize and create_zip parameters do the heavy lifting:

  • organize: false, create_zip: false → dump everything in one folder
  • organize: true, create_zip: false → sort into categories
  • organize: true, create_zip: true → sort AND zip

Result: Six different workflows from two tools instead of six separate tool calls. Less bloat, cleaner code, more flexible.

Analogy: We built Lego blocks, not a pre-assembled Death Star. You decide what to build.


<!-- CLAUDE_GENERATED_END -->

Example Workflow

<!-- CLAUDE_GENERATED__START -->


📝 In Claude's Own Words:

The MCP doesn't assume how you work—you tell it. Example:

"Hey Claude, there's a suspicious email at sketchy_offer.eml. 
Preview it, tell me if it's legit, then extract attachments 
to 'probably_malware' but don't open any executables."

What happens:

  1. Preview - Uses parse_eml to check sender, subject, attachments (oh look, DEFINITELY_NOT_A_VIRUS.exe)
  2. Decide - AI evaluates metadata. Dodgy domain? Weird subject? 47 .exe files? Yeah nah.
  3. Extract - If safe, uses extract_eml_attachments to sort files into categories
  4. Analyze - AI examines non-executables, reads PDFs, checks images, gives you a summary without launching ransomware

Your workflow, not ours. We just gave you the tools.


<!-- CLAUDE_GENERATED_END -->

TELL ME ABOUT THE ENDLESS POSSIBILITIES

  • AI Email Filtering without tracking: Emails have trackers! .eml can be downloaded without activating them and summarized offline. Imagine instead of signing for a parcel, you kidnap the postman. That's basically it.
  • Smart organization: CAN MAKE FOLDERS! CAN PUT THINGS FROM THE EMAILS IN THE FOLDERS! - REVOLUTIONARY!
  • Efficient: If your email contains Malware? Your bot can spot it, ignore it, and download it anyway!
  • Clean code: Simple instructions, for the humble email bot.

Dependencies

duct taped together for your inconvenience

  • fastmcp>=2.0.0 - It's like a custom MCP server - but someone else made it and let you use it!
  • eml_parser>=1.17.0 - This is an "email parser with full RFC compliance. So if you were worried about RFC compliance? We got you covered! ....what the hell is RFC ?

Just run uv pip install -e . sit back, and then sit back up again because uv is VERY quick.

Can I Use Regular Python instead of uv?

i mean yeah i guess Just replace the uv commands with Python/venv/pip.

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .

but how can you live with yourself?

Proudly Vibe Coded 🛌🤖💻

This was AI generated!... well not this bit (though how can you really know? Y'know?) But all python language elements of this were AI Generated under instruction and supervision (Claude likes to overwrite files without looking)

Here were the prompts:

claude make email mcp

make better

no make better

make github

make better

commit

Okay, jokes aside...

Vibe coding is amazing for translating code to English! But at the end of the day if you let an AI run wild with no direction, it will;

  • Create spaghetti code at best
  • Remove useful code constantly at worst

This was a case of me having a simple problem, I could have made this MCP with a single prompt and have been done with it, but because I listened to what actual programmers advice, I continued to refine it. The initial version used an entirely different email parsing dependency called eml-extractor, which wasn't working in my use case at all, so I searched the hub and that got replaced with eml_parser. Eventually 4 tool calls became 2, and it all happened though "augmented AI use".

Anthropic is looking heavily into Augmentation vs Automation, you can read more here!

But in short;

  • Augmentation is a back and forth collaboration
  • Automation is a 'set it and forget it' system

Here's what they don't tell you: both are totally valid methods of creating code

You will only get out what you put in, I have spent entire DAYS augmenting a prompt with one model, to then automate a second AI to code it autonomously.

So yeah, vibe coding is easy! I mean the only problems I've had The only issues during vibe coding this tiny MCP:

  1. First wrote the entire thing with filesystem one file at a time instead of using my custom sandbox (coming soon, hide your dingus-bots) that was literally designed for making stuff like this...
  2. Installed the entirely wrong MCP dependency almost making it incompatible with its actual purpose
  3. Suggested the wrong dependencies from the onset leading to a total restructure midway.
  4. Kept trying install features the Claude sandbox would not permit.
  5. Repeatedly reversed the load order causing the initial install to fail - between trying to delete all my other MCP links...
  6. Literally forgot what a file structure was and spent a few minutes in a loop wondering what /mnt/ meant.
  7. Then failed to call the tool it literally just built.

See? IT'S EASY! 🙄

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Addendum

         This MCP server primarily utilizes the following dependencies:
 - [eml_parser](https://github.com/GOVCERT-LU/eml_parser) - **GNU GPL License** - Core email parsing engine
 - [FastMCP](https://github.com/jlowin/fastmcp) - **Apache 2.0 License** - MCP server framework

Project created through collaborative augmentation with Claude by Anthropic

All creative and administrative descisions are my own - all python code is AI generated

Haiku/Sonnet/Opus 4.5 were each used selectively through the proccess

Additional implimentations on file-handling are custom, though based on common coding practice

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选