Using GitHub MCP Server with Copilot Chat

Completed

Now that you've seen how MCP servers extend GitHub Copilot's capabilities, let's take the next step: combining them with Copilot's agentic mode. This is where Copilot moves beyond responding to prompts and begins acting as a true collaborator, able to plan, execute, and refine workflows.

In this unit, you'll learn:

  • What Copilot's agentic mode is and how it differs from standard use.
  • How MCP servers enhance agent mode by connecting Copilot to external data and tools.
  • The key benefits of combining MCP with agent mode, like automation and reduced manual effort.
  • How to apply best practices to guide Copilot in agentic workflows effectively.

How to use GitHub MCP Server with Copilot Chat

  1. Open Copilot Chat in Visual Studio Code and switch to Agent mode to activate the MCP Server tools.

  2. Click on Select tools to view all the available MCP Server functionalities.

  3. You can now try creating a new issue, summarizing a repository, or getting insights into your work using natural language prompts.

  4. Follow the prompts within Copilot Chat to complete your tasks efficiently.

Copilot's agentic capabilities and MCP

So far, we've seen how MCP servers extend GitHub Copilot by connecting it to external tools and resources. But what happens when we combine this with agent mode? This is where Copilot shifts from being just a responsive assistant to acting more like an independent collaborator.

What are agentic capabilities?

Agentic capabilities give Copilot the ability to:

  • Work independently by carrying out multi-step workflows without needing constant guidance.

  • Make decisions by choosing which tools or approaches to use based on the context it has. Adapt and improve by responding to feedback, adjusting its approach, and iterating on results.

In other words, agent mode allows Copilot to handle tasks in a way that feels more autonomous, almost like having a teammate who understands the bigger picture rather than just following individual instructions.

How MCP makes Agent mode stronger

On its own, agent mode is powerful. But when you add MCP servers, you give Copilot the ability to reach beyond the immediate coding environment. Through MCP, Copilot can:

  • Access external data, APIs, or enterprise tools directly.
  • Stay in context across multiple platforms, without requiring you to switch applications.
  • Complete “agentic loops,” where it dynamically seeks information, analyzes results, and makes informed next steps, all without restarting the process from scratch.

This means Copilot isn't just reacting to a single prompt. Instead, it's working in a cycle: exploring, adapting, and refining until it produces the outcome you want.

Benefits of combining MCP with Agent Mode

When you bring these two capabilities together, you unlock key advantages:

  • Extended context: Copilot can draw on information from multiple systems, not just your code editor.

  • Reduced manual effort: Routine work like opening issues, managing workflows, or running checks can be automated while you focus on higher-value decisions.

  • Seamless integration: Copilot can carry out tasks that span tools and platforms, without needing custom connectors or constant switching.

Best practices for success

To get the most from MCP and agent mode, try these strategies:

  • Be clear about goals: Define what you want Copilot to achieve, and what the final output should look like.
  • Provide context: Share background details about your project or workflow. This could include links, references, or prior steps.
  • Set boundaries: If you want Copilot to stop at planning (and not make changes yet), state that. You can also limit which MCP tools are active.
  • Ask for confirmation: Before big changes, have Copilot summarize its plan so you can approve or refine it.
  • Use prompt files or instructions: Create custom prompt files that guide Copilot on how to behave with specific MCP servers. This keeps its behavior consistent and aligned with your workflows.