Skip to content

Conversation

automaton82
Copy link

Motivation and Context

Visual Studio Code MCP server (and others) inject other grant types in OAuth request that are superfluous and can be ignored. As long as authorization_code and refresh_token are present this should be sufficient to work without erroring out.

How Has This Been Tested?

I tested this locally in Visual Studio Code itself, and was able to have OAuth work successfully with these changes.

Breaking Changes

No breaking changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@automaton82 automaton82 requested a review from a team as a code owner September 19, 2025 17:04
@automaton82 automaton82 requested a review from ochafik September 19, 2025 17:04
@automaton82
Copy link
Author

This should solve #1379

@automaton82 automaton82 changed the title Issue 1379 patch Issue 1379 patch - Fix MCP server OAuth not working with Visual Studio Code and others with extra grant_types Sep 19, 2025
@pcarleton
Copy link
Member

overall looks good, please add a test to make sure we keep this behavior in any future refactors

@automaton82
Copy link
Author

overall looks good, please add a test to make sure we keep this behavior in any future refactors

Thank you @pcarleton. Done in 3b7419e

@automaton82
Copy link
Author

Hi just following up @pcarleton @ochafik is there anything else you need to merge this? Let me know happy to help.

Thank you!

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.

2 participants