. Our focus lately, obviously, has been a lot about Copilot and how we're really bringing all the AI development capabilities to you. Initially, code completion. That was really our first step into this, right? And that's the sort of thing that you interact with at the microsecond level. You're writing code, you're getting suggestions as you type, full function completions, that sort of thing.
We moved on from that into chat and having the ability to interact usually in more or less a one-shot where you're giving it perhaps a complex prompt, you're getting it to spit out or change multiple files, and then you're moving on to the next thing you want to do.
Agent mode is really all about doing a complete task and having a deep interaction with that agent as you are building. So I'll give it something I want to do. I will interact with the agent as it's working, telling what it's allowed to do on the command prompt, allowing it to read responses, that sort of thing.
And at the end, I'm going to do anything from build a complete greenfield app to do a deep refactoring across a large code base, moderately complex tasks. To give you a real example of what this looks like, here I've got a readme, no code at all, just a readme inside a repo.
It's got a description of what I'm going to make. It's got the project structure lined up. It's the usual stuff I would write to another developer, how I want to set it up, how I want to configure the environment variables. I might have a database schema in there. I might describe my specific API endpoints that I want to use.
And I might even include, you know, some workflow graphs. A cool thing about LLMs nowadays with vision capabilities is I could include these as an image and I'll actually be able to read them. If I'm working with a model that doesn't, I'll just use Mermaid or some other text-based graph diagramming.
But that readme is intended to be very complete so that I can simply go in, and I can switch Copilot over to agent mode and pick the model I want to work with and just say something like, "Hey, go ahead and implement this." And it's going to go ahead and crank through.
By the way, apologies for using videos on this. As per yesterday's email, the internet's a little untrustworthy. Obviously, it's been untrustworthy for 30 years or so, but more so local, right? So let's go ahead, it's going to build my data models. It's going to spit out the app pie.
It's going to start working on the front end, et cetera. Something to notice here is whenever those continue boxes come up, that's when it's wanting to interact with the terminal. So it actually has to ask for my permission before it's allowed to continue doing that. But then it'll read the response from the terminal if something goes wrong and react to that.
So at the end of this, and this took in real time maybe about eight minutes, I've actually got a basic working app, obviously not well styled or anything. I'll do that in later iterations, but I can interact with it, I can make travel reservations, I can pick the rooms I want, et cetera.
So that's your basic agent mode interaction. Now, let's add MCP into this. If you haven't heard of MCP yet, you probably haven't been on the internet in the last year, but a real quick review. MCP is Model Context Protocol. It's basically an open protocol. It's kind of an API for AI, if you will.
It allows LLMs to talk to external data sources, external references to get information, which might be general, might be specific to your account if you've added authentication into it, or it might just be advice. So you can connect to all kinds of things from this. And we're just going to go through every single one of the MCPs out there, and we're going to go in detail -- no, okay, I'm not -- there's thousands of people.
Okay, so github.com/modelcontextprotocol/servers is a list of it, by the way, this URL in the bottom right, gh.io/fair/mcp, all of these slides and the embedded videos. So feel free to take pictures, but those will all be available to you immediately. How does this mechanically work? My IDE, in this case I'm using VS Code, has configured in it which MCPs I want to actually use.
I'll show that in a second. Co-pilot is aware of those in the configuration. So when I ask it to do something, it's going to pick the right MCP for the job, and it's going to go on to connect to that MCP and get whatever it has to get. That might be a local MCP server running on my machine, which is going to connect to like a local database maybe, or maybe dial out to a web API to get something.
Or it might even be this MCP to MCP protocol SSE, which I'm not super familiar with, where you basically have that MCP server running on a remote server, so it can be in a protected environment. And then it'll do the work and return it back to your IDE. So either way, how you actually use these is pretty straightforward, right?
I'm going to identify the problem that I'm working with and what technologies are in that. So in this particular case, right, I'm using Postgres. What I want to do is I want to make tests for this application, and I want to actually use the data from the local database as my mock data, right?
So I'll go ahead, I'll find the Postgres MCP, I'll add that in, and then I'll ask Co-pilot to go and do something with it. So let's take a look at what that looks like. I head out to github/modelcontextprotocol/servers. I search around for one that's going to do the job.
Okie dokie, there's a Postgres MC, PostgresQL MCP I can use. I could manually install it. There's instructions here, of course, but one nice thing about using VS Code is a lot of these have a one-click config, where I can just hit that. It's going to activate VS Code, and then it's going to say, okay, can I install this server?
So it goes ahead. I say, yep, install the server. It's going to add that into my settings JSON. And one thing I didn't quite detail here in the video, but just so you know, when it gives it to me initially, it's just a bare sort of connection string default, right?
I have to go in, fill it out with my specific information. In this particular case, I don't need an authentication token because I'm using local unauthenticated PostgresQL, but obviously if it were remote database or I was in production, I would be using a proper octet here. But I basically fill that out with the data that's going to be needed.
You can see my Postgres connection string there. And then I'm going to start that server. So there's a little start icon above that. Sorry, that probably went through quickly. But what that does is it basically starts the local MCP server so that now it's available for me to connect to.
If I ever want to see what I currently have, I can always hit this little tools icon down in the chat area. Sorry, it's small, but it looks like a little tool, you know, hammer and whatever next to each other. And that'll bring up this list of all the MCP servers that are available to it.
I can enable and disable them there and just use that as a reference for what I might be able to do. So knowing that that's there, I'm going to ask Copilot to do something with Postgres and sometimes I have to be more specific. I tried this without specifically saying use the Postgres MCP and sometimes it intuits it and sometimes it doesn't.
So I've taken just being explicit, use the Postgres MCP too, and here what I'm going to ask it to do is to go to that Postgres database, pull the data and then make a mock.json, which I can use as a reference as I build tests. So I can see it goes ahead.
It says, am I allowed to connect to this? So same thing as when I was working in the terminal, I actually have to give it permission to do it because I don't want it just going and messing around in my database without it's without my permission. By the way, one particular thing about this Postgres MCP, not all of them, but this one only functions in read-only mode, which is one of the reasons I like it because it's very safe.
It can read my data, it can use it locally in the IDE, but it's not going to mutate my database accidentally, right? It'll go ahead, it'll run through all of that, pull the data, there we go, it's got the actual data, it's put it into a mock.json and then it proceeds with the rest of the non-MCP agent workflow of I'm going to actually build out all of your tests using that, etc.
So that worked out pretty well. Let's just take a quick look at what mechanically actually happened there, right? Aw, bummer. My little music repeats, Saigon, isn't working. I thought that was cute. Anyway, we basically said to Copilot, hey, go and do something. Copilot itself parses that prompt and identifies the fact that it should be using an MCP for this connection.
It asks for permission from the developer to actually go and do the connection. When it gets that, it calls that MCP server. That MCP then interrogates my database for whatever it needs. So basically, Copilot and the MCP are kind of handshaking and talking here saying, all right, you know, the first thing I want to do, I know we kind of breeze through it, is get the database schema.
All right. The next thing is I want to identify and select from the specific tables. The next thing I want to do is pull the data from those tables. And those were those successive steps you saw. After that, Copilot's parsing all of those responses and putting something into my output.
In this particular case, it's creating those files that I asked it to and then adding it to its successive context so it can do the rest of the work. And the reason I say iterate here is I guarantee your first prompt will not be right, right? Which is one of the reasons I really like using readme files.
And also now you can use Copilot instructions and also put prompt files that you can use selectively into VS Code. So just go ahead and search for those and you'll find more detail on how to do that. One last thing I want to leave you with here, I've got about four minutes it seems, is that GitHub itself has an MCP server.
And the reason I love this is because there's a lot of things that I don't necessarily want to do manually using, you know, GitHub, command line, or Git, or even having to go out to the site and actually click buttons. The MCP server is pretty powerful. And what it lets me do, same workflow by the way, although there is a specific URL for this, I'll give that to you at the end.
I go down, I find it, I say go ahead and add it to VS Code. And the thing I'm going to have to do here is, of course, I want information specific to my account. So you'll see in here, there's a place where you can add your GitHub personal access token.
So you'll just go ahead, you'll generate one of those, you'll drop it in. Yes, John, remember to blur it. Very good. And then you will start that MCP server and that would be connecting as you through your personal access token. So then I can tell it something like, okay, you know, you just went and you did all of this work.
I want to point out one thing, by the way, which I consider a best practice. For those of you that use Copilot instructions, which basically is a specially named file in your ID.github.copilot-instructions.md. You can put in there basically things that you want to go into every single prompt. It's kind of pre-injected, right?
One of the things I like to put in there, aside from all of my standards about, am I using PEP8? Do I want you to run a security check on the stuff you just installed? So on, so on. All those good practices. I like to say, also include a changelog of everything you've done.
That way when agent does work, even though, yes, I'm going to be progressively committing and get sort of a history that way. Having it explicitly add things to the changelog gives me a really good idea of what it did at every single step. So that's what you're seeing happen right here, right?
But then following that, I'm just basically going to say, all right, now that you've done all of that work, go ahead and use the GitHub MCP to commit all of these changes to a new branch and make a PR, right? So one step shot, I can pretty much just say, okay, go ahead and do the stuff I would normally have to do, either through manipulating Git commands or NBS code manually or going out and creating that PR directly.
And I won't show you the whole flow, but basically it comes up. It says, all right, I'm going to make that connection. Am I allowed to? I'm going to go ahead, create the branch for you, create the PR, et cetera. All right. With two minutes to go, I'll leave you with this slide of references.
So gh.io slash fair slash MCP, once again, it's this deck. And the very last slide in this is all of the things that you would care to find out about, about how to work with VS code, how to install MCPs, et cetera. And I think I might have time for like one question before they drag me off stage.
All right. First hand up. There's something new called GitHub code agent, coding agent, something like that, where you basically assign issues to the web UI. Yes. Thank you for bringing that up. How does it play out? Do you think this will be like a unified protocol for some future or is it going to be like separate?
TBA, whether it's going to be totally unified, because I think the concerns of the independent developer versus the concerns of the enterprise are a little bit different. So at the time being, we're visualizing that as a little bit more of an enterprise thing because of the way that it does work autonomously.
And then you can hand it off and have other developers approve it, sort of team-like interaction. That said, these are always fluid. We'll find out exactly how it works. For anyone who hasn't seen this yet, this is what I informally call an sign issue to Copilot, where you can go into GitHub on GitHub.com.
You can create a new issue, and then you can pick Copilot as the assignee. And Copilot will take off, and it'll do a lot of the agentic kind of stuff we just saw. But it does it in the background, provides you a session you can refer to on GitHub.com, but then basically works through a PR and gives you output there.
A quick note on that, MCP is available there as well, and you can configure that in your repo settings under the Copilot subset and dump in your MCP configs there. Thanks very much for your time. Cheers. Cheers. Cheers. Cheers. Cheers. Cheers. you I'll see you next time.