MCP audit log

Record who called which tool, when and with what outcome - one event per agent request.

When an AI agent calls an MCP gateway, the audit log records what happened - who called which tool, when, with what outcome and how much data flowed. Payloads are never recorded, only their sizes are.

MCP is one source of the platform-wide audit log - storage, external databases and the dashboard views are shared with REST, IMAP and publish/subscribe, and are described on that page.

Event types

Each HTTP request an agent makes produces exactly one event, after the request is handled - both POST requests delivering JSON-RPC messages and the DELETE that terminates a session.

Event typeWhen
mcp-initializeAn initialize request started a conversation
mcp-tools-listA tools/list request listed the tools
mcp-tools-callA tools/call request invoked a tool
mcp-prompts-listA prompts/list request listed the gateway's prompts
mcp-prompts-getA prompts/get request read one prompt's instructions
mcp-discoverA server/discover probe of the stateless protocol revision
mcp-session-deleteAn HTTP DELETE terminated a session
auth-failedA request was refused because its credentials did not authenticate

A method outside this set, e.g. ping, is recorded under its literal name, and a request whose body could not be parsed is recorded as unknown.

The columns

The events live in the same event table as every other source. This is how MCP fills it:

ColumnContent
sourceAlways mcp
event_typeOne of the types above
object_nameThe gateway's name
cidThe correlation ID of the request, the same one that appears in server logs
endpointThe tool or prompt name - only mcp-tools-call and mcp-prompts-get events have one, it is empty otherwise
ext_client_idThe caller - the name of the security definition the agent authenticated with
sub_keyThe session ID the request included or created, empty when there was none
sizeThe size of the response, in bytes
outcomeok, or error when the HTTP status was not 2xx, the JSON-RPC response contained an error object, or a tool result reported isError
dataA JSON document with the fields below - never the payload itself

The data document holds remote_address, method (the literal JSON-RPC method), duration_ms (how long handling took) and request_size in bytes. Events with an error outcome additionally record the JSON-RPC error_code and error_message the agent received. When response controls shaped a tools/call response, the document also lists the trace of what shaping did - PII counts, compaction counts, token cuts and the agent filter - one key per finding, with nothing written for stages that did nothing.

In the dashboard, the MCP audit page shows these as Time, CID, Event, Tool, Caller, Outcome, Size and a data preview.

Enable and disable the log

Each gateway has its own Record each request in the audit log checkbox, in the Gateway options micro-form under More options on the wizard's step 02, What do they receive? - on by default for new gateways, and taking effect immediately when saved. The gateway list has an Audit log link in each row that opens that gateway's events.

In enmasse, the toggle is the is_audit_log_active attribute of an mcp_gateway entry.

Retention and storage

Events are kept for 30 days and deleted automatically past that window. Storage is the shared audit database - SQLite by default, or MySQL, PostgreSQL and Oracle DB - configured through the environment variables listed on the audit log page.

Note: Payloads are never recorded, so the audit log does not conflict with the obligations described on the PII and compliance page.

See also

FeatureWhat it does
Platform audit logStorage, external databases and the shared dashboard views
SecurityThe identities the caller column records
Response controlsThe shaping whose trace appears in each event's data
AI observabilityAlert rules and diagnosis built on these events

Learn more