gitignore icon indicating copy to clipboard operation
gitignore copied to clipboard

feat: Add mcp.json to Visual Studio gitignore exceptions

Open BenjaminMichaelis opened this issue 3 months ago • 3 comments

Reasons for making this change

As mcp's are becoming more common, sharing a workspace configuration of mcp servers is becoming more and more common with the mcp.json file. (https://code.visualstudio.com/docs/copilot/customization/mcp-servers#_add-an-mcp-server)

Adding this file as an exclusion to the default template so that it can be utilized by the editors and shared via source control.

This file can also be picked up by Visual Studio as seen here

Links to documentation supporting these rule changes

  • https://code.visualstudio.com/docs/copilot/customization/mcp-servers#_add-an-mcp-server
  • https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022&WT.mc_id=8B97120A00B57354#file-locations-for-automatic-discovery-of-mcp-configuration

VSCode itself commits this file: https://github.com/microsoft/vscode/blob/main/.vscode/mcp.json

If this is a new template

Link to application or project’s homepage: TODO

Merge and Approval Steps

  • [x] Confirm that you've read the contribution guidelines and ensured your PR aligns
  • [ ] Ensure CI is passing
  • [ ] Get a review and Approval from one of the maintainers

BenjaminMichaelis avatar Sep 23 '25 18:09 BenjaminMichaelis

TBH I'd go as far as removing the .vscode exclusion entirely - that file is meant for sharing/checking-in on a per-repo basis.

baronfel avatar Oct 01 '25 20:10 baronfel

@baronfel updated in https://github.com/github/gitignore/pull/4735/commits/6d24007ad2d7683d49456a33d3a890d01e74681b - decided to make it a specific include to be clear rather than an omit, but open to opinion

BenjaminMichaelis avatar Oct 01 '25 21:10 BenjaminMichaelis

#4706

mdkhakonmdkhakon12-afk avatar Nov 09 '25 20:11 mdkhakonmdkhakon12-afk