Skip to content

fix(core): preserve exact MCP OAuth resource URIs - #1

Open
ashutoshpw wants to merge 1 commit into
devfrom
oauth-resource-slash
Open

ashutoshpw wants to merge 1 commit into
devfrom
oauth-resource-slash

Conversation

@ashutoshpw

Copy link
Copy Markdown
Owner

Issue for this PR

Closes anomalyco#58956

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Preserves validated MCP OAuth resource strings so a published root resource such as http://localhost:8080 reaches the authorization and token endpoints without an added slash. Explicit trailing slashes remain intact, configured fallback resources still exclude fragments, and transport query handling is retained.

Extends the existing MCP SDK patch's ESM/CJS declarations to allow string results from the resource validator; the SDK already supports these values at runtime.

How did you verify your code works?

  • Regression tests reproduced the trailing-slash failures before the fix.
  • 121 MCP tests passed using the environment's child-process reaper. Without the wrapper, the existing descendant-cleanup test timed out.
  • OAuth suite passed 10 consecutive runs (330 tests).
  • bun run check passed, including all 34 workspace type-check tasks.
  • Core bun run typecheck:tsc and frozen dependency installation passed.
  • Self-review covered resource coverage validation, exact slash preservation, fragment removal, query handling, and both SDK declaration formats. No unresolved findings.

Screenshots / recordings

Not applicable; backend OAuth fix.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-25T15:05:01.784306Z 8ccd04d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

Forward slash is being added on root resource URIs with oauth challenge

1 participant