Working with MCP servers in GitHub Copilot Agent mode
By Visual Studio Code
Summary
Topics Covered
- VS Code Adds Full MCP Server Support
- MCP Extends LLMs via External Toolchains
- GitHub MCP Pulls Repo Context Automatically
- Chain MCP Servers for Contextual Chains
- MCP is Open Standard for AI Communication
Full Transcript
Hey everyone, what's up? My name is Liam Hansen. I'm a senior cloud advocate on
Hansen. I'm a senior cloud advocate on the Visual Studio Code developer tools team here at Microsoft and today we're going to be talking all about MCP servers. But first, we have got a great
servers. But first, we have got a great update that has just dropped in VS Code.
We now have the full spec support for MCP servers. What does that mean? Well,
MCP servers. What does that mean? Well,
that's full support for prompts, resources, and sampling. You got
oneclick debug mode for server side development. so much more, including
development. so much more, including authentication or a new authentication model for MCP servers, too. Oh my
goodness, so much going on in such a short amount of time. So, what is an MTP server? Well, MCP stands for model
server? Well, MCP stands for model context protocol. And it is a really
context protocol. And it is a really good way to extend and give LLMs more context using external tooling and tool chain calls. I think it's a really
chain calls. I think it's a really awesome way to add a little bit more context and it's more of a plug-andplay for you. There's thousands of these MCP
for you. There's thousands of these MCP servers available to you. And in this demo today, or in this video rather, I'm going to show you how I am personally using these in my daily development with
a really good example using the GitHub MCP server and Perplexity MTP server in Visual Studio Code. Let me not talk about it. Let me just show you. Let's
about it. Let me just show you. Let's
hop in to VS Code. Okay, so here I am over in Visual Studio Code. Now, I've
got this repository of my personal portfolio website, and the website itself is okay. is pretty good and I'm happy with that. But if somebody wanted to replicate my website and they went to
my readme, they would see well not a lot. They would just see a link. Now
lot. They would just see a link. Now
that's not good. Now what I've done on the repository is opened up an issue.
This issue number five is just stating, hey look, it's great, but we need a read me. We need to give a little bit more
me. We need to give a little bit more context to this repository because that's what you would expect on a GitHub repo. If I go back over to here, you can
repo. If I go back over to here, you can just see there's just a link. What I've
done is I've installed the GitHub MCP server. How did I do that? Well, there's
server. How did I do that? Well, there's
two ways you can do it. You can either go to the repository on GitHub and click the blue button for VS Code and install it, or you can do it the manual way. I
chose the manual way. Now, all I have to do is press command, shift, and P to get the command pallet and open up my user settings JSON file. All that'll do is
open up this file. In here I've got my MCP JSON block and inside there I've got servers. As you can see I've got a
servers. As you can see I've got a couple of servers in here. I've got my Azure MCP server, Perplexity, GitHub and Playright. You can also see that there
Playright. You can also see that there are some tokens. Now these are stored safely inside VS Code. But as you can see some of these are running and some of these are not. How do I know if they're installed or not? Well, I can
open up my command pallet and type in MCP and list servers. Here you can see all the servers I've got which are running and ones that are stopped. This
is where you can see them inside VS Code. You could also open up C-Pilot and
Code. You could also open up C-Pilot and click on the spanner and screwdriver button on the chat window. This will
also bring up everything that I've got installed and ones that I've got selected and not selected. What are we going to be doing in the demo today and how are we going to be using MCP servers? So, let's go back to our
servers? So, let's go back to our readme. What are we trying to do? Well,
readme. What are we trying to do? Well,
we want Copilot to build us a readme using Asia mode, but it needs a little bit more context. We want it to go ahead and call the GitHub MCP server, and we want it to pull in the issue. Now, we've
given it context. It's got the server ready. All I'm going to do is say, "Hey,
ready. All I'm going to do is say, "Hey, Copilot, let's work on issue five." Now,
what Copilot is going to do is it's going to go off and call the MCP server.
And as you can see, it has completed. It
has called the API using this server.
has pulled back the issue and it's given itself a little bit more context. Now,
as you can also see, it's prompted me and there is still a human in the loop, which is super important. This is a really good way to maintain control over what is going on with these agents. So,
I'm going to click continue because this is now wanting to run a ask to perplexity. Now, it's going to ask
perplexity. Now, it's going to ask perplexity what are the best practices.
So, the best practices for writing professional and effective readme for a GitHub project. It has pulled the
GitHub project. It has pulled the context from the previous MCP tool chain run and it's going to take that and put it into this next ask. So I'm going to click continue. So this is a a third
click continue. So this is a a third party and a first party MCP server calling. Now this is a tool chain which
calling. Now this is a tool chain which you can see happening and it's got context throughout the entire run. So
once that has completed, it should hopefully now give me a readme. So we're
in agent mode. We're using GBT 4.1 and it's hopefully going to go off and start creating this readme for me. Here we
are. agent mode is working its magic.
Fantastic. Now, let's see what it looks like. I'm going to open up the preview.
like. I'm going to open up the preview.
So, let's open up the preview readme.
Wow, that looks so much better than what I had before. It's given me a project overview. It's given the motivation, a
overview. It's given the motivation, a quick start. So, if anybody wants to get
quick start. So, if anybody wants to get hold of this, they can go ahead and clone the repository and start working with it. It's given a project structure
with it. It's given a project structure and a road map. Who knows, there may be some more known issues. This is
fantastic. So, I'm going to go ahead and keep this. That is how I'm using MCP
keep this. That is how I'm using MCP servers in my daily development to maintain and create these wonderful applications. It's more of a
applications. It's more of a plugandplay. I could have other MCP
plugandplay. I could have other MCP servers call other APIs and get more information about this. Okay, so there we have it. That is how I'm using MCP servers in my daily development to
extend C-pilot and add a little bit more context to the LLMs. So in a recap, what is MCP? MCP is an open standard that
is MCP? MCP is an open standard that facilitates communication between AI agents, services, tools, and data sources. So, one final ask you, I want
sources. So, one final ask you, I want you to tell me what MCP servers you are using and how you're using them. I hope
you enjoyed the video. Enjoy working
with MCP servers.
Loading video analysis...