# MsgLens

> MsgLens is a free MCP server for files and documents. Read Outlook .msg, .eml and winmail.dat files locally: headers, body and attachments. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, Web
- **Website:** https://msglens.app
- **Repository:** https://github.com/andyliu0427/msglens/tree/HEAD/cli
- **MCP Registry name:** io.github.AndyLiu0427/msglens
- **Categories:** files and documents, developer tools
- **Listing updated:** 2026-11-16

## About

Most Outlook messages keep their body only as compressed RTF with HTML wrapped inside, so parsers that read only the HTML or text fields return empty bodies. This one decompresses the RTF and falls back through the available body fields, detects the format from the bytes so renamed files still open, unpacks winmail.dat, and decodes non-Latin text using the declared code page. It also reads saved appointments and contacts.

The MCP server runs over stdio with three tools to read an email, save its attachments and convert to .eml or .txt, and it makes no network requests. Message text is written by whoever sent it, so the tools instruct the assistant to treat it as data. The same parsers power a browser viewer at msglens.app that processes files locally with a 100 MB limit.

The CLI also converts folders of .msg files and never overwrites existing files.

## Features

- **Reliable body extraction:** Handles RTF-wrapped HTML bodies that other parsers miss.
- **winmail.dat support:** Unpacks attachments trapped in TNEF files.
- **Attachment saving:** Writes attachments to a folder without overwriting.
- **Format conversion:** Converts .msg or winmail.dat to .eml or .txt.
- **No network calls:** Files stay on your machine.
- **Library and CLI:** Usable from Node or the command line.

## Good for

- Summarise an .msg file someone sent you
- Extract attachments from a winmail.dat
- Convert a folder of .msg files to .eml
- Read Outlook items without Outlook

## Install

### Claude Code (Terminal)

```sh
claude mcp add msglens -- npx -y msglens-cli
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "msglens": {
      "command": "npx",
      "args": [
        "-y",
        "msglens-cli"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "msglens": {
      "command": "npx",
      "args": [
        "-y",
        "msglens-cli"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "msglens": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "msglens-cli"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "msglens": {
      "command": "npx",
      "args": [
        "-y",
        "msglens-cli"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "msglens": {
      "command": "npx",
      "args": [
        "-y",
        "msglens-cli"
      ]
    }
  }
}
```

## Tools

- `read_email`: Subject, sender, recipients, date, body and attachment list
- `save_attachments`: Write every attachment into a folder
- `convert_email`: Convert .msg or winmail.dat to .eml or .txt

## FAQ

### Does it upload my emails?

No. The README says the server makes no network requests.

### How do I add it to Claude Code?

Run claude mcp add msglens -- npx -y msglens-cli mcp.

### What formats does it open?

Outlook .msg, .eml and winmail.dat.

### Is there a web viewer?

Yes, msglens.app parses files in the browser.

### Is MsgLens free?

Yes. MsgLens is free to use.

### How do I add MsgLens to Claude Code?

Run this command in your terminal: claude mcp add msglens -- npx -y msglens-cli

### What are the best alternatives to MsgLens?

The closest alternatives to MsgLens are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/msglens
