MCP (Model Context Protocol) servers are intermediary components that enable AI assistants like GitHub Copilot to connect with external services and perform tasks within those services. They function similarly to browser extensions that enhance browser capabilities, allowing Copilot to access repositories, read files, and execute operations in services like GitHub, Azure DevOps, or local file systems. MCP servers are configured using JSON files that specify server names, types, commands, package names, and available tools. Configuration can be done at user level (in the Copilot installation folder) or project level (in .github/MCP.json or project root). The built-in GitHub MCP server is automatically configured, enabling Copilot to access repositories and files. Additional servers like file system and Context7 can be configured to extend Copilot's capabilities for local file operations and developer documentation respectively.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
8. MCP Servers in GitHub Copilot CLI
Added:Hi friends, welcome to OA studies YouTube channel. This is part 8 in GitHub copilot CLA playlist. In this video we will be discussing about MCP server.
Basically what is MCP server? How to configure it? All those things we will be discussing about. If you haven't watched my previous videos in this playlist, I will strongly encourage you to watch them so that you will get most out of this video.
If you look at agenda, so we are going to discuss about what are MCP servers and why we need them and we can get started with GitHub MCP server. Basically, it's the inbuilt server. We will see practically and how to configure MCP servers for GitHub copilot CLA.
and also a hands-on demo using built-in MCP server which is GitHub MCP server.
So if I go to the next slide that's where basically I want to explain about what are MCP servers maybe with some realtime example.
MCP servers basically helps copilot to connect with external services.
So what that mean? So when I say copilot connect with external services what that mean right to understand that so imagine this right so you will be we will be having browsers right ideally we will have browsers browser are browsers are good enough to show the web pages right but still on top of the browsers we will be using certain extensions always right like Grammarly extension GitHub extension password manager JSON viewer these extensions basically enhance the power of the browser right basically browser will become more powerful the extinction will give the extra capability so you can imagine that way co-pilot is good enough to respond something but if you want the co-pilot to go and connect with some service and then try to do something in that service as well then you need to use MCP servers so for example let's assume um you have a code written in some Python file and that file is in the local then you can give this file to your copilot and ask can you read this code and explain me it will explain you well what if if the same code is there in the GitHub repo in that case copilot by itself cannot go into the GitHub repo and try to read the file and and give the insights to you right that will not happen copilot cannot go into some other service right but if we have GitHub MCP server configured to the copilot then via that service via that MCP server GitHub can the copilot can go into that service and do the task what you wanted to do it maybe even devops in Azure DevOps if you configure Azure DevOps MCP server to your c-ilot then it will basically go inside the Azure DevOps and and and perform the task for you maybe create creation of a work item maybe going through the whole repo and explaining you it can anything right so whenever you want to take this power of copilot or the or the AI and connect this power with some service and and make some tasks to be executed on that service then you have to find MCP server for that purpose and use configure that MCP server so that's how the things are work and uh how the MCP servers basically do that is MCP servers within themselves they will have something called tools using that MCP P servers enable AI to perform the task. If you want to know more about MCP, how to create MCP etc., there is a playlist in my YouTube channel called develop AI agents. So go into that playlist. There is one video about MCP. You can watch them. But this video scope is more about how to configure the MCP for GitHub copilot.
So now when you configure GitHub copilot uh let's assume you configured MCP servers uh to the GitHub copilot CLA then if you use this command / MCP show then that will help you to list on what MCP servers are configured and uh if you closely take a look at this image this is how the MCP servers will appear to you. So for example in this case all these MCP servers are configured by GitHub copilot CLA right all these MCP servers are configured there is a GitHub MCP servers as well that might be inbuilt um MCP server which which came right we will see this even in my terminal as well.
So the GitHub MCP server basically by default configured for the GitHub copilot CLI. What that mean? That means in the terminal in the copilot CLI if you type something go to repo see the python file there and read that file explain me what is there then it will do that it will go into the github and find that repo go into the file read the file and uh and come back with explanation for you. So that capability will come because of this uh GitHub MCP server which comes by default right any other MCP servers basically you have to configure how to configure MCPS we will see in a bit but GitHub MCP server is something by default so it will come by default I will show you that okay now how to configure this MCP servers right how it will look like right basically the MCP servers are nothing but like a JSON file files. So those are simple JSON files and these JSON files will have certain configuration that will tell to the GitHub copilot CLA that this MCP server is configured. Now if user prompts to the AI or the copilot then copilot automatically sends there is a MCP server for it and it will go to that service and execute the task for you. So these MCP servers basically this JSON file you can host at various levels. If you want this if you want this MCP configuration for the copilot to be available in the local completely for every session every project then at a user level you have to configure for that go to the copilot installation path copilot folder will be there then you create a file mcp-config.json and inside that you will put the configuration I will show you how the configuration will look like in a in a in another few seconds. So once you configure MCP at this level then across the projects in your system that MCP server will be available for the copilot but let's assume no I I am I have a folder called maybe demo python and that is my project folder in my local only for that project I want the MCPS to be configured then you need to create there are two ways then one maybe at the project root folder level create MCP.json JSON file and write the JSON configuration there. That is one way or inside the project folder there will be GitHub folder inside that create MCP.json file then that's it. So it will also have a MCP configured for you.
Okay. Now the how the MCP MCP.json file configuration will look like right. So if you see this, if you see this, this is how the MCP configuration will basically look like.
Okay. So you will be having a JSON and this this MCP servers key is basically like a container inside which you can add multiple MCP servers. So right now here one MCP server from here to here.
So in the server name you can give any name any any name there. So instead of server name maybe I can type maybe devops when I'm configuring DevOps MCB server or maybe Azure uh sorry Microsoft learn documentation. So learn documentation I can give there as a name. So that is basically the Microsoft documentation MCP or Azure also has a MCP. So maybe I I I will give the name as Azure there. So anything you can give the name there. Then type local command npx because most of the MCP servers are actually npm packages. So we need to they will run via npx basically. Then the package name itself you will be using there and the tools basically you will be putting star that means all the tools. Now what is tools means? Imagine MCP server is a tool box. Inside this inside that box you have a lot of tools maybe hammer uh screwdriver etc etc. So all the tools I wanted to use from that MCP server so that with the respective service I can perform any task right. So tools are that so MCP servers will contain tools inside of it. So again as I said go to the develop Azure AI agents playlist you will get the more details from there because there is a dedicated video there for the MCP. So basically the MCP.json file will have configuration this way. So you you will be finding the package name. For example you want to interact with Azure. So you will be finding the Azure MCP server package name and you will be using it there right. So this is how it will look like and below if you see this configuration right maybe you guys can try this configuration by your own. So here we are trying to configure file system MCP server. So this file system MCP server basically help you to navigate read write search on the local file system basically. So that package we configured. So the server name we gave as a file system type local command npx all the tools right. So this is this JSON you have to copy paste into your MCP.json files. Okay. So once you do that then you are good that MCP server is configured for you. From that time if you prompt anything then copilate will automatically sense maybe for this task I have to use the MCP then it will use it and connect to the respective service and execute the task.
So remember that. So at a project level github/mcp.json file. So that's where we have to write it. So let's try to see this with a hands-on kind of a thing. So what I will be doing it is let me open a folder. So in my local in the C drive I have a demo I have a demo python and if you see here there is a git. So this is basically the assume that this is my project location.
So this is basically my project location assume that way right and then here I already have dot GitHub folder. So inside that so in the last class we have created this skills. So now if you want to configure the MCP then you have to basically create MCP.json file there. So you will you can right click there add new text file and I can name it MCP dot JSON and hit enter to rename the file and double click to open that file. And here I can copy paste the MCP server configuration.
So I have already copied some NCP server configurations. So if you see here I'm basically configuring one is file system that will basically help you to navigate the local files search everything read and there is something called context 7 MCP this is basically about uh this MCP server make sure to have the latest information about all the developer packages especially fast API etc right so if you use this MCP server and when you prompt for example maybe develop some code using fast API then the most relevant information will be fetched for that particular library via this context X MCP concept context 7 MCP server. So I will be not going detail about them but make sense that I am configuring two MCP servers here. So from here to here one MCP server from here to here two MC another another MCP server right so once I have configured this and let me save these changes now that MCP.json file has that right? So if I go to the terminal now, so now let me start the copilot and when I start the copilot I will execute the /mcp show command to literally see what MCP servers configured there.
Great, my session started. Now I'm using a command MCP show. So this command basically helps to see the MCP servers configured. So when I hit enter and if you see this right if you see the output uh sorry uh yeah so if you see this output right you can see there file system context 7 both are there and as I said GitHub MCP server is something it will come by default.
So now I can click escape to come back to the uh terminal basically the interactive mode.
So this is how we can configure MCP servers. Now if I ask about fast TPA the context 7 MCP server will get used to fetch the latest information about that library and all right but basically let's try to use a hands-on of GitHub inbuilt MCP server. So if I go back to my presentation right so let me go back to my presentation.
So the task is let's use the GitHub copilot MCP server and try below let's try to get the files in the repo and also let's try to get the content of a file and see whether we can get a explanation of the code or not right let's try to do that if you see my GitHub account I have a demo repo inside which there is a main branch and there are two files one is readme.md Another one is hello world. py. If I open hello world py, I have a simple print statement there inside the hello world. py file. So what I'm going to do now? Now I will ask my GitHub copilot CLI from the local from the terminal to to go into the GitHub go into the demo repo and also the main branch and tell me what files are there. Then I will ask what is the code written in the hello world.py file. So let's try to prompt that and see that will happen or not.
Can you use can you go to GitHub repo of mine called demo repo and in main branch see what files are there and give me file names. So if I prompt this technically now the AI system has to go into the GitHub and try to find that repo and do the everything right. So that's where exactly it will try to use the inbuilt GitHub MCP server and do that job. If you if you closely observe here it says that it is using GitHub MCP server right. So it is leveraging the inbuilt GitHub MCP server.
So if you closely observe now we got the output. It says that hello world.py readme.md both the files were there.
Now I will ask if it can read the content inside the python file and tell me what is the code written there.
Can you explain the code inside hello world py file?
from above list.
Let's see what will happen now.
Again it is using GitHub MCP server.
Now it tells that this MCP server has this code print hello world and it is giving the explanation also that it simply print the text hello world to the console etc. So how all this magic is happening because of the MCP server. So let's assume I have MCP server for Azure configured. So I will prompt here uh and tell me what resource groups are there, tell me my subscription ID etc etc. Whatever I prompt if the tools of that particular task is there in the MCP server then you will see that job done.
Let's assume you have MCP server configured for a DevOps. If a tools are available for that then it will execute the job on the DevOps server as well. So that's how the things will work.
Okay. So that's it. I hope you guys find this video helpful. Uh if you are not getting it, please try to watch the video multiple times because this is very important. You should know how to configure the MCP servers so that you can make use of use of this A power to the fullest. Right? Thank you for watching. Have a great day.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

WOW! Judge TURNS THE TABLES on Trump in His OWN $10B LAWSUIT!!!
MeidasTouch
197K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Steam and Xbox Just Dropped The Hammer On PlayStation
OhNoItsAlexx
9K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23