> ## Documentation Index
> Fetch the complete documentation index at: https://tyk-joancamostyk-patch-12.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Gateway Observability Overview

> An overview of the observability signals Tyk Gateway emits for MCP traffic: metrics dimensions, structured access log fields, and the Dashboard analytics page.

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](/api-management/traces) 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`                                |

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

| Signal          | What it covers                                                                 | Doc                                                           |
| --------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------- |
| **Metrics**     | Custom OTel metric instruments with MCP dimensions for counters and histograms | [MCP metrics](/ai-management/mcp-gateway/mcp-metrics)         |
| **Access logs** | Structured per-request log records with MCP fields included when non-empty     | [MCP access logs](/ai-management/mcp-gateway/mcp-access-logs) |

<Note>
  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.
</Note>

## Dashboard Analytics

Alongside these OpenTelemetry signals, Tyk Dashboard has a dedicated **Activity by MCP** analytics page, covering proxy-level and primitive-level traffic and error charts. See [MCP Analytics](/ai-management/mcp-gateway/mcp-analytics).
