What the MCP server does

The MCP server of Mbox Viewer lets an AI agent on your computer search and read the mailboxes you choose. The agent can be Claude Desktop, Claude Code, Cursor or any other client of the Model Context Protocol (MCP). The server ships with the app since version 0.4.0. It is off by default, and it answers only a client that presents your access token.

What is MCP?

The Model Context Protocol is an open standard that lets an AI application call tools provided by another program. Mbox Viewer provides 13 tools. An agent calls them to list your mailboxes, run a search and read a message or a whole thread. If you allow it, the agent can also tag messages and file them in virtual folders.

How does the server work?

The client starts the server itself. It runs the Mbox Viewer executable with the --mcp argument as a child process and exchanges messages with it over standard input and output (stdio).

  • The server shows no window and opens no network port. It sends nothing over the Internet.
  • It reads the indexes, tags and virtual folders that the app has already built. It never indexes a file itself, so open each mailbox in Mbox Viewer before you share it.
  • It works whether the app is open or closed.
  • Each client starts its own server process, and all of them read the same settings.
  • It opens your .mbox files read-only and never modifies them.
  • It rereads the settings on every request, so a change you make in Settings applies to the next call of the agent.

What can an agent do with my mail?

Action What it needs
Search a shared mailbox with the operators of the app A ticked mailbox
Read a message or a whole thread as plain text A ticked mailbox
List labels, tags, virtual folders and frequent senders A ticked mailbox
Create tags and folders, tag messages, add messages to folders or remove them Allow changes to tags and folders
Save an attachment to disk An Export directory for attachments

The agent never deletes a message and never changes an .mbox file. It never receives HTML or the bytes of an attachment. The Tools reference lists every tool with its parameters and limits.

How do I turn it on?

  1. Open Settings with the gear button in the top bar. You can also press ⌘, on macOS or Ctrl+, on Windows.
  2. In the MCP server (AI agents) section, tick Enable the MCP server. The app creates a random access token of 64 hexadecimal characters.
  3. Under Mailboxes the agent may see, tick the mailboxes to share. Only mailboxes that you opened in the app appear in this list.
  4. Connect a client with the page that matches it in the table below.
Mbox Viewer Settings dialog showing the MCP server (AI agents) section with the server enabled and the All mail mailbox ticked
The MCP server (AI agents) section of Settings controls what an agent may see and do.
Client Method Instructions
Claude Desktop Extension file (.mcpb) or JSON configuration Set up Claude Desktop
Claude Code The claude mcp add command Set up Claude Code
Cursor JSON in ~/.cursor/mcp.json Set up Cursor and other clients
Other stdio clients A command, one argument and one environment variable Set up Cursor and other clients

Does my mail leave my computer?

The server itself sends nothing over the network. The agent sends what it reads to its model provider, as it does with any file you give it. Share only the mailboxes that you want the agent to read. Each safeguard is detailed in Permissions and the security model.

Which versions of Mbox Viewer support it?

Version 0.4.0 added the MCP server on macOS and Windows. Version 0.4.1 added the export of the Claude Desktop extension and the Copy token button. Use the same version of the app and of the extension, and export the extension again after each update.

Frequently asked questions

Is the MCP server turned on by default?

No. The server is off until you tick Enable the MCP server in the MCP server (AI agents) section of Settings. Until then every tool call answers mcp_disabled.

Does Mbox Viewer have to be running for the agent to work?

No. The client starts its own copy of the server, which reads the data of the app on disk. Each mailbox must have been opened and indexed in Mbox Viewer at least once.

Can the agent read every mailbox I have opened?

No. The agent sees only the mailboxes you tick under Mailboxes the agent may see. Nothing is shared until you tick one.

Does the MCP server open a network port?

No. The client talks to the server through the standard input and output of the process (stdio). No other computer can reach the server.

Can the agent delete or change my emails?

No. The server opens the .mbox files read-only and has no tool that deletes a message. With Allow changes to tags and folders on, it can change tags and virtual folders and nothing else.

Which AI clients work with Mbox Viewer?

Any MCP client that can start a local stdio server works. The Settings dialog gives ready-made setups for Claude Desktop, Claude Code and Cursor, and it gives a generic command for the others.

How many tools does the server provide?

The server provides 13 tools. Seven of them read data, five change tags and folders, and save_attachment writes a file into the export directory you chose.

Why does the agent say that a mailbox is not ready?

The server answers mailbox_not_ready while the mailbox is being indexed or after its file changed on disk. Open the mailbox in Mbox Viewer and let indexing finish, because the server never indexes a file itself.

Can I see what the agent did?

Yes. Every request is recorded in mcp-audit.jsonl in the logs folder of the app, and the log never contains message content. Click Show audit log in Settings to show the file in Finder or Explorer.