d0afcb125c
The PR added a configurable `redirect_uri` (proxy/Funnel callbacks) but shipped without tests, and the loopback SSH-tunnel hint stayed hardcoded — actively misleading the exact proxy user the feature targets. - Extract `_resolve_redirect_uri(cfg, port)` so the client-metadata and pre-registration paths derive an identical callback (a mismatch makes the authorization server reject the redirect). - Make `_redirect_handler` redirect_uri-aware: a configured proxy callback reaches this machine on its own, so it no longer prints the `ssh -N -L` loopback guidance. Wired via `functools.partial` — no new global state. - Document `redirect_uri` in the config block. - 14 new tests (red/green TDD): helper resolution + empty-string fallback, metadata + pre-registration for configured/default, AnyUrl normalization, no-client_id skip, client_secret combo, and both SSH-hint branches. ruff clean · 81 passed (tests/tools/test_mcp_oauth.py) · ty baseline unchanged Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>