Configuring Model Context Protocol in the GitHub Copilot CLI | Demo ![rw-book-cover](https://img.youtube.com/vi/O73egpvWcpY/maxresdefault.jpg) > [!note]+ Document Notes > tags: [github-copilot, model-context-protocol, developer-tools] > author: Scott Hanselman > source: YouTube > reference: https://www.youtube.com/watch?v=O73egpvWcpY > date created: 2024-12-19 14:30 > > # ๐Ÿท๏ธ Title: Configuring model context protocol in the GitHub Copilot CLI | demo > <!-- deep-read:sections start --> ## ๐Ÿงฐ Action Inbox - [H1] Install GitHub Copilot CLI and configure MCP servers โ€” improves AI context with real-time documentation #devtools - [H2] Set up Context 7 API integration for project documentation โ€” provides up-to-date framework docs to AI #documentation - [H3] Test MCP server configuration with architecture diagram generation โ€” validates integration is working #testing ## ๐Ÿงญ Table of Contents - [๐Ÿ“ Summary](#-summary) - [๐Ÿ“– Main Content](#-main-content) - [๐Ÿ—’๏ธ Notes](#๏ธ-notes) - [๐Ÿ“š References](#-references) - [๐Ÿ—ฃ๏ธ Paraphrase](#๏ธ-paraphrase) - [๐Ÿ“ฐ Newsletter](#-newsletter) - [โœ… Action Items](#-action-items) - [๐Ÿงช Hypotheses](#-hypotheses) - [๐Ÿ“Š Methodology](#-methodology) - [โ“ Questions](#-questions) - [๐Ÿ”ฎ Future Research](#-future-research) - [๐Ÿ’ก Implications](#-implications) - [๐Ÿง  Learning Styles Assessment](#-learning-styles-assessment) - [๐Ÿ“Š Accessibility Assessment](#-accessibility-assessment) - [๐ŸŒ DEIB Assessment](#-deib-assessment) - [โœ… Logical Validity](#-logical-validity) - [๐Ÿ›ก๏ธ DARVO Analysis](#-darvo-analysis) - [๐ŸŽฏ Conclusion](#-conclusion) ### ๐Ÿ”— References - [GitHub Copilot CLI](https://copilot.github.com) - [Context 7 Documentation](https://context7.com) - [Model Context Protocol Specification](https://modelcontextprotocol.io) ## ๐Ÿ“ Summary - Scott demonstrates configuring Model Context Protocol (MCP) servers with GitHub Copilot CLI to provide AI with real-time access to documentation - Uses Context 7 service to give AI access to up-to-date Next.js documentation for his podcast dashboard project - Shows the complete setup process from API key configuration to generating architecture diagrams with enhanced context - MCP servers can be added, removed, enabled/disabled without restarting, supporting both local and remote configurations - Bottom line: MCP extends AI capabilities by connecting it to live documentation and tools, making responses more accurate and current ## ๐Ÿ“– Main Content Model Context Protocol (MCP) acts as a standardized interface ("like USB for AI") that allows AI models to connect to external data sources and tools. Scott demonstrates this using GitHub Copilot CLI with Context 7, a service providing up-to-date documentation for various frameworks and libraries. The setup process involves using slash commands in Copilot CLI to add MCP servers. For HTTP-based servers like Context 7, you need the server URL and authentication headers in JSON format. The configuration takes effect immediately without requiring restarts. Context 7 specifically provides a dashboard with current documentation for popular frameworks. When integrated via MCP, it allows the AI to access this documentation in real-time, ensuring responses reflect the latest features and best practices rather than potentially outdated training data. The practical benefit is demonstrated through architecture diagram generation, where the AI leverages both the codebase analysis and current Next.js documentation to create accurate technical diagrams that reflect modern patterns and the actual project structure. ## ๐Ÿ—’๏ธ Notes #### โฑ๏ธ [00:00](https://youtu.be/O73egpvWcpY?t=0) โ€” [H1] Introduction to MCP and Available Servers - Key idea: MCP is "like USB for AI" enabling connections to external tools and data - Evidence: "I've got one for Aspire, which is an orchestrator. I've got one for Microsoft Learn that gives us access to documentation. And I've got one for Playright that lets me talk to the browser" #### โฑ๏ธ [00:30](https://youtu.be/O73egpvWcpY?t=30) โ€” [H2] Context 7 Service Overview - Key idea: Context 7 provides a dashboard with up-to-date documentation for AI integration - Evidence: "Context 7, has got this great dashboard filled filled with tons of up-to-date documentations for your AI" #### โฑ๏ธ [01:15](https://youtu.be/O73egpvWcpY?t=75) โ€” [H2] Accessing MCP Configuration in Copilot CLI - Key idea: Use slash commands to manage MCP servers in Copilot CLI - Evidence: "I'm going to hit a slash command. I'm going to type MCP. Enter. Now it shows me those configured MCP servers" #### โฑ๏ธ [01:30](https://youtu.be/O73egpvWcpY?t=90) โ€” [H3] Adding New MCP Server Configuration - Key idea: Add servers by specifying name, type, and connection details - Evidence: "I'm going to go ahead and just a to add a server and then we'll just call this one uh context 7. I'll hit then tab. And this is going to be an HTTP server" #### โฑ๏ธ [02:00](https://youtu.be/O73egpvWcpY?t=120) โ€” [H3] Configuring HTTP Server with Authentication - Key idea: Remote MCP servers require URL and authentication headers in JSON format - Evidence: "Now, we are going to need our context API key, and that's going to be done as some headers. And that's going to require a little bit of JSON" #### โฑ๏ธ [02:45](https://youtu.be/O73egpvWcpY?t=165) โ€” [H2] Immediate Configuration Activation - Key idea: MCP server changes take effect immediately without restart - Evidence: "Changes taking effect immediately. I don't even have to restart anything" #### โฑ๏ธ [03:00](https://youtu.be/O73egpvWcpY?t=180) โ€” [H1] Testing MCP Integration with Architecture Request - Key idea: Request architecture diagram to test MCP server integration with project context - Evidence: "Hey, let's go ahead and uh do a asky architecture diagram for this uh application and make sure that we're using all the latest documentation" #### โฑ๏ธ [03:30](https://youtu.be/O73egpvWcpY?t=210) โ€” [H2] AI Leveraging Context 7 for Documentation Access - Key idea: AI actively queries Context 7 for available libraries and current documentation - Evidence: "So, it's talking already to context 7 and it's asking it what libraries does it have available and whether or not it needs information" #### โฑ๏ธ [04:00](https://youtu.be/O73egpvWcpY?t=240) โ€” [H2] AI Analyzing Project with Enhanced Context - Key idea: AI combines local code analysis with remote documentation for comprehensive understanding - Evidence: "It's looking at TypeScript and JavaScript. It's exploring our tools directory. It's looking at the source code" #### โฑ๏ธ [04:30](https://youtu.be/O73egpvWcpY?t=270) โ€” [H1] Generated Architecture Diagram Results - Key idea: AI successfully creates accurate architecture diagram using current Next.js 15 documentation - Evidence: "Rec recognizes that it's Nex.js15. Nice data flow diagram. That's hot" #### โฑ๏ธ [05:00](https://youtu.be/O73egpvWcpY?t=300) โ€” [H3] MCP Server Management Features - Key idea: MCP servers can be added, removed, disabled, and re-enabled as needed - Evidence: "I can add, remove, some are local, some are not, some are remote and uh I could even disable them and leave them there and bring them back later" #### โฑ๏ธ [05:15](https://youtu.be/O73egpvWcpY?t=315) โ€” [H3] Alternative Configuration Method - Key idea: MCP configuration can be done via command line or by editing JSON directly - Evidence: "Now I can go and do that MCP both at the command line or if I want I can just copy paste the JSON directly into copilot uh and do the MCP config.json" ## ๐Ÿ“š References - [GitHub Copilot CLI](https://copilot.github.com) - [Context 7 Dashboard](https://context7.com) - [Model Context Protocol Documentation](https://modelcontextprotocol.io) - [Next.js Documentation](https://nextjs.org/docs) ## ๐Ÿ—ฃ๏ธ Paraphrase - Model Context Protocol serves as a universal connector that allows AI models to access external tools and documentation sources in real-time - Context 7 provides a centralized service for accessing current framework documentation, eliminating the problem of AI responses based on outdated training data - The GitHub Copilot CLI makes MCP server management straightforward through slash commands, with immediate activation and flexible configuration options ## ๐Ÿ“ฐ Newsletter **Supercharge Your AI Development with Model Context Protocol** The latest GitHub Copilot CLI demo shows how Model Context Protocol (MCP) is revolutionizing AI-assisted development by connecting your AI to live documentation and tools. Think of MCP as "USB for AI" - a standard way to plug external capabilities directly into your AI workflow. **Key Benefits:** - **Real-time Documentation**: Access current framework docs instead of relying on potentially outdated AI training data - **Seamless Integration**: Add MCP servers through simple slash commands with immediate activation - **Flexible Configuration**: Support for both local and remote servers with easy enable/disable options The demo showcases Context 7 integration, providing up-to-date Next.js documentation that helps the AI generate accurate architecture diagrams based on both your codebase and current best practices. **Get Started:** Try the GitHub Copilot CLI at [copilot.github.com](https://copilot.github.com) and explore available MCP servers for your tech stack. Resources: [Learn WordPress](https://learn.wordpress.org/), [Developer Docs](https://developer.wordpress.org/), [WP-CLI](https://wp-cli.org/) ## โœ… Action Items #### DevRel - Developer advocacy: Create MCP server showcase demonstrations, conference talks on AI tooling integration - Education: Develop workshops on MCP configuration, AI-enhanced development workflows - Developer experience: Document MCP server setup patterns, common configuration examples - Developer marketing: Content series on AI productivity tools, MCP ecosystem coverage - Community management: MCP server recommendation threads, troubleshooting forums #### Community - Contributors: MCP server development guides, open source server templates - Maintainers: Integration examples for popular frameworks, documentation standards - Ecosystem: Cross-tool MCP compatibility, server discovery mechanisms #### WordPress - Core: Explore MCP integration for development tooling, AI-assisted code review - Documentation: MCP servers for WordPress documentation access, API reference integration - CLI: WP-CLI MCP server development for WordPress-specific AI context - Developer: AI-enhanced debugging with WordPress-specific context servers ## ๐Ÿงช Hypotheses - MCP integration reduces AI hallucination rates by providing access to current documentation instead of potentially outdated training data - Developers using MCP-enhanced AI tools complete architecture and documentation tasks 40% faster than those using standard AI interfaces - Projects using MCP servers for framework documentation maintain better adherence to current best practices and security standards - The standardized MCP interface will accelerate adoption of AI tools across different development environments and workflows ### ๐Ÿ“Š Methodology - A/B testing comparing development task completion times with and without MCP server integration - Code quality analysis measuring adherence to current framework patterns before and after MCP adoption - Developer survey measuring confidence levels and accuracy perception when using MCP-enhanced AI tools ### โ“ Questions - How does MCP server latency impact the overall AI response experience and developer workflow? - What security considerations exist when connecting AI models to live documentation and internal tool servers? - How can organizations balance the benefits of external MCP servers with data privacy and security policies? ### ๐Ÿ”ฎ Future Research - Development of WordPress-specific MCP servers for theme/plugin development context - Integration patterns for MCP servers with existing CI/CD and development automation workflows - Performance optimization strategies for MCP server networks in large development teams ### ๐Ÿ’ก Implications - Practice: Developers need to evaluate and configure MCP servers as part of AI tool setup - Policy: Organizations require guidelines for approved MCP servers and external AI tool connections - Security: Additional attack surface considerations when AI tools connect to external documentation services - Education: Developer training programs should include MCP configuration and AI tool integration - Funding: Investment in MCP server development and maintenance becomes part of developer tooling budgets ### ๐Ÿง  Learning Styles Assessment Reading level estimate: Flesch-Kincaid Grade Level 8 #### ๐Ÿ‘€ Visual learners - Present: Architecture diagram generation demonstration, CLI interface screenshots - Improve: MCP server architecture diagrams, configuration flow charts, visual API integration maps #### ๐Ÿ”Š Aural learners - Present: Video demonstration with narrated configuration steps - Improve: Audio-only tutorial version, podcast discussion on MCP benefits #### ๐Ÿ—ฃ๏ธ Verbal learners - Present: Clear analogies ("like USB for AI"), step-by-step explanations - Improve: Glossary of MCP terminology, comparison tables with traditional AI approaches #### ๐Ÿงฉ Kinesthetic learners - Present: Hands-on CLI configuration demonstration, immediate feedback - Improve: Interactive MCP server playground, guided setup checklist #### ๐Ÿง  Logical learners - Present: Clear cause-and-effect demonstration of MCP integration benefits - Improve: Performance metrics, decision trees for server selection #### ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Social learners - Present: Community-focused presentation style, shared development context - Improve: Discussion prompts for team MCP adoption, collaboration scenarios #### ๐Ÿง˜โ€โ™€๏ธ Solitary learners - Present: Individual developer workflow focus, self-directed configuration - Improve: Written guide version, self-assessment checklist for MCP readiness #### ๐ŸŒฟ Naturalistic learners - Present: Ecosystem thinking about AI tool integration - Improve: MCP server ecosystem mapping, environmental impact of AI tool usage ### ๐Ÿ“Š Accessibility Assessment #### Screen reader semantics - Present: Clear video narration describes visual actions - Improve: Structured transcript with heading hierarchy, descriptive alt text for CLI screenshots #### Keyboard navigation - Present: CLI-focused demonstration naturally keyboard accessible - Improve: Keyboard shortcuts documentation, navigation tips for screen reader users #### Contrast and readability - Present: Clear terminal contrast in demonstration - Improve: High contrast code examples, larger font size options in documentation #### Text resizing and reflow - Present: Video content scales appropriately - Improve: Text-based tutorial version that reflows properly #### Media and captions - Present: Spoken narration throughout video - Improve: Detailed captions including code snippets, downloadable transcript #### Forms and interactions - Present: Clear CLI command structure - Improve: Form-based MCP configuration alternative, validation feedback ### ๐ŸŒ DEIB Assessment #### Cultural breadth - Present: Universal development tool focus applicable across regions - Improve: Examples from diverse tech stacks and development environments #### Inclusive language - Present: Technical but accessible language, avoids complex jargon - Improve: Define all acronyms on first use, provide plain language alternatives #### Neurodiversity support - Present: Clear step-by-step structure, consistent command patterns - Improve: Visual progress indicators, chunked information presentation #### Representation - Present: Single presenter limiting diversity representation - Improve: Diverse case studies, multiple developer perspectives #### Psychological safety - Present: Encouraging tone, acknowledges speech impediment naturally - Improve: Error handling examples, "safe to experiment" messaging ### โœ… Logical Validity #### Strong reasoning - Deductive strength: Strong logical flow from MCP concept to practical implementation - Inductive strength: Good generalization from specific Context 7 example to broader MCP usage - Causal reasoning: Clear cause-effect relationship between MCP integration and improved AI responses - Analogical strength: Effective "USB for AI" analogy helps conceptual understanding #### Fallacies - Appeal to novelty: Implicit assumption that newer AI tools are automatically better - needs evidence - Hasty generalization: Single successful example doesn't prove universal effectiveness across all use cases #### Tone of voice - Overall tone: Enthusiastic and accessible, with natural conversational style that includes authentic moments like acknowledging speech recognition errors ### ๐Ÿ›ก๏ธ DARVO Analysis - Deny: No denial patterns present - straightforward technical --- ## Full Transcript [00:00] Hey friends, I'm Scott and I'm going to<br>[00:02] use the GitHub Copilot CLI here in<br>[00:05] Windows or on Linux with WSL or your<br>[00:07] Linux machine or on a Mac. And I'm going<br>[00:10] to configure an MCP server. Now MCP,<br>[00:13] model context protocol is kind of like<br>[00:16] USB for AI. You can plug stuff into it.<br>[00:20] And I've got one for Aspire, which is an<br>[00:22] orchestrator. I've got one for Microsoft<br>[00:24] Learn that gives us access to<br>[00:26] documentation. And I've got one for<br>[00:27] Playright that lets me talk to the<br>[00:29] browser. Lots and lots and lots of great<br>[00:32] MCP servers out there. Now, one of my<br>[00:34] favorites is from Context 7. Now,<br>[00:39] Context 7, let me go ahead and bring<br>[00:40] that up over here,<br>[00:43] has got this great dashboard filled<br>[00:45] filled with tons of up-to-date<br>[00:49] documentations for your AI. Now, in this<br>[00:52] case, I'm going to be working on the<br>[00:54] administrative backend, the dashboard<br>[00:56] for my podcast, and it's written in<br>[00:59] Nex.js. So, I might want to install<br>[01:01] Context 7 so that it'll get access to<br>[01:03] the Nex.js documentation. I can log in.<br>[01:07] I can go to my dashboard. I can grab my<br>[01:09] API key and uh read their documentation.<br>[01:12] But what I'm going to do is just go<br>[01:13] directly into Copilot. I'm going to hit<br>[01:14] a slash command. I'm going to type MCP.<br>[01:18] Enter. Now it shows me those configured<br>[01:21] MCP servers. I'm going to go ahead and<br>[01:23] just a to add a server and then we'll<br>[01:26] just call this one uh context 7.<br>[01:30] I'll hit then tab. And this is going to<br>[01:31] be an HTTP server. So I hit three. Now<br>[01:34] our remote server URL for context 7 is<br>[01:37] in their documentation. I'll just<br>[01:38] rightclick to paste it. Now, we are<br>[01:41] going to need our context API key, and<br>[01:44] that's going to be done as some headers.<br>[01:47] And that's going to require a little bit<br>[01:48] of JSON, just a name value pair there in<br>[01:52] JSON. And it'll look kind of like this.<br>[01:54] Now, my key, I'm going to grab and we'll<br>[01:58] erase your API key. And we'll drop that<br>[02:01] in instead. And we'll allow all of the<br>[02:03] tools that are available to us with<br>[02:05] contact 7. And I'll hit control S. Now,<br>[02:08] contact 7 is available right there.<br>[02:10] We'll see if that shows up. There it is.<br>[02:13] Changes taking effect immediately. I<br>[02:15] don't even have to restart anything. So,<br>[02:17] we'll go ahead and hit Q. Hey, let's go<br>[02:20] ahead and uh do a asky architecture<br>[02:22] diagram for this uh application and make<br>[02:24] sure that we're using all the latest<br>[02:25] documentation. You might want to look at<br>[02:27] context 7 because this is a Nex.js<br>[02:30] application.<br>[02:34] That's my dictation application called<br>[02:37] Handy.<br>[02:38] Sometimes it catches my uh my speech<br>[02:42] impediment there. All right. So, let's<br>[02:45] go and see what it says. Now, I happen<br>[02:46] to be using Claude Opus 4.5 here and uh<br>[02:48] we're going to go and resolve the<br>[02:50] context 7 library ID. So, it's talking<br>[02:52] already to context 7 and it's asking it<br>[02:54] what libraries does it have available<br>[02:56] and whether or not it needs information.<br>[02:58] Look, it's looking at TypeScript and<br>[03:00] JavaScript. It's exploring our tools<br>[03:02] directory. It's looking at the source<br>[03:03] code. It's making a decision about what<br>[03:07] context 7 has to offer and it's building<br>[03:09] a asy architecture diagram. It<br>[03:11] recognizes my middleware. It's starting<br>[03:13] to draw all of that. And if you take a<br>[03:15] look at one of my other videos, I<br>[03:17] actually go and share that as a gist,<br>[03:19] which is pretty cool with the slashshare<br>[03:21] command. Now I can go and do that MCP<br>[03:25] both at the command line or if I want I<br>[03:28] can just copy paste the JSON directly<br>[03:30] into copilot uh and do the MCP<br>[03:34] config.json. So you can do that uh as<br>[03:36] well. Let's take a look at what our<br>[03:38] architecture diagram looks like. There<br>[03:40] we go. Rec recognizes that it's<br>[03:42] Nex.js15.<br>[03:44] Nice data flow diagram. That's hot.<br>[03:47] Cool. And those are using our MCP<br>[03:50] servers which I can add, remove, some<br>[03:52] are local, some are not, some are remote<br>[03:54] and uh I could even disable them and<br>[03:56] leave them there and bring them back<br>[03:57] later if I felt like it. That is MCP<br>[04:00] servers with GitHub Copilot CLI. Thanks<br>[04:03] very much. You can check it out at<br>[04:04] copilot.github.com. <!-- deep-read:sections end --> ๐Ÿ“„ **Full text:** ![[Full Document Contents/Articles/Configuring Model Context Protocol in the GitHub Copilot CLI Demo|Configuring Model Context Protocol in the GitHub Copilot CLI | Demo, YouTube]] ## Document Notes ## Highlights - That's my dictation application called Handy. Sometimes it catches my speech impediment there. All right, so, let's go and see what it says. I happen to be using Claude Opus 4.5 here, and we're going to go and resolve the Context 7 library ID. It's talking already to Context 7 and it's asking it what libraries does it have available, and whether or not it needs information. Look, it's looking at TypeScript and JavaScript. ([View Highlight](https://read.readwise.io/read/01khfn2s1ejxs1zp0q1bjb40gq)) - Tags: ๐Ÿ‘ป ai highlighted