Availability
MCP analytics is available from Tyk AI Studio 2.3.0.
Overview
Clients call MCP servers on Tyk Gateway directly, so AI Studio is not on the traffic path. To show MCP usage, AI Studio receives the analytics records of Tyk Gateway through Tyk Pump. This works for Tyk Dashboard connections and for Tyk Gateway (open source) connections. AI Studio keeps the MCP calls and shows them in these places:- The Usage tab of each MCP server. It shows calls, errors, latency, the use of each tool, resource and prompt, and the top Apps.
- The MCP usage section of App pages, in the admin UI and in the AI Portal.
- The MCP traffic panel on the AI Studio dashboard.
read action on analytics.
The usage figures have these limits:
- The error rate counts HTTP errors and the JSON-RPC errors that the gateway finds. A tool result with
isErrorcounts as a successful call. - REST-to-MCP proxies do not report the upstream latency. Use the total latency for them.
- AI Studio does not delete old MCP call records yet, so the table grows with MCP traffic.

Prerequisites
- Tyk Gateway 5.14 or later, with enable_analytics set to
true. - Traffic logs on each MCP proxy:
x-tyk-api-gateway.middleware.global.trafficLogs.enabledset totrue. The proxies that AI Studio creates have this setting. A proxy that someone else created records nothing until they turn it on. - Tyk Pump 1.16 or later.
Create an Ingest Token
- Open the Tyk connection, and go to its Analytics section.
- Click Generate token.
- Copy the token. AI Studio shows it one time only, and stores only its hash.
Authorization: Bearer header with each batch. Rotate token stops the old token at once. Revoke stops all analytics for the connection. Managing the token needs the write action on tyk-connections.
A token belongs to one connection. AI Studio matches records only with the MCP servers of that connection. It counts and drops the records of other APIs. Calls that arrive after you delete their server also count as unknown APIs, and AI Studio drops them.
The Analytics section also shows the time of the last batch. It shows these counts for the last 24 hours:
- MCP records
- Records for unknown APIs
- MCP records without an App
- Non-MCP records dropped
Configure Tyk Pump
Tyk Pump reads the analytics records from Redis and removes them. To send them to AI Studio, use the stdout pump with Vector.Tyk Pump Stdout Pump With Vector
The stdout pump writes each record to the output of the Tyk Pump container. Vector reads that output, keeps the MCP records, and posts them to AI Studio. Add the stdout pump topump.conf:
dont_purge_uptime_data: Set totrueunless you run an uptime pump. Otherwise Tyk Pump looks for MongoDB at start and stops. The environment variable isTYK_PMP_DONTPURGEUPTIMEDATA.omit_detailed_recording: Set totrueto keep the raw requests and responses out of the records.
vector.toml. Set MCP_INGEST_URL to https://<ai-studio-host>/api/v1/ingest/tyk-analytics, and MCP_INGEST_TOKEN to the ingest token:
Ingest Limits
The ingest endpoint accepts a JSON array of records, with no compression or with gzip. It refuses these requests:- A missing, incorrect, or revoked token, or a disabled connection:
401. Tyk Pump drops the batch. - A body that is not a JSON array:
400. Tyk Pump drops the batch. - A body larger than 16 MiB (also after gzip) or with more than 5000 records:
413. Tyk Pump drops the batch. - Another content encoding:
415. Tyk Pump drops the batch. - In the Community Edition, or when the integration is off (TYK_MCP_ENABLED is
false):404. Tyk Pump drops the batch. - More than 20 batches each second for one connection:
429. If AI Studio is busy:503. Tyk Pump tries again.
App Attribution
AI Studio links a call to an App in one of these ways:- The key of the call is a key that AI Studio issued for the App on this connection. AI Studio matches the key hash that the gateway records. If the gateway has
hash_keysoff, it matches the key. - If there is no such key, the key alias names an App that has a key on this connection.