Normalize registered OAuth redirect URL types

KL
1mo ago
+53-5

Summary

  • Normalize Pydantic URL subclasses to AnyUrl in both OAuth registration models.
  • Preserve strict parsing and subclass field overrides.
  • Cover matching, rejection, serialization, and accepted input containers.

Fixes #2687

Checks

  • ./scripts/test (100% coverage; strict-no-cover passed)
  • uv run --frozen pyright
  • uv run --frozen ruff check src/mcp/shared/auth.py tests/shared/test_auth.py
  • Clean English docs build
  • Claude Code CLI review

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.