feat: make resource optional in MCP endpoint OAuth flow#5267
Merged
saifsmailbox98 merged 2 commits intomainfrom Jan 25, 2026
Merged
feat: make resource optional in MCP endpoint OAuth flow#5267saifsmailbox98 merged 2 commits intomainfrom
saifsmailbox98 merged 2 commits intomainfrom
Conversation
Co-Authored-By: saif@infisical.com <saif@infisical.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
Greptile OverviewGreptile SummaryThis PR makes the Key changes:
The change is backward-compatible and safe because:
Confidence Score: 5/5
Important Files Changed
|
saifsmailbox98
requested changes
Jan 25, 2026
Contributor
saifsmailbox98
left a comment
There was a problem hiding this comment.
fix formatting for sanitized-schema.ts using prettier
Co-Authored-By: saif@infisical.com <saif@infisical.com>
Contributor
Contributor
Author
|
Thanks for testing! Glad it works well. Happy to help with future tasks - just tag me anytime! |
Contributor
|
LGTM! |
saifsmailbox98
approved these changes
Jan 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Context
When connecting to Infisical's MCP server/endpoint, the
resourceparameter was required in the OAuth authorization and finalize endpoints. This caused issues for MCP clients that don't provide this parameter.After investigation, the
resourcefield is not actually used in the backend service logic (ai-mcp-endpoint-service.ts) - it's accepted but never processed. This PR makesresourceoptional across the entire OAuth flow to improve compatibility with MCP clients.Note: The
resourceparameter was already optional in the token exchange endpoint, so this change makes the API more consistent.Changes:
resourceoptional in/oauth/authorizequerystring and/oauth/finalizebody schemasresourceoptional inTOAuthFinalizeDTOresourceoptional inTFinalizeMcpEndpointOAuthDTOresourceoptional in the finalize page query schemaUpdates since last revision
backend/src/db/sanitized-schema.ts(unrelated pre-existing lint issue in main branch)Steps to verify the change
resourceparameter in the OAuth flowresourcestill workHuman Review Checklist
resourceis not used inai-mcp-endpoint-service.ts(grep shows no matches)Type
Checklist
Link to Devin run: https://app.devin.ai/sessions/02e7702a7b53445c94c6d6b0519aa6ef
Requested by: Saifur Rahman (saif@infisical.com)