Audit logging
Audit middleware records mutations only. See Audit logging for the event schema and redaction policy.
Audit switch
Section titled “Audit switch”MCP_AUDIT_ENABLED
Section titled “MCP_AUDIT_ENABLED”- Type: default-on boolean; only
falsedisables it - Default:
true - Use: Disables the audit middleware completely when false, regardless of the selected sink.
- Example:
MCP_AUDIT_ENABLED=false
Destination
Section titled “Destination”MCP_AUDIT_SINK
Section titled “MCP_AUDIT_SINK”- Type: enum
- Allowed:
stderr,file,otlp,none - Default:
stderr - Use: Chooses where mutation events go.
stderrwrites JSONL,fileusesMCP_AUDIT_FILE,otlpis reserved for the OTLP sink, andnoneis an explicit opt-out. - Example:
MCP_AUDIT_SINK=file
MCP_AUDIT_FILE
Section titled “MCP_AUDIT_FILE”- Type: path string
- Default:
./discord-mcp-audit.jsonlwhen the file sink is selected - Use: File path for the JSONL audit log. The file is created when missing and appended when it exists.
- Example:
MCP_AUDIT_FILE=/var/log/discord-mcp/audit.jsonl