AI Engineer World's Fair 2025
Real world MCPs in GitHub Copilot Agent Mode
Read the talk
From a README to a pull request with Copilot and MCP
GitHub Copilot agent mode turns a project specification into working files, while MCP adds database context and repository operations to the same interactive workflow.
From a talk by Jon Peck
Before you start: Familiarity with VS Code, Git branches and pull requests, and basic database connection settings will help you follow the demonstrations.
What changes when Copilot takes on a complete task?
How much of building an application can you hand to Copilot while still deciding what it may execute? The progression starts with code completion: suggestions and whole functions appear as you type. Chat expands the scope to a prompt that generates or changes several files. Agent mode extends that interaction into a complete task, with the developer participating as the work proceeds.
In Jon Peck’s demonstration, that participation includes authorizing terminal actions and letting the agent read their results. The agent can then continue toward a larger goal, such as building a new application or refactoring an existing codebase. The working unit becomes the task and its feedback loop, rather than a single generated answer.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Start with a README that another developer could implement
The first concrete example begins with a repository containing a README and no code. The README describes the application and its intended project structure, including environment configuration. It can also specify the database schema, API endpoints, and workflow diagrams. A model with vision can read a diagram supplied as an image; for a model without vision, Mermaid or another text diagram format keeps that information accessible.
With that specification in place, switch Copilot to agent mode, select a model, and request implementation. Peck uses prerecorded demonstrations because of unreliable connectivity. The agent builds the data models, creates app.py, and works on the frontend. When a Continue prompt appears, it is asking permission to interact with the terminal. After an approved command runs, the agent can read its output and react to failures.
Peck reports roughly eight minutes for this prerecorded README-to-app run. The result is a basic travel-reservation application in which he can make reservations and select rooms; styling is left for later iterations. That elapsed time describes this example, not a general benchmark for generating applications.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Give the agent access to external context
Model Context Protocol, or MCP, provides an open interface to external data, references, and advice. Authentication can make that information specific to a developer’s account. Peck points to the MCP servers repository as a place to discover integrations, and to his accompanying deck for the slides and embedded demonstrations.
The connection starts in the IDE. VS Code holds the server configuration, and Copilot uses the configured capabilities to select a suitable tool for a request. A local MCP server might query a database on the developer’s machine or call a web API. A remote server can perform its work in a protected environment and return results to the IDE.
The remote arrangement in the talk mentions SSE, or Server-Sent Events. In the historical MCP transport specification, this is a client–server transport: SSE carries server messages, while HTTP POST carries client messages. It is not a separate protocol for MCP servers to talk to one another.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Configure PostgreSQL access for test fixtures
Choose the integration from the task, not from the catalog. Here the application uses PostgreSQL, and the next task is to build tests using data from the local database as mock data. That makes database access useful before test generation begins.
The demonstrated setup follows a short sequence:
- Find a PostgreSQL MCP server in the server collection. Use its manual installation instructions or its VS Code installation button.
- Approve installation. In this recording, VS Code adds the configuration to
settings.json. - Replace the default connection string with the actual database connection details. Peck’s local PostgreSQL instance is unauthenticated; he calls for proper authentication for a remote or production database.
- Start the local MCP server from the configuration interface.
- Open the tools menu in Copilot chat to inspect the available servers and enable or disable them.
Installing the configuration and starting the server are distinct steps: the running server is what makes the database connection available to the agent.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read the database, then build the tests
Peck found that implicit tool selection was inconsistent: Copilot sometimes inferred that it should use the PostgreSQL server and sometimes did not. His practical adjustment is to name the integration explicitly. The request is to use the Postgres MCP to retrieve database data and create mock.json as a reference for building tests.
Copilot asks permission before connecting. The particular PostgreSQL server used here is read-only, allowing database data to enter the IDE without intentionally mutating the database. That property belongs to this server, not to MCP in general. The matching archived PostgreSQL reference implementation documents SQL queries inside READ ONLY transactions; read-only query behavior is a mutation boundary, not a blanket security guarantee.
The extracted data lands in mock.json. Copilot then continues the ordinary agent workflow, using that file to build tests. Read-only database access still permits local file creation: the source database and the working repository are separate places where different operations are allowed.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Follow the sequence behind the tool call
The database interaction is a sequence of requests, not one opaque retrieval:
- Copilot interprets the prompt and identifies the need for an MCP connection.
- The developer grants permission, and Copilot calls the server.
- The server exposes the database schema so the agent can understand what is available.
- Successive requests identify the relevant tables and retrieve their data.
- Copilot parses the responses, writes the requested files, and carries the returned information into the context for subsequent work.
Schema inspection comes before selecting and reading tables; the responses guide what the agent does next.
Expect to refine the request as that work unfolds. Peck recommends keeping reusable direction in README files, Copilot instructions, and prompt files that can be selected for particular tasks. Those artifacts preserve useful guidance across iterations instead of requiring the developer to reconstruct it in each chat message.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Carry the work into GitHub
The next integration moves from database context to repository operations. The GitHub MCP server lets Copilot perform work that would otherwise require command-line operations or clicks on the website. Peck adds the server to VS Code, supplies a GitHub personal access token, and starts it so requests connect under his identity. The demonstrated credential is obscured. PAT authentication is the workflow shown here; current GitHub MCP documentation also provides OAuth options.
Before handing off the changes, make recurring expectations persistent. Peck uses .github/copilot-instructions.md for standards such as PEP 8, security checks on installed dependencies, and a changelog of the agent’s work. A compact instruction file expressing those practices could contain:
markdown
Follow PEP 8 for Python code.
Run a security check on dependencies you install.
Update the changelog with the changes you make.
The changelog supplements incremental Git commits with an explicit account of what changed at each step. In the demonstration, the agent updates that record before the repository handoff.
Now request the next complete task: use the GitHub MCP to commit the changes on a new branch and create a pull request. Copilot asks permission for the connection and repository operation. The visible approval is a pending action, not evidence of a completed PR: Peck describes the branch-and-PR flow but does not show it in full.
The demonstration stops at that repository handoff, without an application deployment walkthrough. Peck closes the prepared material by pointing back to the accompanying deck, whose final slide collects references for VS Code and MCP installation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
What changes when an issue runs in the background?
The closing question asks how IDE agent mode relates to the Copilot coding agent, which accepts assigned issues through GitHub’s web interface. Would the two become a unified product? Peck leaves that undecided. His contemporary explanation emphasizes different concerns for an individual developer working interactively and a team handing autonomous work to other developers for approval; it is not a commitment to a future product structure.
The background workflow begins by creating an issue and selecting Copilot as its assignee. Copilot performs agentic work asynchronously, exposes a session on GitHub that developers can inspect, and delivers its output through a pull request. The interaction moves from supervising work inside the IDE to reviewing work produced in the background.
MCP remains available in that arrangement. Peck points to the Copilot area of repository settings as the place to supply the background agent’s MCP configuration. External capabilities therefore accompany both workflows, while the place where the developer supervises and reviews the work changes.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
Official reference implementations, archived-server links, and a pointer to the MCP Registry.
Further reading
- Archived PostgreSQL MCP serverRepository
Historical reference implementation documenting schema inspection, read-only SQL queries, and VS Code configuration.
- Historical MCP transport specificationDocumentation
Explains stdio and the original HTTP-with-SSE client-server transport.
The May 2025 announcement introduces background coding work and MCP extensibility.
Updates since the talk
Current official server with installation instructions, local and remote connections, and authentication guidance.
Read the complete timestamped transcript
- 0:00
[upbeat music] Our focus lately, obviously, has been a lot about Copilot and how we're really
- 0:25
bringing all the AI development capabilities to you. Initially, code completion. That was really our, our first step into this, right? And that's the sort of thing that you interact with at the microsecond level.
- 0:37
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.
- 0:55
You're getting it to spit out or change multiple files, uh, and then you're moving on to the next thing you wanna do. Agent mode is really all about doing a complete task and having a deep interaction with that agent as you are building.
- 1:10
So I'll give it something I wanna do. I will interact with the agent as it's working, telling it what it's allowed to do on the command prompt, allowing it to read responses, that sort of thing.
- 1:21
And at the end, I'm gonna do anything from build a complete greenfield app to do a deep refactoring across a large code base, moderately complex tasks.
- 1:33
To give you a real example of what this looks like, here I've got a README. Uh, no code at all, just a README inside a repo. It's got a description of what I'm gonna make.
- 1:43
It's got the project structure lined up. It's the usual stuff I would write to another developer, how I wanna set it up, how I wanna configure the environment variables.
- 1:53
Uh, I might have a database schema in there. I might describe my specific API endpoints that I want to use. Um, and I might even include, you know, some workflow graphs.
- 2:03
Uh, a cool thing about LLMs nowadays with vision capabilities is I could include these as an image, and it'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 di- graph diagramming.
- 2:16
But that README is intended to be very complete so that I can simply go in, 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."
- 2:29
And it's gonna go ahead and crank through. By the way, apologies for using videos on this. Uh, as per yesterday's email, the internet's a little untrustworthy. Obviously, it's been untrustworthy for thirty years or so. [laughing]
- 2:40
More so locally, right? So it's going ahead. It's gonna build my data models. It's gonna spit out, um, the app py. It's gonna start working on the front end, et cetera.
- 2:50
And 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.
- 3:00
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, um, I've actually got a basic working app, obviously not well styled or anything.
- 3:13
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. Right? So that's your basic agent mode interaction.
- 3:24
Now, let's add MCP into this. If you haven't heard of MCP yet, uh, you probably haven't been on the internet in the last year. But a real quick review.
- 3:33
Uh, 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.
- 3:50
Uh, or it might just be advice. So you can connect to all kinds of things from this. Um, and we're just gonna go through every single one of the MCPs out there, and we're gonna go in det-- No.
- 4:00
Okay, I'm not. [laughing] There's thousands, 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.
- 4:16
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.
- 4:29
I'll show that in a second. Copilot is aware of those in the configuration. So when I ask it to do something, it's gonna pick the right MCP for the job, and it's gonna go out and to connect to that MCP and get whatever it has to, it has to get.
- 4:44
That might be a local MCP server running on my machine, which is gonna connect to like a local database maybe, or maybe dial out to a web API to get something.
- 4:52
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.
- 5:07
Either way, how you actually use these is pretty straightforward, right? I'm gonna identify the problem that I'm working with and what technologies are in that. So in this particular case, right, I'm using Postgres.
- 5:19
Uh, maybe what I wanna do is I wanna make tests for this application, and I wanna actually use the data from the local database as my mock data, right?
- 5:27
So I'll go ahead, I'll find the Postgres MCP, I'll add that in, and then I'll ask Copilot to go and do something with it. So let's take a look at what that looks like.
- 5:36
I head out to github/modelcontextprotocol/servers. I search around for one that's gonna do the job. Okie dokie, there's a Postgres MC, PostgreSQL MCP I can use. I could manually install it.
- 5:49
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 gonna activate VS Code, and then it's gonna say, "Okay, can I install this server?"
- 6:02
So it goes ahead, I say, "Yep, install the server." It's gonna 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?
- 6:16
I have to go in, fill it out with my specific information. In this particular case, I don't need an authentication token 'cause I'm using local unauthenti-unauthenticated PostgreSQL. But obviously, if it were a remote database or I was in production, I would be using a proper auth key here.
- 6:30
But I basically fill that out with the data that's gonna be needed. You can see my PostgreSQL connection string there. And then I'm gonna start that server. So there's a little start icon above that.
- 6:42
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.
- 6:59
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.
- 7:08
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 gonna ask Copilot to do something with Postgres, and sometimes I have to be more specific.
- 7:20
I tried this without specifically saying, "Use the Postgres MCP," and sometimes it intuits it and sometimes it doesn't. So I've taken to just being explicit, "Use the Postgres MCP to..."
- 7:30
And here, what I'm gonna 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.
- 7:41
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 'cause I don't want it just going and messing around in my database without it-- without my permission.
- 7:55
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, 'cause it's very safe.
- 8:04
It can read my data, it can use it locally in the IDE, but it's not gonna mutate my database accidentally, right? It'll go ahead. It'll run through all of that, pull the data.
- 8:13
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 gonna actually build out all of your tests using that," et cetera.
- 8:25
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 repeat Saigon isn't working. I thought that was cute.
- 8:37
Anyway, um, 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.
- 8:48
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.
- 9:03
So basically, Copilot and the MCP are kind of handshaking and talking here, saying, "All right, you know, the first thing I wanna do," I know we kind of breezed through it, "is get the database schema.
- 9:12
All right, the next thing is I wanna identify and select from the specific tables. The next thing I wanna do is pull the data from those tables," and those were those successive steps you saw.
- 9:21
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.
- 9:35
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.
- 9:49
So just go ahead and search for those and you'll find more detail on how to do that. One last thing I wanna leave you with here, I've got about four minutes it seems, um, is that GitHub itself has an MCP server.
- 10:01
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.
- 10:16
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.
- 10:26
Um, I go down, I find it. I say, "Go ahead and add it to VS Code." And the thing I'm gonna have to do here is, of course, I want information specific to my account.
- 10:34
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.
- 10:42
Yes, John, remember to blur it. Very good. Um, 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."
- 10:57
I wanna, uh, I wanna point out one thing, by the way, which I consider a best practice. Um, for those of yous that use Copilot instructions, um, which basically is a specially named file in your IDE, .github/copilot-instructions.md.
- 11:11
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, uh, do I want you to run a security check on the stuff you just installed, so on,
- 11:26
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 gonna 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
- 11:44
single step. So that's what you're seeing happen right here, right? But then following that,
- 11:50
I'm just basically gonna 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."
- 12:01
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 in VS Code manually, or going out and creating that PR directly.
- 12:14
And I won't show you the whole flow, but basically it comes up, it says, "All right, I'm gonna make that connection. Am I allowed to? I'm gonna go ahead, create the branch for you, create the PR," et cetera.
- 12:24
All right. With two minutes to go, I'll leave you with this slide of references. Um, so gh.io/fair/mcp, once again, is 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.
- 12:46
And I think I might have time for, like, one question before they drag me off stage. All right, first hand up.
- 12:52
There's, uh, something new called GitHub Co- uh, GitHub Copilot, uh, agent mode, coding agent, something like that, where you basically, uh, assign issues to, uh, to it, uh, through the web UI.
- 13:06
Yes. Thank you for bringing that up.
- 13:08
How, how does it play out? Like, uh, do you think this will be like a unified product in some future or those will, like, run separate?
- 13:15
TBA whether it's gonna 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, um, because of the way that it does work autonomously, and then you can hand it
- 13:32
off and have other developers approve it, sort of team-like interaction. Um, that said, uh, these are always fluid. We'll find out exactly how it works. Uh, for anyone who hasn't seen this yet, this is what I informally call Assign Issue to Copilot, where you can go into GitHub on github.com, you can create a new issue, and then
- 13:51
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.
- 14:06
A quick note on that, um, MCP is available there as well, and you can configure that in your repo settings under the Copilot subset and dump in your Co- your MCP configs there.
- 14:19
Thanks very much for your time.
- 14:20
Thank you.
- 14:20
Cheers. [upbeat music]