Skip to main content

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.

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.

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.
FieldDescriptionExample values
mcp_methodJSON-RPC method invokedtools/call, initialize, resources/read, prompts/get
mcp_primitive_typeMCP primitive categorytool, resource, prompt
mcp_primitive_nameName of the specific tool, resource, or promptget_current_weather, search_documents
mcp_error_codeGateway-mapped JSON-RPC error code on failure; absent or empty on success-32001, -32002, -32003
All four fields are populated only for MCP requests. For non-MCP requests the fields are empty or absent, so existing metric instruments and log templates are unaffected.

Observability signals

SignalWhat it coversDoc
MetricsCustom OTel metric instruments with MCP dimensions for counters and histogramsMCP metrics
Access logsStructured per-request log records with MCP fields included when non-emptyMCP 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.
In the Tyk Dashboard, go to Monitoring in the sidebar and select Activity by MCP. 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. Filters
FilterDescription
MCP ProxyRestricts all charts to a single MCP proxy. Defaults to all proxies.
Primitive TypeFilters by primitive type: Tools, Resources, or Prompts.
Primitive NameFilters by a specific primitive name within the selected type. The field is searchable.
ResolutionSets the time bucket for chart data: Hourly, Daily, or Monthly.
Date rangeSets the time window for all chart data, in dd/MM/yyyy format.
When Primitive Type is changed, the Primitive Name filter resets to show all primitives of the new type.

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. Activity per MCP

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. Errors by MCP

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 Used Primitives

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. Most Failing Primitives

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. Slowest Primitives

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. Error Status Codes by Primitive
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.