# Configuring model context protocol in the GitHub Copilot CLI | demo

Source: https://www.youtube.com/watch?v=O73egpvWcpY
Recap page: https://rapidrecap.app/video/O73egpvWcpY
Generated: 2026-02-03T15:34:13.409+00:00

---
## Quick Overview

The presenter successfully configures the GitHub Copilot CLI to connect to a custom third-party LLM service called Context7 by adding it as a Model Context Protocol (MCP) server using the /mcp add command within the CLI, demonstrating how to add an HTTP server type with the necessary API key in the headers.

**Key Points:**
- The presenter demonstrates adding a new MCP server, Context7, to the GitHub Copilot CLI configuration.
- The existing configured servers before the addition were Playwright (local), MicrosoftLearn (http), and Aspire (local).
- The presenter adds Context7 using the `/mcp add` command, specifying it as an HTTP server type (option 3) with the URL `https://mcp.context7.com/mcp`.
- The configuration requires providing the API key within the HTTP headers as a JSON object: `{"CONTEXT7_API_KEY": "YOUR_API_KEY"}`.
- Upon saving the configuration with Ctrl+S, the CLI immediately updates the list to show four configured servers, including the new Context7 server.
- The presenter then requests an ASCII architecture diagram for the underlying Next.js application, which the Copilot CLI generates after querying the newly configured Context7 service.
- The final architecture diagram illustrates the Next.js 15 App Router structure, Client Layer (Browser/React 19), and Middleware for route protection.

![Screenshot at 00:04: The initial splash screen of the GitHub Copilot CLI \(Version 0.0.384\) appears, explaining that Copilot can write, test, and debug code using AI directly from the terminal.](https://ss.rapidrecap.app/screens/O73egpvWcpY/00-00-04.jpg)

**Context:** The video demonstrates how to extend the functionality of the GitHub Copilot Command Line Interface (CLI) by integrating it with external Language Model Context Protocol (MCP) servers, which act as sources for documentation and context for the AI. The presenter, Scott Hanselman, shows how to configure a specific service, Context7, which provides up-to-date documentation for LLMs, using the CLI's management commands available in Windows, Linux (WSL), or Mac environments.

## Detailed Analysis

The demonstration begins with the presenter launching the GitHub Copilot CLI, which shows it is already logged in as user 'shanselman' and is configured with three existing MCP servers: Playwright (local), MicrosoftLearn (http), and Aspire (local). To integrate the Context7 documentation service, the presenter first navigates to the Context7 dashboard online to retrieve the configuration details, including the API endpoint URL (`https://mcp.context7.com/mcp`) and the required API key format for HTTP headers. Back in the CLI, the presenter executes `/mcp add` to begin adding the new server. They name it 'context7', select server type 3 for HTTP, paste the URL, and then enter the necessary HTTP header in JSON format: `{"CONTEXT7_API_KEY": "ctx7sk-2b53e9fa-beca-4b10-9e07-dc3641c6bd4f"}` (using a placeholder key). After saving the configuration with Ctrl+S, the CLI confirms the update, and the MCP Server Configuration list now shows four servers. The presenter then proves the integration works by asking Copilot to generate an ASCII architecture diagram for the current project (a Next.js application), which results in a detailed diagram showing the Client Layer, Middleware handling authentication/routing, and connection to external services like Azure Blob/RSS, confirming that the AI successfully utilized the documentation retrieved via the newly added Context7 server.

### GitHub Copilot CLI Initialization

- Logged in as user shanselman
- Configured MCP servers: Aspire, MicrosoftLearn, Playwright
- Connected to GitHub MCP Server

### Adding Context7 MCP Server

- Used /mcp add command
- Configured as HTTP server (Type 3) with URL https://mcp.context7.com/mcp
- Required API key provided in HTTP headers as JSON payload.

### MCP Server Configuration Update

- MCP configuration saved successfully, changes take effect immediately
- Total servers: 4 (Playwright, MicrosoftLearn, Aspire, context7)

### Testing Context7 Integration

- Asked Copilot to generate an ASCII architecture diagram for the Next.js application
- Copilot queried Context7 libraries (like Next.js documentation) to build the diagram.

### Generated Architecture Diagram Details

- Shows Next.js 15 App Router Backend, Client Layer (Browser/React 19), and Middleware handling Auth Token Validation and Route Protection.

![Screenshot at 00:04: Initial welcome screen for the GitHub Copilot CLI, showing version information.](https://ss.rapidrecap.app/screens/O73egpvWcpY/00-00-04.jpg)
![Screenshot at 00:08: The initial list of configured MCP servers: Playwright, MicrosoftLearn, and Aspire, before adding Context7.](https://ss.rapidrecap.app/screens/O73egpvWcpY/00-00-08.jpg)
![Screenshot at 01:34: The 'Add New MCP Server' configuration screen where the presenter inputs the server name, type \(HTTP selected\), URL, and headers.](https://ss.rapidrecap.app/screens/O73egpvWcpY/00-01-34.jpg)
![Screenshot at 02:01: The presenter inputs the API key JSON structure into the HTTP Headers field during server configuration.](https://ss.rapidrecap.app/screens/O73egpvWcpY/00-02-01.jpg)
![Screenshot at 03:09: The final ASCII architecture diagram generated by Copilot, detailing the Next.js application structure including Client Layer and Middleware.](https://ss.rapidrecap.app/screens/O73egpvWcpY/00-03-09.jpg)
