Repository navigation
[TT-18717] Run the MCP API tests on tyk-pro - #115
Merged
Merged
Conversation
The MCP OAuth broker only accepts plain-HTTP upstreams on loopback, so mcp_ga_oauth_broker_test cannot reach http://mcp-server:7878 from the tyk gateway container. - nginx gets a name-based server block for mcp-tls on 443 that proxies to mcp-server:7878; the default server (nginx, wrong.host.badssl.com) is unchanged. The upstream is resolved per request so nginx still starts without mcp-server. - New test CA (certs/test-ca) signs the mcp-tls certificate; certs/gen-mcp-tls.sh regenerates both. - The tyk gateway trusts the CA via SSL_CERT_DIR=/etc/tyk-test-ca. A single directory keeps the system bundle file and works for every Go version. - mcp-server pins its OAuth fixture issuer/resource to https://mcp-tls, since behind nginx it sees plain HTTP. Only the broker test uses those fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The MCP analytics tests read raw records from tyk_analytics_mcp, as the separate MCP qualification job writes them. Mongo had only the aggregate MCP pump; the Postgres raw pump sharded into dated tables. The Dashboard does not read the raw table, so unsharding it changes nothing else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Revert before merging; verifies github-actions TT-18717-mcp-postgres-dsn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The separate MCP qualification job covers msgpack and protobuf. With it gone, Mongo environments keep msgpack and Postgres environments use protobuf on the control-plane Gateway. Data-plane Gateways stay on msgpack: the RPC analytics purger only decodes msgpack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing runs it; the committed CA and mcp-tls certificate are valid until 2051. The PR description records how they were made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tests now detect a Postgres run themselves, so the github-actions DSN change is no longer needed. This reverts commit be90cfc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andrei-tyk
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Moves MCP API test coverage from the separate serial "Coordinated MCP qualification" job into the regular api-tests job on tyk-pro (TT-18717). The test side is TykTechnologies/tyk-analytics#6479 (same branch name, picked up by this PR's test-square run).
What
HTTPS front for the MCP OAuth broker. The broker accepts plain-HTTP upstreams only on loopback (
validateMCPBrokerURLin tykapidef/mcp_oauth_broker.go).confs/nginx.conf: server block selected by name (server_name mcp-tls, 443) proxying tomcp-server:7878. The default server (nginx,wrong.host.badssl.com) is unchanged; the upstream is resolved per request, so nginx starts withoutmcp-server.certs/test-ca/ca.crt,certs/mcp-tls.{crt,key}: test CA andmcp-tlscert, valid until 2051. Made withopenssl: a CA (CA:TRUE,keyCertSign, RSA 2048) whose key was not kept, and a leaf forDNS:mcp-tls(serverAuth) signed by it. To rotate or rename, generate both again.pro.yml,pro-ha.yml: thetykGateway trusts the CA viaSSL_CERT_DIR=/etc/tyk-test-ca(single directory, so Go's system bundle is kept on every Gateway version).deps_pro.yml,deps_pro-ha.yml: nginx alias and cert;mcp-serverpins its OAuth fixture issuer/resource tohttps://mcp-tls.Raw MCP analytics. The tests read raw records from
tyk_analytics_mcp.local-mongo*.env: rawmongo-mcppump (there was only the aggregate).local-postgres*.env: rawsql-mcppump unsharded. The Dashboard does not read the raw table.Protobuf coverage. The separate job covered both serializers.
local-postgres*.envsets protobuf on the control-plane Gateway (Mongo keeps msgpack).pro-ha.ymlpins the six data-plane Gateways to msgpack, because the RPC analytics purger decodes msgpack only.After merging
Verified
mcp-serverand follows a recreated mock;https://mcp-tls→ 200 withSSL_CERT_DIRset;https://nginxandwrong.host.badssl.comstill fail verification; public CAs still trusted.🤖 Generated with Claude Code