Repository navigation
test(verify): add the live MCP verification procedure - #1214
Conversation
A real MCP client (TypeScript SDK + Playwright consent) and the C# SDK client drive /mcp through the real OAuth flow on a sim stack behind a local TLS proxy. Procedure and checks in tools/verify/features/mcp.md.
…harness browser client.ts ignores certificate errors only for a localhost MCP_BASE and then aborts browser requests to any other origin; probe.cs trusts exactly the certificate in MCP_TLS_CERT. The browser comes from resolveBrowser. The empty-password click is labelled as form validation, and call prints the tool's text so replies pipe into jq.
Requires exclusive use of cluckwork-sim and forbids reset.sh on another project. Adds the refusal, step-up, Worker foreign-id, write-only call and protocol commands, a real lot id, and a redaction positive control that finds the marked rows before asserting the marker is absent.
|
All six points from the Codex review are fixed in 019cdb2 and 00a94da. Both are new commits; nothing was force-pushed.
I ran every command in the doc against a live stack built from #1210's head |
Refs #789
Adds a repeatable procedure for checking
/mcpwith real MCP clients against a running sim stack. In-process tests cannot cover discovery behind a real host, dynamic registration, the consent screen in a browser, the token exchange, or real tool calls. This procedure covers them. I ran it against #1209's head before that PR merged, and every step passed.What is in it
tools/verify/features/mcp.mdis the procedure. It lists the prerequisites and the exact commands, has a table of what each check proves, and records the gotchas found on the first run.tools/verify/mcp/holds the clients and the TLS proxy, with a short README.tools/verify/features/README.mdgains one row in the feature map.The three clients
client.tsuses the official TypeScript MCP SDK. Itsconnectcommand runs discovery, dynamic registration, PKCE and the RFC 8707resourceparameter, and Playwright signs in and approves the consent screen with the password. Thetools,callanddisconnectcommands reuse a saved token, anddisconnectdrives Account › Connected apps. This SDK speaks MCP 2025-11-25.probe.csis a file-based app on the C#ModelContextProtocol2.2.0 client, the server's own SDK. It covers MCP 2026-07-28, which the TypeScript SDK does not support yet.--strictit also lints the tool schemas.Gotchas the procedure records
tls-proxy.mjsterminates TLS at the issuer's port, keeps theHostheader and setsX-Forwarded-Proto..env.simneeds three changes:OAuth__Issuer=https://localhost:8495/,AllowedHosts=localhostandTRUSTED_PROXY_CIDR=172.16.0.0/12. Docker's port forward makes the app see the bridge gateway rather than loopback. If the trusted range does not cover it, the app ignoresX-Forwarded-Protoand every OAuth request answersThis server only accepts HTTPS requests.clientMetadata.scope.client.tsnarrows the scope on the authorize URL. Otherwise the write-only check proves nothing.probe.csopts out of the repo's central package versions and lock files in its header.No product code changes. The tracked-file guards (
SchemaDocsTests, including both image-pin tests) pass locally.