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 type | When |
|---|---|
mcp-initialize | An initialize request started a conversation |
mcp-tools-list | A tools/list request listed the tools |
mcp-tools-call | A tools/call request invoked a tool |
mcp-prompts-list | A prompts/list request listed the gateway's prompts |
mcp-prompts-get | A prompts/get request read one prompt's instructions |
mcp-discover | A server/discover probe of the stateless protocol revision |
mcp-session-delete | An HTTP DELETE terminated a session |
auth-failed | A 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:
| Column | Content |
|---|---|
source | Always mcp |
event_type | One of the types above |
object_name | The gateway's name |
cid | The correlation ID of the request, the same one that appears in server logs |
endpoint | The tool or prompt name - only mcp-tools-call and mcp-prompts-get events have one, it is empty otherwise |
ext_client_id | The caller - the name of the security definition the agent authenticated with |
sub_key | The session ID the request included or created, empty when there was none |
size | The size of the response, in bytes |
outcome | ok, or error when the HTTP status was not 2xx, the JSON-RPC response contained an error object, or a tool result reported isError |
data | A 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.
See also
| Feature | What it does |
|---|---|
| Platform audit log | Storage, external databases and the shared dashboard views |
| Security | The identities the caller column records |
| Response controls | The shaping whose trace appears in each event's data |
| AI observability | Alert rules and diagnosis built on these events |