github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

Add support for MCP OAuth for Visual Studio (GHE MCP)

Open dagirard opened this issue 5 months ago • 1 comments

Describe the feature or problem you’d like to solve

Visual Studio cannot connect to GitHub enterprise using OAuth. This is very problematic because PAT access tokens are now restricted to 7 days, on top of being a security issue. (Enterprise policy)

Proposed solution

It would be highly valuable to pre-authorize this in the 1P Entra ID app for Visual Studio, so OAuth can be enabled by default.

I’m happy to help facilitate this - I can connect you with the right contact in the Visual Studio team if needed.

This change would significantly improve the experience for enterprise users (including Microsoft), who currently need to manually create and rotate GitHub PATs on a regular basis and configure them locally in Visual Studio. Moving to a seamless OAuth flow would remove this friction and align with modern authentication practices.

Example prompts or workflows (for tools/toolsets only)

We (Microsoft) primarily use Visual Studio (especially after the DevOps migration, where MCP already supported OAuth). Enabling this would let us work without managing recurring GitHub PATs.

Additional context

VS Code already provides a smooth OAuth experience, and Visual Studio should offer the same. From what we understand, this should only require a change in the 1P app registration.

Feel free to reach out on Teams if helpful.

dagirard avatar Jun 11 '26 06:06 dagirard

Hi there, totally agree on this. Rotating PATs every 7 days is a huge headache.

Just adding my inputs here—to get this working exactly like VS Code, you just need to pre-authorize the Visual Studio GitHub 1P app in Entra ID.

Basically, an Entra ID admin needs to go to Enterprise Applications, find this specific VS app (using its Client ID), and click Grant admin consent.

Once that's done, the normal browser sign-in will work flawlessly via SSO, bypassing the PAT policy completely. Since you already have a contact in the VS team, if you can grab the exact Client ID from them, your Entra ID admins can quickly unblock this for everyone.

Hope this helps!

theradheshyampatil avatar Jun 16 '26 09:06 theradheshyampatil