Tyk Gateway emits two categories of observability signal for MCP traffic: custom metrics dimensions and structured access log fields. Both signals are enriched with the same set of MCP-specific fields, letting you monitor tool call volumes, track latency per primitive, classify errors, and correlate usage across sessions, through the same observability infrastructure you use for your REST APIs.Documentation Index
Fetch the complete documentation index at: https://tyk.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
OpenTelemetry must be enabled on your Tyk Gateway. See OpenTelemetry configuration for setup instructions.MCP fields
The following fields are derived from the JSON-RPC payload on each MCP request. They appear across both signal types.| Field | Description | Example values |
|---|---|---|
mcp_method | JSON-RPC method invoked | tools/call, initialize, resources/read, prompts/get |
mcp_primitive_type | MCP primitive category | tool, resource, prompt |
mcp_primitive_name | Name of the specific tool, resource, or prompt | get_current_weather, search_documents |
mcp_error_code | Gateway-mapped JSON-RPC error code on failure; absent or empty on success | -32001, -32002, -32003 |
Observability signals
| Signal | What it covers | Doc |
|---|---|---|
| Metrics | Custom OTel metric instruments with MCP dimensions for counters and histograms | MCP metrics |
| Access logs | Structured per-request log records with MCP fields included when non-empty | MCP access logs |
Distributed tracing is not currently implemented for MCP traffic. The
TRACING_ENABLED configuration flag exists in the gateway but does not generate spans for MCP requests. Use the metrics and access log signals above to correlate and diagnose MCP traffic.MCP analytics
MCP analytics gives you visibility into how your MCP proxies and their primitives are being used. Analytics are organized at two levels: proxy-level charts compare traffic and errors across your MCP proxies, giving you a fleet-wide view; primitive-level charts break the data down by individual tool, resource, or prompt, showing exactly what agents are calling and where failures are concentrated. Use the filter bar to scope the view to a specific proxy, primitive type, or time window.To access the MCP analytics page, your Tyk Dashboard user account must have both
analytics and mcp permissions.Navigating to MCP analytics
In the Tyk Dashboard, go to Monitoring in the sidebar and select Activity by MCP.
Filters
The filter bar at the top of the page applies to all charts simultaneously. Changing a filter refreshes every chart on the page.
| Filter | Description |
|---|---|
| MCP Proxy | Restricts all charts to a single MCP proxy. Defaults to all proxies. |
| Primitive Type | Filters by primitive type: Tools, Resources, or Prompts. |
| Primitive Name | Filters by a specific primitive name within the selected type. The field is searchable. |
| Resolution | Sets the time bucket for chart data: Hourly, Daily, or Monthly. |
| Date range | Sets the time window for all chart data, in dd/MM/yyyy format. |
Proxy-level charts
The charts in this section aggregate activity at the proxy level. Use them to compare traffic and error rates across your MCP proxies and identify which ones need attention.Activity per MCP
A line chart showing hit count over time, with one line per MCP proxy. Use this chart to compare traffic volumes across proxies and identify usage trends. A proxy with disproportionately high traffic is a good candidate for tighter rate limits; a sudden spike may indicate a misbehaving client.
Errors by MCP
A stacked bar chart showing error count over time, with bars stacked by MCP proxy. Use this chart to identify which proxies are generating errors and whether spikes correlate with specific time periods. Persistent errors on one proxy suggest a configuration or upstream issue; a brief, time-bounded burst may indicate a client retry loop or a transient upstream outage.
Primitive-level charts
The charts in this section break down activity to the individual primitive level: tools, resources, and prompts. Use them to move from knowing that a proxy has a problem to knowing exactly which tool, resource, or prompt is the cause.Most Used Primitives
A horizontal stacked bar chart showing total hits ranked by primitive, highest first. Use this chart to identify which tools, resources, or prompts agents call most frequently. High-volume tools are the best candidates for per-tool rate limits and circuit breaker configuration.
Most Failing Primitives
A horizontal stacked bar chart showing total errors ranked by primitive. Use this chart to pinpoint which primitives have the highest failure rates and may require investigation or circuit breaker configuration.
Slowest Primitives
A horizontal stacked bar chart showing average latency in seconds, ranked by primitive. Use this chart to identify performance bottlenecks in your upstream MCP server. Consistently slow tools are good candidates for per-tool timeouts, which prevent a single slow tool from stalling an entire agent session.
Error Status Codes by Primitive
A stacked bar chart breaking down HTTP error status codes by primitive. Use this chart to diagnose the type of errors occurring at the primitive level and determine whether failures are originating at the gateway or the upstream MCP server.
Analytics data is only recorded for MCP proxies that have analytics recording enabled. If charts show no data for a proxy, verify that analytics recording is configured correctly for that proxy.