GitHub Embeds Sandboxed Web UIs in VS Code Chat via MCP

Building Interactive UIs in VS Code with MCP Apps — Marlene Mhangami & Liam Hampton, GitHub — AI Engineer

AI Engineer

Returning bundled HTML resource references from MCP tools enables live, interactive webviews inside chat while iframe sandboxing prevents third-party code from altering editor settings.

AI-assisted summary of Building Interactive UIs in VS Code with MCP Apps — Marlene Mhangami & Liam Hampton, GitHub — original source. Check the original for full context.

Source published:

Key ideas

  • Model Context Protocol (MCP) has expanded beyond raw text and ASCII diagrams to support 'MCP apps'—interactive UI components rendered directly inside host chat streams such as VS Code. (3:19)
  • Rather than returning inline HTML, an MCP tool returns execution data alongside a resource reference URI pointing to bundled HTML assets, which the host renders inside an isolated, sandboxed iframe. (5:15)
  • Real-world implementations include Shopify executing full e-commerce checkouts inside conversational interfaces with complete brand parity, and Excalidraw rendering editable architecture diagrams in editor panels. (8:06)
  • A live demo demonstrates a Go runtime profiling bubble sort and Fibonacci with native pprof, transforming raw performance metrics into a scrollable, navigable React flame graph rendered inside VS Code chat. (12:35)

Detailed notes

## Background Published on YouTube by AI Engineer on June 6, 2026, this conference presentation features GitHub developer advocates Marlene Mhangami and Liam Hampton demonstrating how to construct interactive graphical user interfaces inside VS Code using Model Context Protocol (MCP) apps. The video description highlights a live demo where a Go profiling tool renders an interactive, sandboxed flame graph directly within the VS Code chat panel instead of dumping static text or external links.

## TL;DR Marlene Mhangami and Liam Hampton explain the evolution of the Model Context Protocol from returning raw text and ASCII diagrams to delivering rich, interactive web applications directly in chat interfaces. They detail the underlying architecture where an MCP server returns structured data alongside a resource URI that the host environment renders inside an isolated iframe. After examining real-world production use cases from Shopify, Excalidraw, and Figma, Hampton walks through building an MCP app from scratch using agentic skills. The demo showcases a TypeScript MCP server profiling a Go application running bubble sort and Fibonacci sequences, instantly displaying a navigable, sandboxed React flame graph inside GitHub Copilot in VS Code.

## Atmosphere & style The presentation carries an energetic, pragmatic, and approachable tone typical of live developer conference talks, balancing structured architectural breakdowns with lighthearted humor. Mhangami and Hampton transition smoothly between macro concepts and code-level execution, keeping the audience engaged with relatable developer quips about overcompensating with emojis and likening iframes to hamsters in cages. Watching the session feels both instructional and immediate, grounded by the tactile satisfaction of seeing complex profiling data transform into a responsive UI right before the audience's eyes.

## Bulletin - [03:19](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=199s) Model Context Protocol (MCP) has expanded beyond raw text and ASCII diagrams to support 'MCP apps'—interactive UI components rendered directly inside host chat streams such as VS Code. - [05:15](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=315s) Rather than returning inline HTML, an MCP tool returns execution data alongside a resource reference URI pointing to bundled HTML assets, which the host renders inside an isolated, sandboxed iframe. - [08:06](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=486s) Real-world implementations include Shopify executing full e-commerce checkouts inside conversational interfaces with complete brand parity, and Excalidraw rendering editable architecture diagrams in editor panels. - [12:35](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=755s) A live demo demonstrates a Go runtime profiling bubble sort and Fibonacci with native pprof, transforming raw performance metrics into a scrollable, navigable React flame graph rendered inside VS Code chat.

## Key takeaways - [00:14](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=14s) MCP establishes a standardized context delivery protocol consisting of three tiers: hosts (like VS Code), clients (like GitHub Copilot), and lightweight servers providing tools and resources. - [01:15](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=75s) Unvetted public MCP servers can introduce security risks, making curated discovery mechanisms—such as searching @mcp in the VS Code extensions panel—crucial for safe adoption. - [03:19](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=199s) Early MCP implementations suffered from graphical limitations, relying on ASCII art and emojis before the protocol evolved to deliver interactive UI components. - [05:15](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=315s) In an MCP app workflow, the server provides a resource reference URI rather than raw markup, leaving the host responsible for retrieving and mounting the HTML assets. - [06:00](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=360s) MCP apps enable a bidirectional lifecycle where user interactions inside the iframe trigger server updates that push fresh data back to the UI without conversational reprompting. - [08:06](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=486s) Shopify, Excalidraw, and Figma illustrate industry adoption of MCP apps for full in-chat checkouts, editable whiteboard canvases, and dynamic UI component previews. - [09:35](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=575s) Every functional MCP app consists of three architectural components: the Tool (invocation contract), the Resource (bundled frontend HTML), and the Link (associating data to the view). - [10:15](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=615s) Developers can automate the scaffolding of diverse MCP apps using prebuilt skills from Anthropic's official MCP repository executed through the GitHub Copilot CLI. - [11:15](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=675s) Tool visibility settings govern access permissions, specifying whether a given MCP tool can be invoked strictly by the model, strictly by the application UI, or by both. - [11:45](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=705s) Using a local TypeScript MCP server to bridge native Go pprof profiling allows complex algorithmic analysis (e.g., bubble sort and Fibonacci) to execute on demand. - [12:35](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=755s) Displaying profiling data via an interactive React flame graph replaces tedious, multi-turn prompt iterations with direct, visual bottleneck exploration. - [14:21](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=861s) VS Code mounts MCP app UIs within sandboxed iframes to strictly quarantine third-party code, preventing it from hijacking workspace settings or making unauthorized external API requests.

## Detailed walkthrough ### [00:14](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=14s) Introduction to MCP Architecture

Marlene Mhangami and Liam Hampton introduce themselves as senior developer advocates working across Microsoft and GitHub, with Hampton focusing heavily on the Visual Studio Code and GitHub Copilot side of developer advocacy. Mhangami outlines their session agenda: an explanation of what the Model Context Protocol (MCP) is, an exploration of why MCP apps are needed and how they function, followed by a live build-and-run demo in VS Code led by Hampton.

Polling the conference room, Mhangami confirms that a significant portion of the audience is already familiar with MCP before walking through a baseline architectural refresher. Originally created by Anthropic as an open protocol, MCP standardizes how applications deliver relevant context—such as tools, prompts, and resources—to large language models. Mhangami breaks MCP's functional ecosystem down into three distinct tiers:

```mermaid flowchart LR accTitle: MCP Architecture Overview accDescr: Diagram illustrating the three-tier MCP system consisting of Host, Client, and Server. subgraph HostEnv["Host Environment (VS Code)"] H["Host<br/>(e.g., VS Code)"] C["Client<br/>(e.g., GitHub Copilot)"] end S["MCP Server<br/>(Lightweight context/tool provider)"]

H <--> C C <-->|"Maintains 1:1 connection"| S ```

1. **Hosts**: Programs such as VS Code that need to fetch, ingest, or present data originating from MCP servers. Hosts accommodate various client implementations. 2. **Clients**: The specific layer maintaining the direct one-to-one link to individual servers. While the client and host can theoretically be the same program, they often diverge; in the context of their demonstration, VS Code functions as the host, while GitHub Copilot acts as the client. 3. **Servers**: Lightweight executable programs exposing discrete capabilities, system context, or tools through the MCP specification.

Mhangami cautions attendees regarding server discovery and safety: while developers are free to construct their own custom servers or search open repositories, unvetted public MCP servers can harbor security exploits. She advises developers to discover vetted servers directly inside the VS Code extensions panel by searching `@mcp`.

---

[03:19](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=199s) The Text-Only Limitation and the Rise of MCP Apps

Mhangami reflects on the frustrating graphical constraints that defined early MCP tools and LLM interfaces. When MCP first debuted, tool executions returned purely raw textual strings. When prompting an LLM to produce an explanatory architecture diagram, systems routinely fell back on rudimentary ASCII art or strings of text surrounded by excessive emojis. “I feel like we were overcompensating with emojis because we actually couldn't generate diagrams or interesting rich text with MCPs or the tools that we had available to us,” Mhangami notes.

To solve this shortfall, the MCP ecosystem evolved to include **MCP apps**—mechanisms that allow server-side tools to deliver fully interactive, live UI components that render straight into the chat stream. Mhangami demonstrates this shift by comparing an early ASCII diagram prompt against an interactive Excalidraw MCP app. Rather than dumping an inert SVG or static text preview, the Excalidraw server renders a complete canvas inside the chat interface where users can drag nodes, rearrange shapes, and edit label text in place.

---

[05:15](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=315s) Technical Workflow of an MCP App

Mhangami walks through the execution pipeline that powers live components inside host interfaces, showing the distinct separation of responsibilities between the client, host, and server:

```mermaid flowchart TD accTitle: MCP App Execution Lifecycle accDescr: Sequence diagram mapping user chat queries to MCP resource references, sandboxed iframe loading, and bi-directional server updates. subgraph HostLayer["Host Environment (VS Code)"] U["User Prompt"] --> AG["Agent / Client (GitHub Copilot)"] Iframe["Sandboxed iframe (App UI)"] end

subgraph ServerLayer["MCP Server"] Tool["Tool Execution"] Res["Bundled HTML Resource"] end

AG -->|"1. Tool call"| Tool Tool -->|"2. Results + Resource URI"| AG AG -->|"3. Resolve UI reference"| HostLayer HostLayer -->|"4. Fetch HTML"| Res Res -->|"5. Render component"| Iframe Iframe <-->|"6. Bi-directional state/data sync"| Tool ```

- **Query & Tool Selection**: A user submits a query (e.g., “Show me analytics”). The agent (GitHub Copilot) queries the MCP server and selects the appropriate tool. - **Resource Reference Return**: Rather than emitting pure text or an HTML payload inline, the MCP server responds with the standard tool execution output along with a specialized MCP *resource reference* pointing to bundled HTML assets prepared on the server. - **Host Retrieval & Sandboxing**: Crucially, the host itself (VS Code)—not the client—resolves that URI, retrieves the referenced HTML payload, and mounts it within an isolated, sandboxed `<iframe>`. - **Bidirectional Lifecycle**: The rendered iframe application establishes an ongoing communication loop directly back to the MCP server. When users click controls or change inputs inside the iframe, the app queries the server, the server delivers updated data payloads, and the webview updates its views dynamically without forcing the user to leave chat.

Mhangami underlines two primary applications for this workflow: - **Interactive Data Exploration**: Instead of repeatedly typing conversational prompts to query facets of a database or adjust chart parameters, users toggle controls, filter metrics, or switch dimensions directly on rendered interactive charts. - **Integrated E-Commerce**: Rather than forcing a buyer to click out to an external browser tab to purchase items, the chat interface hosts the entire transactional journey.

---

[08:06](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=486s) Real-World Implementations: Shopify, Excalidraw, and Figma

Highlighting industry adoption, Mhangami points to companies deploying live interactive MCP apps:

- **Shopify**: Shopify builds MCP interfaces that preserve complete visual brand parity inside third-party conversational chats: > “If the user is in the chat, the elements that are rendered should be the same and it should give the same brand feel. So, they're really working on the UI elements that are returned so that the user can literally go through the full checkout experience like I was mentioning to be able to actually buy in the chat.” - **Excalidraw**: Extensively used across cloud-diagramming tooling (such as Cloud Code), Excalidraw uses MCP apps to convert LLM output into fully editable whiteboard canvases directly inside editor panels. - **Figma**: Leverages MCP apps to generate and iterate upon editable UI component previews dynamically within chat windows.

---

[09:35](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=575s) Building MCP Apps with Agentic Skills

Liam Hampton takes over to transition from architecture to practical implementation. Surveying the audience on who has already started building MCP apps, only a minimal handful raise their hands.

Hampton explains that the core objective of an MCP app is to maximize developer productivity by keeping the engineer entirely within a single unified workspace like VS Code. To generate and structure the apps he demonstrates, Hampton pulled a scaffolding "skill" from Anthropic's official Model Context Protocol repository and customized it. Feeding this skill file through the GitHub Copilot CLI allows an engineer to automate the scaffolding of various MCP apps, including markdown viewers, live flight-status trackers, color pickers, and interactive flame graph analyzers.

Hampton reviews the foundational architecture laid out in the skill's README, detailing the three core building blocks required for any functional MCP app: 1. **The Tool**: The LLM interface and host environment handling tool discovery, invocation, and arguments. 2. **The Resource**: The bundled UI frontend (written in standard web frameworks such as React, Vue, Svelte, or vanilla JavaScript) compiled down to HTML assets that the server exposes. 3. **The Link**: The protocol contract allowing the host to associate a tool's programmatic data response directly with its corresponding UI resource view.

[11:15](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=675s) Building the Profiler MCP Server in Go and TypeScript

Liam Hampton takes over the walkthrough to explain the mechanics of building an MCP App, starting with how tool invocation works. The generated documentation details exactly how to run the project, providing code examples for handlers and outlining tool visibility—which defines who can invoke a tool at any given moment, whether it is solely the model, both the model and the application, or just the application itself.

```mermaid flowchart TD accTitle: MCP App Profiler Architecture accDescr: Data flow from user prompt through LLM and MCP server to sandboxed iframe UI

subgraph Chat ["VS Code Chat Interface"] Prompt["User: 'Profile my app'"] IFrame["Sandboxed iframe UI<br/>(React flame graph)"] end

subgraph HostServer ["Host & MCP Execution"] LLM["LLM / Copilot"] MCPServer["MCP Server (TypeScript)"] Profiler["Go Profiler (pprof)<br/>5s bubble sort & Fibonacci"] end

Prompt --> LLM LLM --> MCPServer MCPServer --> Profiler Profiler -->|"raw profile data"| MCPServer MCPServer -->|"JSON data + resource ref"| Chat Chat --> IFrame ```

To ground the demo in a realistic development workflow, Liam uses a Go program featuring two classic interview algorithms: bubble sort (repeatedly comparing adjacent array values) and calculating the Fibonacci sequence. The objective is to run a local MCP server that profiles the Go application over a five-second duration to pinpoint where the runtime spends the most time. Under the hood, this leverages Go's built-in `pprof` profiler. The entry point is a local TypeScript server scaffolded via the MCP skill. Within this setup, a central TypeScript file orchestrates compiling, running, profiling the Go application, and outputting the execution data, which is subsequently tied directly to the frontend interface.

- Tool visibility determines access permissions: model-only, app-only, or shared between model and application. - The target code evaluates Big-O complexity using bubble sort and Fibonacci sequence algorithms. - Profiles are collected over a 5-second sampling window using native Go `pprof`. - The MCP server implementation is written in TypeScript on `localhost` to bridge the Go runtime and the client UI.

[12:35](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=755s) Rendering the Flame Graph Inside VS Code Chat

The frontend layer is built as a React application (`flame app`) that utilizes React hooks to consume tool inputs and render profiling results. Profiling outputs are notoriously difficult to digest in raw form; as Liam quips, “Basically, it's a very nasty bit of data you get out at the end, and it's all jumbled up.” Instead of forcing developers into a tedious prompt-and-response cycle—asking the model questions like whether the profile looks acceptable or where time is being wasted—an interactive UI bypasses that friction entirely.

Liam opens GitHub Copilot in VS Code and verifies that the MCP server is running with its registered tool, `profile the app`. Copilot detects the installed flame graph profiler and invokes the tool. Within moments, an interactive UI appears directly inside the chat window. The embedded interface displays top functions, performance summaries, and an interactive flame graph that can be navigated, edited, and resized to fit the chat pane.

- The frontend is structured as a dedicated React application utilizing hooks to receive streaming tool inputs. - The UI exposes top-consuming functions and a navigable flame graph directly inside the chat panel. - Interactive rendering completely eliminates back-and-forth prompt iterations regarding where execution time was spent.

[14:21](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=861s) Security Architecture: Why Sandboxed iframes Matter

Tracing the full lifecycle of the request, Liam recaps the path: the user's prompt ("profile my application") travels to the LLM, the model issues a tool call, the local MCP server runs the profile, and the server returns JSON along with a linked resource reference. The VS Code host catches this reference and dynamically mounts the UI inside a sandboxed `iframe`.

Liam explains the strict isolation model with an analogy:

> “The reason we're doing this in an iframe or the why the iframe is the same reason that you put a hamster in a cage, right? If you don't let it loose in a room, it's just going to chew things up.”

Without this sandbox, rogue UI code could tamper with user VS Code configurations, hijack workspace settings, or fire off unauthorized external network requests. Confining the application inside an iframe ensures that all interactive elements remain completely quarantined within the chat window.

[15:10](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=910s) Closing Remarks and Community Resources

Marlene Mhangami and Liam Hampton conclude the session by inviting attendees to connect with the team. GitHub hosts an on-site booth across the conference floors, and Microsoft is actively showcasing coding-focused agent workflows and workshops at Microsoft Build. Marlene encourages attendees to stop by the GitHub booth or follow along with the developer workshops online before wrapping up the presentation.

- GitHub representatives were stationed on-site at the third and fourth floors. - Further deep-dive code workshops were highlighted for Microsoft Build (June 3–6).

## Notable quotes > [03:19](https://www.youtube.com/watch?v=_xIwFcnHqp4&t=199s) I feel like we were overcompensating with emojis because we actually couldn't generate diagrams or interesting rich text with MCPs or the tools that we had available to us — Marlene Mhangami

## Mentioned Marlene Mhangami, Liam Hampton, GitHub, Microsoft, Visual Studio Code, GitHub Copilot, Model Context Protocol (MCP), Anthropic, Shopify, Excalidraw, Figma, Cloud Code, Go, pprof, TypeScript, React, Vue, Svelte, Microsoft Build

## Video description The demo profiles a Go app running bubble sort and Fibonacci and the result renders as an interactive flame graph directly inside the VS Code chat window. Not a link. Not a text summary. A live iframe you can scroll and query, sandboxed for the same reason you put a hamster in a cage: so it cannot chew up your VS Code settings or call external APIs.

The mechanism: an MCP tool returns both data and a resource reference pointing to a bundled HTML UI. VS Code fetches the HTML and renders it in a sandboxed iframe in chat. The app calls back to the server, the server returns fresh data, the UI updates. Shopify uses this pattern for checkout flows inside chat. Excalidraw uses it for interactive architecture diagrams you can drag and edit. Marlene and Liam walk through building one from scratch using a skill from the MCP repository.

Speaker info: - https://x.com/marlene_zw - https://www.linkedin.com/in/marlenemhangami/ - https://github.com/marlenemhangami

- https://x.com/liamchampton - https://www.linkedin.com/in/liam-conroy-hampton/ - https://github.com/liamchampton

---

Watch along with the corrected transcript, summary, timestamps and resources on this talk's official AIE page: https://ai.engineer/talks/_xIwFcnHqp4-building-interactive-uis-in-vs-code-with-mcp-apps-marlene-mhangami-liam-hampton-github

Join our upcoming AI Engineer conferences (see https://ai.engineer landing page):

- AIEi Shanghai, November 5–6 — the first for meeting top Chinese labs and engineers - AIE CODE in SF, November 10–12 — the top AI Coding conference returns - AIEi Sydney, December 7–8 — the first AIEi run alongside NeurIPS 2026 in Sydney

---

[Source](https://www.youtube.com/watch?v=_xIwFcnHqp4)

Reading summary

Developer advocates Marlene Mhangami and Liam Hampton demonstrate that Model Context Protocol (MCP) apps overcome the constraints of raw text and ASCII outputs by embedding sandboxed, interactive graphical interfaces directly inside host environments like VS Code. Limitations of Text-Only LLM Interfaces (3:19) Early implementations of Anthropic's Model Context Protocol were restricted to returning raw text strings. When prompting language models for visual assets, such as architecture diagrams, systems typically fell back on basic ASCII art or excessive emojis. Mhangami notes that developers were essentially overcompensating with emojis because early tooling could not generate diagrams or rich interactive media within the chat interface. Architecture and Lifecycle of MCP Apps (5:15) The standard MCP structure separates concerns across three tiers: the host (such as VS Code), the client (such as GitHub Copilot, maintaining a 1:1 server connection), and lightweight MCP servers exposing tools. An MCP app expands this mechanism using three core components: the tool for discovery and invocation, the resource representing bundled web frontends (built in React, Vue, Svelte, or vanilla JavaScript), and the link associating programmatic data with the UI view. When a user issues a query, the client calls the tool, and the server returns standard execution output alongside a resource URI pointing to bundled HTML. Crucially, the host environment resolves the URI and mounts the UI rather than the client. This rendered webview establishes a bidirectional communication channel directly with the server, enabling real-time data filtering, chart updates, or complete transactions without leaving the chat interface. Security Sandboxing via iframes (14:21) Because MCP apps render rich web interfaces inside the developer's core workspace, strict execution isolation is necessary. Mhangami warns that unvetted public MCP servers can harbor security vulnerabilities and advises developers to look for vetted servers in VS Code using the `@mcp` search tag. Hampton emphasizes that host applications quarantine rendered UIs inside sandboxed iframes. Comparing an uncontained UI to letting a hamster loose in a room to chew things up, Hampton explains that sandboxing prevents external UI code from modifying user VS Code settings, hijacking workspace configurations, or launching unauthorized external network requests. Practical Implementations in Production and Profiling (8:06) Industry adopters are actively deploying MCP apps: Shopify embeds checkout workflows that match brand design inside third-party chats, Excalidraw lets users edit diagrams directly inside canvas panels, and Figma iterates on editable component previews within the editor. Demonstrating local implementation, Hampton uses an Anthropic scaffolding skill through GitHub Copilot CLI to build a profiling tool. A local TypeScript MCP server executes Go's native `pprof` on bubble sort and Fibonacci algorithms over a five-second window. The server streams the complex JSON data to a dedicated React frontend (`flame app`), rendering a navigable, resizable flame graph directly in the VS Code chat window, which eliminates the need for repetitive conversational prompting to diagnose performance bottlenecks. By pairing sandboxed host iframes with decoupled server tools and resources, MCP apps transition conversational agents from static textual assistants to interactive development environments. However, maintaining secure execution requires strict iframe isolation and vetting discovered servers.

Source quotes

[3:19] Marlene Mhangami: I feel like we were overcompensating with emojis because we actually couldn't generate diagrams or interesting rich text with MCPs or the tools that we had available to us

Original transcript

[0:14] Hi everyone. Uh we'll introduce [0:16] ourselves. My name is Madelaine and I'm [0:19] a senior developer advocate at Microsoft [0:21] and GitHub. [0:22] >> And likewise, I'm Liam Hampton and I [0:25] also am working at Microsoft and GitHub [0:27] on the developer tools advocacy team for [0:28] Visual Studio Code and GitHub Copilot. [0:31] >> Yes. I do similar things but probably [0:33] Liam is more in the VS Code side as [0:36] well. [0:37] Um so just to get started, a bit of an [0:39] agenda of what we're going to cover [0:40] today in this session. We're going to [0:42] talk about what MCP is and then we're [0:44] going to talk about why we need MCP apps [0:47] and what they are. And then Liam is [0:49] going to do some live demos of how to [0:53] use MCP apps, how to build them and use [0:55] them in VS Code. [0:58] So just to get started, maybe I can ask [1:01] uh the question of how many of us know [1:03] what MCP is. [1:05] Okay, that's a good that's a good amount [1:07] of the room. Okay, good. That means that [1:09] we are up to date. I will do a quick [1:12] then summary [1:14] uh to talk about what it is but MCP, of [1:16] course, is an open protocol that [1:19] standardizes how applications provide [1:21] context to LLMs. So it was created by [1:24] Anthropic. [1:25] Uh it is open. Uh it's an open protocol [1:29] so hope thankfully the community can use [1:32] it and it allows us to access context or [1:35] LLMs to access context like tools or [1:38] prompts or resources [1:40] um in different ways. [1:42] So just to get uh [1:44] a bit of an overview of which parts of [1:47] MCP we will be looking at with MCP [1:50] tools. The first thing is that we have [1:53] MCP hosts. And hosts are prob are [1:56] programs like VS Code that want to [2:00] access data from your MCP servers. So, [2:03] you can have different types of hosts, [2:05] um and they will come with different [2:08] clients as well. [2:09] So, the second thing is that we have [2:12] clients and these are sometimes going to [2:16] be the same as the host, but not all of [2:18] the time. And these will maintain the [2:20] one-to-one connection with the servers. [2:23] So, in our case in VS Code, we usually [2:25] encourage people to use the client [2:27] GitHub Copilot. And that's what we'll be [2:29] looking at today. [2:31] And then the final thing would be the [2:32] servers. And with servers, these are [2:35] going to actually lightweight programs [2:38] that expose specific capabilities [2:40] through MCP to provide that context. And [2:44] you can build your own servers or you [2:47] can use any of the many servers that are [2:49] available out there. So, in VS Code, if [2:52] you actually go to the extensions tab [2:54] and you type in at MCP, you'll get of [2:57] different servers that are available. We [2:59] definitely encourage you to use the [3:01] server list that is in VS Code just [3:04] because sometimes you can have some [3:06] security issues if you just go on the [3:08] internet and pick a random server, it [3:11] can have malicious stuff in it. So, we [3:13] recommend using um [3:16] what's there in in VS Code or or GitHub. [3:19] So, when MCP was first released, one of [3:22] the downsides was that you would pretty [3:25] much only have it return text. So, if [3:29] someone was going to ask a question like [3:32] in this case, I would ask a question [3:34] asking it to draw an image, a diagram [3:37] explaining what MCP is. And so, a lot of [3:40] the times in the early days of MCP or in [3:44] general of LLMs, you can go to a GitHub [3:47] repository and most of the readmes have [3:49] ASCII art or they have a lot of emojis. [3:52] I feel like we were overcompensating [3:54] with emojis because we actually couldn't [3:57] generate diagrams or interesting rich [4:00] text with MCPs or the tools that we had [4:03] available to us. [4:05] So, a good question to ask is how can we [4:08] create rich UI experiences in chat? [4:12] So, this is exactly where MCP apps comes [4:15] into play. [4:17] So, MCP apps let server tools return [4:21] rich interactive components that render [4:23] directly in the chat. So, you're able to [4:26] have the server actually return these [4:29] nice UI elements so that you can be able [4:32] to interact with them directly in the [4:33] chat and also just improves the general [4:36] visual element of things as well. [4:39] So, I showed earlier that ASCII art [4:42] example where it was text returned. I [4:45] asked the same question using the [4:47] Excalidraw MCP server, which now uses an [4:51] MCP app to generate a diagram that [4:54] explains MCP. And you can see that it [4:57] generates This is a just a screenshot of [4:59] of what it looks like. But there, [5:01] another really cool thing is that you [5:03] can actually interact with that diagram. [5:05] You can go ahead and move it around um [5:08] even update the text and so on because [5:10] this is a live element that's actually [5:12] available in the chat. [5:15] So, how do How do you MCP apps actually [5:18] work? A good example is that maybe we [5:21] have a user. We start by the user asking [5:24] a question. So, they'll send a prompt. [5:26] Maybe they'll say, "Show me analytics." [5:28] And the agent with the LLM is going to [5:30] decide which tools to call using the MCP [5:34] server. It'll connect and then decide on [5:35] a tool. And then the server is going to [5:38] return the tool results with a UI a [5:42] resource reference. So, MCP has MCP [5:45] resources, and this reference will point [5:48] to an HTML element that is stored that [5:52] the server has generated. Then the host, [5:55] so not the client, it wouldn't be GitHub [5:57] Copilot, but the host, which is VS Code, [6:00] is going to fetch the HTML from that UI [6:03] reference that was referenced from the [6:05] server, and then the host is going to [6:08] render the app inside a sandboxed [6:11] iframe. So, the user at that point is [6:14] able to interact with the iframe in the [6:16] host, and there's really a nice [6:18] separation there between the two. And [6:20] then the app can call back to the server [6:23] back and forth so that you have this [6:25] live interaction experience. And then [6:28] the use the server can return fresh [6:29] data, and the app will update as well. [6:33] Some different use cases for MCP apps. [6:37] One, for example, is data exploration. [6:40] You can think of if you are Imagine if [6:43] we were just typing into a chat all the [6:45] time, and we wanted to understand more [6:47] about a data set. It'd be difficult to [6:49] interact with the database. It'd be [6:51] difficult to always type in and ask new [6:54] questions. Oh, you know, maybe you found [6:57] out information about a trend in [7:01] with the bar chart, and then you wanted [7:03] to find more information about um maybe [7:07] some specific numbers in another chart, [7:09] and actually typing in that information [7:12] is going to be tiring for the user when [7:14] they can just click different buttons in [7:16] the UI in that way. Another thing is [7:18] e-commerce. I think this is a really [7:20] great example where a user maybe in one [7:24] case would want to be able to actually [7:26] buy something in the chat UI. So, maybe [7:29] not as much in VS Code, but in other [7:31] chat UIs like in OpenAI or something [7:33] like that, the user should be able to in [7:37] the chat actually go ahead and buy and [7:39] go through the entire checkout [7:41] experiences in the chat instead of just [7:44] typing out in the past what would happen [7:47] is maybe you type [7:48] you can ask your [7:50] client, can I buy something online? And [7:54] then it would just return links to you [7:56] and then you'd have to navigate over to [7:57] the browser. What we want is to keep the [8:00] user inside the chat and then have them [8:02] interact and have that experience there. [8:06] Who is currently building MCP apps? I [8:10] think this is a good question to ask. [8:12] Spotify is not Spotify, Shopify. [8:16] Shopify is an example of a company [8:19] that's currently building with MCP apps. [8:22] And I listened to a really good talk [8:24] about how they're also focusing on [8:27] keeping the brand experience of a [8:30] company the same as if you were on the [8:32] company's website. If the user is in the [8:34] chat, the elements that are rendered [8:36] should be the same and it should give [8:38] the same brand feel. So, they're really [8:41] working on the UI elements that are [8:42] returned so that the user can literally [8:44] go through the full checkout experience [8:46] like I was mentioning [8:48] to be able to actually buy in the chat. [8:51] Another group that are using MCP apps [8:54] like I mentioned before is Excalidraw. [8:57] That is really popular right now for [8:59] maybe generating architecture diagrams [9:02] or having interactive diagrams. If you [9:04] go go to Cloud Code for example, [9:07] they have really nice MCP apps that use [9:10] Excalidraw to just generate an image [9:13] visualizing things. Figma is another [9:16] company that's using MCP apps. I [9:18] couldn't find a picture of a nice Figma [9:21] MCP app rendered, but generally speaking [9:24] they have components that you can [9:27] generate on the fly with MCP apps. So, I [9:30] think that's all I'm going to cover and [9:32] now Liam is going to go ahead and do our [9:34] live demo. [9:35] >> Yeah, nice one. Thank you. So, everybody [9:37] put their hand up when Marlon asked [9:39] who's using MCP or who knows what MCP [9:41] is. Who's using MCP apps already? [9:45] Okay, there's like all right, perfect. [9:48] Uh shout at the back if you can't see [9:49] this. [9:51] Um but essentially an MCP app is going [9:52] to allow us to really interact or stay [9:54] within one context such as VS Code. So, [9:57] the way that I do this is I actually [9:59] borrowed borrowed a skill which is on [10:01] the Model Context Protocol repository [10:03] online. So, it's from Anthropic. I [10:05] edited it a little bit and I ran it [10:07] through GitHub Copilot CLI. That allows [10:10] me to spit out a number of different MCP [10:12] apps. So, in this repository here I've [10:14] got a flame graph one. That's the one [10:15] we're going to be showing today. Uh but [10:17] I've got a markdown viewer, flight [10:18] status, um color picker, etc. Just the [10:21] gen generic ones that you just go [10:22] through when you're starting to build [10:23] these projects. So, starting with this [10:26] uh readme, you can see that there is [10:28] three main parts to an MCP app. You've [10:30] got the tool which is the LLM itself and [10:33] the host, i.e. at the moment VS Code. [10:35] You've got the resource which is then [10:37] the bundled HTML HTML UI which you're [10:40] going to be putting together. That could [10:41] be in React, that could be in Vue, [10:43] whatever, however you want to render [10:44] your UI. Uh and then you've got the link [10:46] between the two. So, the host and the [10:48] MCP itself or the server are going to [10:51] recognize the link between having the [10:52] actual data response and a UI being [10:55] available to render. [10:57] So, there's good ways you can do this. [10:58] Like I said, you've got React, you've [10:59] got vanilla JS, you've got Vue, Svelte, [11:01] etc. So, you can just go through this [11:03] whole skill. This is going to basically [11:04] tell Copilot CLI or Claude or whatever [11:07] AI tooling that you're using how to run [11:09] this or what to do when it comes to [11:11] running this skill. Uh it's going to set [11:13] it up in a certain way uh and it's going [11:15] to tell you exactly how to run it as [11:17] well and how it should be run with code [11:19] examples such as handlers, tool [11:20] visibility, [11:22] um so whether it's just the model that [11:23] can call the application, whether it's [11:25] the model and the app, or whether it's [11:26] just the app. So, that's who invokes the [11:28] tool at any given point. [11:31] So, for this example I'm going to be [11:32] using a Go file. I'm a Go engineer. I [11:34] write a lot of Go code, but all I really [11:36] care about in here is a bubble sort [11:38] algorithm. So, just comparing an array [11:40] values together, pretty standard in any [11:42] coding interview. Uh and then we've got [11:44] the Fibonacci sequence as well. So, n + [11:47] 1. This is like big O. So, essentially [11:48] just adding to the next one before it. [11:51] What I'm doing there is I'm going to use [11:52] an MCP server to profile the application [11:55] code over 5 seconds to see where is the [11:57] time being spent most in this [11:59] application. As any profiling would do, [12:01] this is using Go pprof, so the [12:05] underlying profile that you get in Go. [12:07] But, essentially the MCP server is [12:08] running localhost. This is the entry [12:10] point in here. It's just a server that [12:12] I'm running locally. [12:13] That then calls out to the server [12:15] TypeScript. This is all written in [12:16] TypeScript [12:18] as per the skill that was enabled. Of [12:21] this entire file, this is the one that [12:23] really matters the most, where the MCP [12:25] is going to bundle up my Go program, run [12:27] it, profile it, and spit out some data. [12:30] And it's at that point that the UI is [12:32] then linked to the MCP server itself to [12:35] render the front end. I Over here, we [12:38] have the React app flame app, which is [12:40] using hooks in React. And in here, we [12:43] can see that we're going to look at the [12:45] receiving the tool input. We got the [12:47] results. We got the um [12:50] uh where it's spending basically most of [12:51] its time and the flame graph itself. So, [12:53] who who who here has used flame graphs [12:55] or [12:56] touched them or kind of know? Basically, [12:58] it's a very nasty bit of data you get [12:59] out at the end, and it's all jumbled up. [13:02] Um [13:03] this is a really nice way to profile and [13:05] see how it's working. So, I'm going to [13:06] open up GitHub Copilot and my make sure [13:09] my MCP server is running. I have it [13:11] installed here, and there is one tool [13:13] for it. So, profile the app. Hopefully, [13:15] if I go and ask GitHub Copilot, it [13:17] should still be working. It should [13:19] recognize that it needs to call the tool [13:21] itself. [13:23] So, I'll just give this just a moment to [13:24] run. There we go. It's noticed I've got [13:26] the flame uh flame graph profiler [13:28] installed. [13:30] Should be using this, loading the MSP [13:31] app. [13:35] Give it just 1 second to load. There we [13:38] go. We can close this. Here, this is [13:40] what an MSP app is really looking like [13:41] inside the chat window. So, it's [13:43] rendered out a UI in an iframe. We can [13:46] look at the top functions and the [13:47] summary of how this is running. This can [13:50] be edited and then run down and sort of [13:52] massaged as you want to make it fit your [13:54] chat window. Mine is pretty big. Uh but [13:56] this gives a general overview of exactly [13:59] what they're looking like and how you [14:00] can match them. Typically, what I would [14:02] be doing with this data is asking my AI [14:04] models is this good? Is this bad? Where [14:06] am I spending my time? There's a lot of [14:08] back and forth. [14:09] With a UI app that we have inside an [14:11] iframe, you are just eliminating that. [14:13] You're actually getting rid of it. You [14:14] just have it all available to you in [14:16] here. So, you can see where it's [14:17] spending most of its time in the [14:18] functions, etc., etc. So, that's a [14:21] really good way to use it. Now, I wrote [14:24] a very rudimentary drawing, which was a [14:26] little bit better [14:27] um on Marlene's slide here. But [14:29] essentially, what I've done is I said [14:30] profile my application. That has been [14:32] sent to the LLM model, which has then [14:35] said I need to call this tool. The MSP [14:37] server's run, gives me back some JSON [14:39] data, passed it to the host. The host [14:41] has recognized that there's a resource [14:43] to link and therefore it has been [14:45] rendered in an iframe in the chat [14:47] window. The reason we're doing this in [14:48] an iframe or the why the iframe is the [14:52] same reason that you put a hamster in a [14:53] cage, right? If you don't let it loose [14:55] in a room, it's just going to chew [14:56] things up. You don't want this [14:58] application to interact with your VS [15:00] Code settings, any APIs, anything [15:01] external, all of that kind of stuff. So, [15:04] you want to keep it all contained inside [15:06] the chat window. That's the reason why [15:07] it's in an iframe. And I believe that is [15:10] actually at time now. So, I guess [15:13] Marlene, anything else? [15:15] >> Uh nope. Uh [15:16] we are Microsoft is here. GitHub has a [15:20] booth on the fourth floor on the third [15:22] floor. So, oh. [15:24] Uh [15:25] How do I get back? Need to be in the [15:26] camera. But, GitHub has a booth [15:29] available. We also have Microsoft Build [15:31] this year that's really going to be [15:33] focusing on code and we'll have a bunch [15:35] of workshops. It's going to be on the [15:36] third to the sixth, I think, of June. [15:40] So, we'd invite you to come by either [15:42] our booth at GitHub or to check out [15:45] Microsoft Build as well online. But, [15:47] yeah, thanks for joining us. [15:48] >> So, that's it. Thank you.