Setting Up GitHub MCP with VS Code


Recently, I've been using MCP servers more extensively in my daily workflow. I'm a little cautious when it comes to using AI tools for writing code. You know there's this ongoing discussion about whether AI makes you lazy or not.
But it's an undeniable fact that AI will occupy more and more space in our daily lives in the upcoming future, and it already affects our daily affairs. Even now, while I write this blog, I'm getting assistance from Claude to improve my sentences.
Anyway, my main point is that we have to adjust our daily routines to accommodate new AI tools in some areas—and MCP happens to be one of the areas I'm referring to.
So what is MCP? It stands for Model Context Protocol, which allows AI models to interact with various different tools you use in your daily business workflow.
I'm not going into detail about how MCP works—there are lots of tutorials on the internet at the moment—but I want to focus on how I use MCP servers to interact with GitHub through my code editor.

Setting Up GitHub

I'm using VS Code as my IDE, and in order to make this configuration work, you need to follow these steps:
First, visit the related GitHub documentation page where you'll choose the IDE you want to make the connection with: https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/use-the-github-mcp-server
I'm going to show you how you can use MCP locally in your project:

Prerequisites

  1. Install Docker
    Make sure you have Docker installed on your OS. Visit
    for installation instructions.
  2. Create a Personal Access Token
    Go to your GitHub developer settings and create a PAT (Personal Access Token) with (at least) the
    read:packages and repo scopes.

Configuration

Create a .vscode/mcp.json file in the root of your project and copy-paste the following configuration:
{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub Personal Access Token", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } } }
Once you generate your token (by the way, I suggest you generate a classic token as shown in the image below), you can start your MCP server.
token-ss

How to Use It

The way you use it is basically to open the Chat feature of Copilot, make sure you select the agent option, and ask your query.
For instance, I asked the MCP server to detect my current GitHub repo and create a new ticket for me.
mcp-copilot
issue-github
You can do many other things like closing or opening PRs, cloning a repository, or creating a completely new one by only using Copilot with your IDE. This gives you much more control over your project and saves you considerable time.

Beyond GitHub: Other MCP Server Examples

MCP isn't limited to just GitHub integration. There are many other powerful MCP servers you can integrate into your workflow:
Database Integrations:
  • Mongoose MCP
    - Direct interaction with MongoDB databases
  • Neon Database MCP
    - Serverless PostgreSQL database operations
Design and Productivity:
  • Figma MCP
    - Access and manipulate Figma designs directly from your IDE
  • Notion MCP
    - Interact with your Notion workspace and databases
  • Slack MCP
    - Send messages and manage channels
For a comprehensive list of available MCP servers and their capabilities, check out the official VS Code MCP documentation: https://code.visualstudio.com/mcp

Conclusion

MCP servers represent a significant step forward in AI-powered development workflows. By connecting your AI assistant directly to the tools you use daily, you can streamline repetitive tasks and focus on what matters most—building great software.
For more detailed information about MCP server customization and advanced configurations, visit the official VS Code documentation: https://code.visualstudio.com/docs/copilot/customization/mcp-servers
If you have any questions regarding setting up local MCP servers in your VS Code, please let me know.
Cheers!

Last Updated

Aug 27, 2025