Skip to content

[TT-18717] Run the MCP API tests on tyk-pro - #115

Merged
konrad-sol merged 6 commits into
mainfrom
TT-18717-parallel-mcp-tests
Nov 13, 2026
Merged

konrad-sol merged 6 commits into
mainfrom
TT-18717-parallel-mcp-tests

Conversation

@konrad-sol

@konrad-sol konrad-sol commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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 (validateMCPBrokerURL in tyk apidef/mcp_oauth_broker.go).

  • confs/nginx.conf: server block selected by name (server_name mcp-tls, 443) proxying to mcp-server:7878. The default server (nginx, wrong.host.badssl.com) is unchanged; the upstream is resolved per request, so nginx starts without mcp-server.
  • certs/test-ca/ca.crt, certs/mcp-tls.{crt,key}: test CA and mcp-tls cert, valid until 2051. Made with openssl: a CA (CA:TRUE, keyCertSign, RSA 2048) whose key was not kept, and a leaf for DNS:mcp-tls (serverAuth) signed by it. To rotate or rename, generate both again.
  • pro.yml, pro-ha.yml: the tyk Gateway trusts the CA via SSL_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-server pins its OAuth fixture issuer/resource to https://mcp-tls.

Raw MCP analytics. The tests read raw records from tyk_analytics_mcp.

  • local-mongo*.env: raw mongo-mcp pump (there was only the aggregate).
  • local-postgres*.env: raw sql-mcp pump unsharded. The Dashboard does not read the raw table.

Protobuf coverage. The separate job covered both serializers. local-postgres*.env sets protobuf on the control-plane Gateway (Mongo keeps msgpack). pro-ha.yml pins the six data-plane Gateways to msgpack, because the RPC analytics purger decodes msgpack only.

After merging

  • Cut a tyk-pro release; downstream pipelines use the latest release.

Verified

  • Test² on this PR: both api-tests jobs pass with every MCP test (Mongo 2082 passed, Postgres 2074 passed).
  • Locally (Docker): nginx starts without mcp-server and follows a recreated mock; https://mcp-tls → 200 with SSL_CERT_DIR set; https://nginx and wrong.host.badssl.com still fail verification; public CAs still trusted.

🤖 Generated with Claude Code

konrad-sol and others added 3 commits November 9, 2026 18:23
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>
@konrad-sol konrad-sol changed the title [TT-18717] Serve mcp-server over HTTPS as mcp-tls [TT-18717] Run the MCP API tests on tyk-pro Nov 12, 2026
konrad-sol and others added 2 commits November 12, 2026 16:01
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>
@konrad-sol
konrad-sol merged commit d749ff4 into main Nov 13, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants