Airpost
MCP server

Audit log

Every airpost-mcp tool call is written to an owner-only JSON Lines log in the profile.

airpost-mcp writes every tool call to <config-dir>/mcp-audit.log, including calls that were refused. resources/read calls are logged too. The airpost CLI isn’t logged.

The desktop app shows the newest entries under Activity in Preferences > MCP, with Show all activity for more.

Format

One JSON object per line. The file is owner-only and is rotated to mcp-audit.log.1 when it reaches 4 MiB.

{"timestamp": 1792137600000, "client": "claude-ai 0.1.0", "toolName": "update_draft",
 "accountId": "a1", "outcome": "ok", "params": "{\"body\":\"<120 chars>\",\"id\":\"d0\"}",
 "resultSummary": "ok", "durationMs": 41}
timestampnumber

Milliseconds since the Unix epoch, when the call finished.

clientstring

The MCP client’s name and version, from its clientInfo.

toolNamestring

The tool called.

accountIdstring

The account the call acted on, when there is one.

outcomestring

ok, denied (refused by the policy) or error.

paramsstring

The call’s arguments as JSON, with body replaced by its length, secret-looking keys (password, token, secret, authorization and similar) dropped, cut to 200 characters.

resultSummarystring

A summary of the result, cut to 100 characters.

durationMsnumber

How long the call took.

What gets redacted

Before an entry is written, the arguments are cleaned recursively, including inside nested objects and arrays:

  • Any key whose name contains password, token, secret, credential, authorization, apikey or api_key (case-insensitive) is dropped with its value.
  • A body string is replaced by its length, such as "<512 chars>". Recipients, subjects, queries and ids are kept.
  • The result is cut to 200 characters, and resultSummary to 100.

So the log tells you what an agent searched for and who it wrote to, but not what it wrote. Subjects and queries can still be private, which is why the file is owner-only.

Examples

A refused send, then a search and a read:

{"timestamp": 1792137601200, "client": "claude-code 2.1.0", "toolName": "send_draft", "accountId": null, "outcome": "denied", "params": "{\"headerMessageId\":\"<4c1e@airpost>\"}", "resultSummary": "error: Access denied: 'send' operations require access level 'read-write-send', but current level is", "durationMs": 3}
{"timestamp": 1792137650000, "client": "claude-code 2.1.0", "toolName": "search_mail", "accountId": null, "outcome": "ok", "params": "{\"query\":\"from:dana is:unread\"}", "resultSummary": "ok", "durationMs": 88}
{"timestamp": 1792137652300, "client": "claude-code 2.1.0", "toolName": "get_thread", "accountId": "a_work", "outcome": "ok", "params": "{\"threadId\":\"t_8f2c\"}", "resultSummary": "ok", "durationMs": 25}

accountId is null when the call named no account and acted on none. A successful call’s summary is always ok. A failed one is error: and the error message, which is how you tell a refusal (outcome: "denied") from a failure such as no running engine (outcome: "error"). When a call fails because mcp.json doesn’t parse, it’s recorded as denied.

Reading it

To follow it from a terminal:

tail -f "<config-dir>/mcp-audit.log"

airpost-mcp status prints the log’s path for the current profile.

With jq, a few useful views:

# Everything that was refused
jq -c 'select(.outcome == "denied")' "<config-dir>/mcp-audit.log"

# Calls per tool
jq -r .toolName "<config-dir>/mcp-audit.log" | sort | uniq -c | sort -rn

# Every change, with local time
jq -r 'select(.toolName | test("send|draft|archive|trash|move|label|unread|starred|snooze|undo|event|contact|unsubscribe|reminder")) | "\(.timestamp / 1000 | strflocaltime("%F %T"))  \(.toolName)  \(.outcome)  \(.params)"' "<config-dir>/mcp-audit.log"

Rotation keeps one older file, so the log holds between 4 and 8 MiB of history. Copy mcp-audit.log.1 elsewhere if you need to keep more.