Skip to main content
Every MCP request through the gateway is logged automatically. No setup required.

What gets logged

Each request captures:
FieldDescription
ToolWhich tool was called
ParametersRequest payload
ResponseFull response data
UserWho made the request
TeamWhich team (workspace)
TimestampWhen it happened
LatencyHow long it took
StatusSuccess or error
MCP ServerWhich upstream server

View logs

Go to Logs in the dashboard. Filter by:
  • MCP server
  • Team
  • User
  • Tool name
  • Time range
  • Status (success/error)
Click any entry for full details: the exact request parameters sent, the response received, and timing breakdown.

Usage analytics

The dashboard shows aggregate metrics:
  • Requests over time
  • Requests by server
  • Requests by team
  • Requests by user
  • Error rates
  • Latency percentiles
  • Most used tools
Use these to understand adoption patterns. Which tools are popular? Which teams are using MCP the most? Are error rates increasing?

Debugging

When something breaks, logs tell you exactly what happened. Tool returning errors? Check the response data. The MCP server’s error message is captured. Wrong results? Check the parameters. Maybe the agent sent incorrect arguments. Slow responses? Check the latency breakdown. Is it the MCP server or the network? Access denied? Check the user and team. Do they have permission for this tool? A typical debugging flow:
  1. Filter logs by the user who reported the issue
  2. Find the failing request
  3. Check parameters and response
  4. Identify the root cause

Metadata

Each request includes rich context from authentication, available for both API key and OAuth flows:
FieldDescription
organisation_idOrganization identifier
organisation_nameOrganization display name
workspace_idWorkspace identifier
workspace_nameWorkspace display name
workspace_slugWorkspace slug
user_idUser identifier
api_key_idAPI key identifier (if using API key auth)
mcp_server_idWhich MCP server handled the request
mcp.auth.typeAuthentication method (api_key or Bearer)
This metadata enables:
  • Per-user usage tracking
  • Per-team cost allocation
  • Compliance auditing
  • Chargeback reporting
  • Authentication flow analysis

Forward metadata to MCP servers

Use Identity Forwarding to send user context to MCP servers. The MCP server receives information about who made the request. It can then:
  • Log with Portkey context
  • Enforce its own access controls
  • Personalize responses
  • Attribute actions to users

Integration with AI Gateway

For Portkey AI Gateway users, MCP logs integrate with existing observability:
  • Traces span LLM calls and tool use
  • Single dashboard for agent activity
  • Correlate tool calls with model outputs
  • See the full picture of what your agents are doing