Configuring model context protocol in the GitHub Copilot CLI | demo
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 command, specifying it as an HTTP server type (option 3) with the URL . The configuration requires providing the API key within the HTTP headers as a JSON object: . 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.
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 ( ) and the required API key format for HTTP headers. Back in the CLI, the presenter executes 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: (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.