Skip to main content

MCP Call Log

Every request the AI gateway's MCP proxy sends to an MCP server is recorded: who sent it, through which gateway, to which server and tool, what the server answered and how long it took. The record comes from Envoy's MCP egress, so it is what actually reached (or failed to reach) the server.

The MCP calls tab The MCP calls tab

The MCP calls tab​

AI Gateway → MCP calls (visible to project Owners and Admins only).

Filters: the window (Last 15 minutes … Last 30 days, default Last 1 hour), MCP server, Gateway (gateways serving MCP), Consumer, Outcome, and Refresh. The window is fixed when you pick it or press Refresh: paging does not move it.

Tools​

Per tool (<server>__<tool>) in the window, tools/call requests only:

ColumnMeaning
Callstools/call requests sent to the server.
FailedCalls whose outcome is not ok, with their share; red from 5%.
p9595th percentile of the call's duration (ms).
Sensitive datablocked and flagged sensitive-data decisions on the tool's arguments and results in the window.

"Tool calls in the window: refusals by the gateway (a tool not granted, a quota) never reach a server and are in the decision log, not here." A tool that only has sensitive-data decisions (all its calls refused) is listed with 0 calls.

Calls​

Every request the edges sent to a server, newest first, 50 per page: tool calls, listings and the session's own requests (initialize, the GET stream).

ColumnMeaning
TimeWhen the request started.
ConsumerThe consumer that sent it (empty: shown as —).
GatewayThe gateway serving it.
Call<server>__<tool> for a tool call; <server> · <method> otherwise; <server> · stream for the session's GET stream.
OutcomeThe HTTP status for ok; otherwise status and class (below).
DurationUntil the last byte went back (ms).
EdgeThe client (edge) that sent it.

A GET stream the server answers with 405 shows as no stream (the server offers none): MCP allows a server without one, so it is not a failure.

Outcome classes​

ClassUI labelWhen
okthe statusThe server answered below 400.
auth_errorrefused the credentialThe server answered 401 or 403.
rate_limitedrate limitedThe server answered 429.
client_errorrefused the requestAnother 4xx from the server.
server_errorserver error5xx from the server.
unreachableunreachableNo connection: refused, DNS failure, TLS failure.
timeoutno answer in timeEnvoy's request, duration or idle timeout.
resetconnection resetThe connection broke mid-answer, or a protocol error.
egress_erroregress errorThe egress itself failed (no route for the server, the client gone).

The first five are what the server answered (Envoy saw the response come from upstream); the next three are Envoy's view of the connection.

API​

curl -s "$ELCHI/api/v3/ai-gateway/mcp-calls?project=$PROJECT&from=2026-12-05T00:00:00Z&to=2026-12-05T12:00:00Z&server=github&class=auth_error&limit=50&offset=0" \
-H "Authorization: Bearer $TOKEN"
Parameter
from, toRFC 3339. Defaults: the last 24 hours. At most 90 days.
gateway, consumer, server, tool, classExact filters.
limit, offsetPage of calls; limit 1–500 (default 50).

Answer: data.calls[] (ts, instance_id, gateway, consumer, server, method, tool, status, class, duration_ms), data.total, and data.tools[] (server, tool, calls, errors, p95_ms, blocked, flagged; at most 200 tools). Owners and Admins only.

ClickHouse tables​

The edges write the log; the control plane reads it.

elchi_ai_gateway_mcp_calls: one row per request to a server.

ColumnType
tsDateTime64(3)Start of the request
instance_idLowCardinality(String)The edge
projectLowCardinality(String)
gatewayLowCardinality(String)
consumerLowCardinality(String)
serverLowCardinality(String)
methodLowCardinality(String)tools/call, tools/list, initialize, …; empty for the GET stream
toolLowCardinality(String)The tool's own name (without the server prefix)
statusUInt16HTTP status
classLowCardinality(String)Outcome class (above)
duration_msUInt32

Partitioned by day, ordered by (project, server, ts). Retention: the AI gateway's usage.clickhouse_ttl_days (default 90, at most 365). The table name can be changed with --mcp-calls-table (env ELCHI_AI_GATEWAY_MCP_CALLS_TABLE); the backend reads elchi_ai_gateway_mcp_calls.

elchi_ai_gateway_mcp_calls_1h: an hourly rollup (SummingMergeTree filled by a materialized view on every insert): per UTC hour, project, gateway, consumer, server, method, tool, class and latency bucket (floor(log_1.15(duration_ms)), the request log's buckets), a count n. Kept 90 days. Never backfilled: it starts counting when the view is first created.

The edge also reads the call log: the Tool calls per day quota adds the other edges' tools/call rows of the UTC day.

Edge metrics (/metrics of the AI gateway): elchi_ai_gateway_mcp_calls_total{server, class}, elchi_ai_gateway_mcp_call_rows_written_total, elchi_ai_gateway_mcp_call_rows_dropped_total.

What is recorded, and what is not​

Recorded: time, edge, project, gateway, consumer, server, JSON-RPC method, tool name, HTTP status, outcome class, duration.

Never recorded:

  • Tool arguments and results, prompts, resources, any message body.
  • The consumer key, the shared credential, users' personal tokens, any header value.
  • The server's URL.
  • Calls the gateway refused (not granted, over quota, malformed, blocked by the sensitive-data policy): they never reached a server and are in the decision log (elchi_ai_gateway_decisions, phase mcp or mcp_result) instead. See Grants and quotas.

MCP traffic does not appear in the request log or the token usage: it is not a model request.

When the log is empty​

  • No ClickHouse DSN on the edge: nothing is written (the gateway keeps serving; observability is best-effort).
  • ClickHouse unreachable: rows are queued and failed batches retried with backoff; a row is dropped when the queue is full or its batch keeps failing, and counted in elchi_ai_gateway_mcp_call_rows_dropped_total. The gateway never waits for ClickHouse.
  • No call reached a server: check the decision log for refusals, and the MCP servers tab for "MCP is not served yet".