Audit log
Mbox Viewer records every request of an AI agent in the file mcp-audit.jsonl. Each line holds the
time, the tool, the mailbox, a summary of the arguments and the result or the error code. Message
content and the token never appear there. You open the folder of the file with Show audit log
in Settings.
Where is the audit log?
The file sits in the logs folder of the app.
| System | Audit log |
|---|---|
| macOS | ~/Library/Logs/com.mboxviewer.viewer/mcp-audit.jsonl |
| Windows | %LOCALAPPDATA%\com.mboxviewer.viewer\logs\mcp-audit.jsonl |
To find it from the app, open Settings, go to MCP server (AI agents) and click Show audit log. The app shows the file in Finder or Explorer. It never opens the file with another application.
What does one line look like?
Each line is one JSON object. A search looks like this:
{"ts":"2026-12-02T09:14:03.512Z","tool":"search_messages","mailbox":"3f2a9c0d1b4e5f67","args_summary":{"limit":20,"query":"from:olivia has:attachment"},"result":{"returned":12,"total":12},"error":null}
| Field | Content |
|---|---|
ts |
The time of the request in UTC with milliseconds |
tool |
The tool name, or resources/list, resources/templates/list or resources/read for a resource request |
mailbox |
The mailbox id, or null when the request names none |
args_summary |
A short summary of the arguments |
result |
A summary of the result, or null after an error |
error |
The error code, or null after a success |
What does the log record, and what does it leave out?
The argument summary keeps these values:
- the search query or the sender prefix, cut at 200 characters, with control characters removed;
- the number of message ids and the first 20 of them;
- the tag and folder names or ids, the file name and the limits.
The result summary keeps counts, such as the number of results, the created flag of a new tag or
folder and the name and size of a saved file.
The log never contains message bodies, subjects, snippets, the token or the command line of the server.
How are changes recorded?
The tools that change something are the five tag and folder tools and save_attachment. Each one
writes an intent line with "result": "started" before it acts. A second line with the outcome
follows.
- If the server cannot write the intent line, it refuses the call before acting.
- If only the outcome line fails, the change is already recorded by its intent line. The agent then gets the real outcome.
- A read whose line cannot be written is withheld, and the agent gets the
internalerror.
The log therefore fails closed. A full disk or an unwritable logs folder blocks the agent rather than leaving a request out of the log.
How big does the file get?
The server rotates the file when it reaches 10 MiB. It renames it to mcp-audit.1.jsonl, which
replaces the previous rotated file, and starts a new mcp-audit.jsonl. Each client starts its own
server process, and all of them write to the same file. The lock file mcp-audit.lock in the same folder keeps
their lines and the rotation in order.
How do I watch the log while the agent works?
Follow the file in a terminal. On macOS run:
tail -f ~/Library/Logs/com.mboxviewer.viewer/mcp-audit.jsonl
On Windows run this in PowerShell:
Get-Content -Wait "$env:LOCALAPPDATA\com.mboxviewer.viewer\logs\mcp-audit.jsonl"
Which other logs can help?
| Log | Where | Content |
|---|---|---|
mcp-server.log |
The logs folder of the app | Startup problems and internal errors of the server. At startup a file over 5 MiB is renamed to mcp-server.1.log. |
| Claude Desktop | ~/Library/Logs/Claude/ on macOS, %APPDATA%\Claude\logs\ on Windows |
The messages of the server as Claude Desktop sees them, in mcp-server-mbox-viewer.log or a file named after Mbox Viewer for the extension. |
| Claude Code | The /mcp command and claude --debug |
The status and the messages of the server. |
Frequently asked questions
Where is the MCP audit log?
The audit log is the file mcp-audit.jsonl in the logs folder of the app. On macOS that folder is ~/Library/Logs/com.mboxviewer.viewer/, and on Windows it is %LOCALAPPDATA%\com.mboxviewer.viewer\logs\.
How do I open the audit log from the app?
Click Show audit log at the bottom of the MCP server (AI agents) section of Settings. The app shows the file in Finder or Explorer and creates it first if it does not exist yet.
Does the audit log contain my emails?
No. The log never contains message bodies, subjects, snippets or the token. It records the search queries and the message ids that the agent sent, which can still reveal what you asked about.
Can I turn the audit log off?
No. The server records every request, and it refuses a request that it cannot record. A full disk or a locked file therefore blocks the agent instead of leaving a gap in the log.
How big can the audit log get?
The file is rotated at 10 MiB. The server renames it to mcp-audit.1.jsonl and starts a new file, so the logs folder holds at most about 20 MiB of audit lines.
Why do some changes appear twice in the log?
A tool that changes something writes an intent line with "result": "started" before it acts, then a second line with its outcome. If the outcome line is missing, the change may have happened.
Can someone edit the audit log?
Yes. Any program running under your account can edit the file, so the log is a record and not a proof. On macOS the file is readable and writable by your account only.
Are refused requests recorded too?
Yes. A request refused because the server is off, the token is wrong or the mailbox is not shared gets a line with its error code, such as mcp_disabled or mailbox_not_allowed.
What is mcp-server.log?
It is the diagnostic log of the server process, kept in the same logs folder. It holds startup problems and internal errors, and it never contains message content, arguments or the token.