I’ve been tinkering with MCP server support in Visual Studio recently, and the latest improvements have helped a bunch. Firstly, you can set up your integration in the IDE, which of course, is entirely the point of a good IDE. I am going to run through the steps of adding the GitHub MCP server.

Set Up a GitHub MCP Server

Add an mcp.json file to your solution or PC, Visual Studio will detect it automatically in the following locations:

  • [SOLUTIONDIR]\.vs\mcp.json [Visual Studio only, for the specified solution]
  • [SOLUTIONDIR]\.mcp.json [Tracked in Source Control]
  • [SOLUTIONDIR]\.vscode\mcp.json [Supports VS Code and is scoped to the solutions]
  • %USERPROFILE%\.mcp.json [Global MCP server configuration, applies to all Visual Studio solutions]

Add the following text to the json file:

{
  "inputs": [
    {
      "id": "github_pat",
      "description": "GitHub personal access token",
      "type": "promptString",
      "password": true
    }
  ],
  "servers": {
    "github": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_pat}"
      }
    }
  }
}

You will note that from the json snippet the MCP server issues docker commands (which will need to be installed). The positive thing about Visual Studio is that it allows you to start and generally manage MCP servers directly with CodeLens controls at the top of each server block.

Shows the Copilot chat window MCP tools list for GitHub.

Seamless authentication was top of mind and so keychain support is baked into the process meaning Visual Studio will pull your credentials for supported MCP servers, today that includes GitHub and Entra ID with more OAuth providers to follow. For GitHub you can start by Editing server inputs to allow you to apply a Personal Access Token which you can retrieve from your GitHub Account.

Shows a MCP server input box for

Use Your MCP Servers

When you open the Copilot Chat panel, look for the Tools dropdown. There you’ll find your connected MCP servers waiting. Hit the arrow to expose a fresh menu, manage your server inputs in the new modal dialog, and watch Copilot pull in project context from your select GitHub repository (or indeed all public repositories).

Note, make sure you’re in Agent Mode (or @ reference the agent while in Ask Mode), this is the only way to talk to, and take action on, your MCP servers from Copilot Chat.

As an aside: MCP’s are still in their infancy, and make me a little nervous, the ecosystem is evolving at warp speed, as is the process and security surrounding its workflow. We will need to tap into community-driven best practices, and bake security checks into every stage of our developer pipelines.

New LLMs for Visual Studio

While I am on this topic it is worth mentioning that Claude Sonnet 4 and Claude Opus 4 are now generally available in Visual Studio, offering enhanced and alternate AI capabilities. I would suggest testing Claude Sonnet 4 in Agent Mode for faster, more focused interactions. Try either Claude Sonnet 4 and Opus 4 in Ask Mode for deeper reasoning of coding issues. However, I would suggest taking a look at the pricing for premium LLMs, Claude Opus 4 is currently 10x more expensive than Claude Sonnet 4.

We’re rapidly approaching the point where picking the right LLM for the task, and the budget, requires its own kind of planning and resource deployment strategy. What, for example, would be more effective: a $200/hour veteran software engineer using a standard model, or a $75/hour rookie armed with a top-tier LLM? My guess is that it will always depend on the situation, but either way, the terrain ahead demands not just adaptation, but a reimagining of how we learn, work, and collaborate alongside with our new crop of tools.

starliner-diner


Comment Section