inspector/clients/web/src/test/integration/mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall a3dd856380 test: pin the InspectorClient wiring, and correct a false claim about the SDK
Addresses Copilot's round-15 review on #2035.

1. `readResourceFromTemplate` had no regression distinguishing this module
   from the SDK expander it replaced: the existing test uses `report.txt`
   and the transport tests expand separately and call `readResource`, so all
   of them pass either way.

   Writing that test corrected something I had asserted twice in this PR.
   The first version used `foo/bar` -- and verified by reverting the wiring,
   it still passed. `encodeURIComponent` DOES encode `/`, so the SDK expands
   `foobar://events/{topic}` to `foobar://events/foo%2Fbar` exactly as this
   module does. #1919 was the WEB PANEL's own `String.replace`, not the SDK
   expander, which the TUI path was using correctly all along.

   The test now uses `a!b`. `!` is a sub-delim: RFC 6570 requires it
   encoded, `encodeURIComponent` leaves it bare, so the SDK returns
   `foobar://events/a!b` and the assertion fails. Re-verified by reverting
   the wiring -- 2 of the 10 tests fail (this one and the malformed-template
   refusal), where before the change none did.

2. The module summary said "shared by every client" a dozen lines above the
   paragraph explaining the CLI is not a consumer. Now says web and TUI.

Also records, on MAX_VALUE_LENGTH, the audit prompted by round 14: the
per-value ceiling was the ONLY guard lost with `UriTemplate.expand`. The
template-length (1e6), expression-count (1e4) and variable-name-length (1e6)
limits all live in the SDK's `parse()`, which runs from the constructor --
and strict expansion still constructs a `UriTemplate`, so they remain
enforced. The restored limit is the SDK's `MAX_VARIABLE_LENGTH`, read from
the pinned dist rather than assumed.

npm run ci passes.

Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-17 00:59:30 -04:00
..
import test: raise per-file coverage gate to 90 across all clients (closes #1271) (#1532) 2026-06-27 15:26:03 -04:00
node OAuth: re-key store to (server, issuer) + SEP-837/2350/2352 auth UX (#1694) 2026-07-16 16:52:53 -04:00
remote Merge pull request #2037 from modelcontextprotocol/v2/feat/1906-auth-token-url-overrides 2026-08-16 22:49:19 -04:00
duplicate-tool-names.test.ts test: cover the duplicateToolNames server option over a live connection 2026-08-10 20:34:14 -04:00
ema-mock-servers.ts test: cover EMA interactive leg 1 end-to-end (#1693) (#1765) 2026-07-24 13:11:51 -04:00
extensions-mimetype.test.ts Extensions: Connection Info both eras + io.modelcontextprotocol/ui advertisement (Phase 3 of #1633) (#1744) 2026-07-23 10:11:36 -04:00
inspectorClient-advertised-extensions.test.ts Extensions: advertised-extensions toggle in Server Settings (Phase 2 of #1633) (#1743) 2026-07-22 16:23:43 -04:00
inspectorClient-coverage-backfill.test.ts fix(core): register peer-request handlers before connect (#1797) (#1798) 2026-07-27 11:32:23 -04:00
inspectorClient-ema-e2e.test.ts test: cover EMA interactive leg 1 end-to-end (#1693) (#1765) 2026-07-24 13:11:51 -04:00
inspectorClient-excluded-tools.test.ts fix: address Copilot round 2 on the list-salvage path (#1909) 2026-08-15 17:52:36 -04:00
inspectorClient-malformed-list.test.ts fix: stop the exclusion scan writing the rendered list's report (#1909) 2026-08-15 20:38:10 -04:00
inspectorClient-modern-era-oauth.test.ts fix(core): start OAuth on a modern/auto-era connect (#1805) (#1809) 2026-07-27 15:06:01 -04:00
inspectorClient-modern-era.test.ts Logging: per-request log level on modern servers (era fork) (#1629) (#1724) 2026-07-19 17:08:22 -04:00
inspectorClient-oauth-direct-mid-session-e2e.test.ts Auth hardening CI gaps + SDK consolidation: EMA leg 2 / scopes (#1527) (#1725) 2026-07-19 22:36:21 -04:00
inspectorClient-oauth-e2e.test.ts Auth hardening CI gaps + SDK consolidation: EMA leg 2 / scopes (#1527) (#1725) 2026-07-19 22:36:21 -04:00
inspectorClient-oauth-fetchFn.test.ts SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
inspectorClient-oauth-remote-mid-session-e2e.test.ts Auth hardening CI gaps + SDK consolidation: EMA leg 2 / scopes (#1527) (#1725) 2026-07-19 22:36:21 -04:00
inspectorClient-oauth-remote-storage-e2e.test.ts Auth hardening CI gaps + SDK consolidation: EMA leg 2 / scopes (#1527) (#1725) 2026-07-19 22:36:21 -04:00
inspectorClient-oauth.test.ts Auth hardening CI gaps + SDK consolidation: EMA leg 2 / scopes (#1527) (#1725) 2026-07-19 22:36:21 -04:00
inspectorClient-response-rejected.test.ts fix: surface list-fetch failures instead of swallowing them 2026-08-08 16:48:48 -04:00
inspectorClient-subscriptions-era.test.ts fix: only announce the connection if it is still live after the stream open 2026-08-11 00:05:56 -04:00
inspectorClient-tasks-era.test.ts Tasks: io.modelcontextprotocol/tasks extension on modern servers (era fork) (#1731) 2026-07-21 19:17:04 -04:00
inspectorClient-xmcpheader-mirroring.test.ts fix(core): mirror SEP-2243 x-mcp-header args to Mcp-Param-* on tools/call (#1847) 2026-07-28 19:19:48 -04:00
inspectorClient.test.ts Merge pull request #1958 from modelcontextprotocol/v2/fix/unhandled-rejections-progress-tests 2026-08-11 11:17:55 -04:00
listSalvage-era.test.ts fix: return the era-parsed tool, and hide aggregate reports in paginated mode (#1909) 2026-08-15 20:08:03 -04:00
mcp-app-demo.test.ts SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
nullable-fields.test.ts fix: strip the enum null sentinel, and make the preset test cover its wiring 2026-08-15 18:28:38 -04:00
rfc6570-templates.test.ts test: pin the InspectorClient wiring, and correct a false claim about the SDK 2026-08-17 00:59:30 -04:00
test-server-protected-resource.test.ts All of the mid-session and step-up auth work 2026-07-02 16:35:31 -07:00