Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Audit Logging

mcp-scanner maintains a detailed audit log of all proxied tool calls.

What’s Logged

Each audit entry includes:

FieldDescription
timestampWhen the call occurred (UTC)
server_nameMCP server that handled the call
tool_nameName of the tool called
tool_argsArguments passed to the tool (JSON)
resultTool result (JSON, if captured)
blockedWhether the call was blocked by a rule
block_reasonWhy the call was blocked
duration_msExecution time in milliseconds

Viewing Logs

Web Dashboard

mcp-scanner serve

Navigate to the Audit Log section.

API

# List recent entries
curl http://localhost:9191/api/audit

# Filter by server
curl "http://localhost:9191/api/audit?server=filesystem"

# Filter by tool
curl "http://localhost:9191/api/audit?tool=read_file"

# Show only blocked calls
curl "http://localhost:9191/api/audit?blocked=true"

Storage

Audit logs are stored in ~/.mcp-scanner/mcp-scanner.db (SQLite).

Retention

By default, all logs are retained. Future versions may add automatic cleanup policies.