MCP Ext Apps Tutorial: Building Interactive MCP Apps and Hosts

May 4, 2026 ยท View on GitHub

Learn how to use modelcontextprotocol/ext-apps to build interactive MCP Apps, wire host bridges, secure UI resources, and run reliable testing and migration workflows.

GitHub Repo npm Latest Release

Why This Track Matters

Standard MCP tools work well for text and structured payloads, but many workflows need embedded UI. MCP Apps extend the protocol so servers can return interactive, sandboxed interfaces linked directly to tool executions.

This track focuses on:

  • understanding the stable MCP Apps spec and lifecycle model
  • building app-side UIs with @modelcontextprotocol/ext-apps
  • implementing host-side bridges and context handling safely
  • testing and migrating from OpenAI Apps-style integrations

Current Snapshot (auto-updated)

Mental Model

flowchart LR
    A[MCP Server Tool] --> B[ui:// Resource]
    B --> C[Host Sandbox Iframe]
    C --> D[App SDK]
    D --> E[Tool Data + Events]
    C --> F[Host Bridge]
    F --> A

Chapter Guide

ChapterKey QuestionOutcome
01 - Getting Started and Spec OrientationWhat does MCP Apps add to core MCP, and how do I start?Fast onboarding
02 - MCP Apps Architecture and LifecycleHow do tools, UI resources, and host flows interact over time?Clear system model
03 - App SDK: UI Resources and Tool LinkageHow do app developers bind UI to tool metadata and responses?Better app design
04 - Host Bridge and Context ManagementHow should hosts embed, message, and constrain MCP Apps?Safer host implementations
05 - Patterns, Security, and PerformanceWhich patterns improve UX while preserving safety?Production-grade patterns
06 - Testing, Local Hosts, and Integration WorkflowsHow do I validate MCP Apps behavior before deployment?Higher reliability
07 - Agent Skills and OpenAI Apps MigrationHow do teams accelerate setup and migrate existing app stacks?Faster adoption
08 - Release Strategy and Production OperationsHow do I operate MCP Apps systems long term?Durable operations

What You Will Learn

  • how MCP Apps extends MCP with UI resource contracts and host/app bridging
  • how to implement app-side rendering and interaction flows with SDK hooks
  • how to apply security/CSP/context constraints for safer UI execution
  • how to validate and evolve MCP Apps deployments with migration-aware practices

Source References


Start with Chapter 1: Getting Started and Spec Orientation.

Full Chapter Map

  1. Chapter 1: Getting Started and Spec Orientation
  2. Chapter 2: MCP Apps Architecture and Lifecycle
  3. Chapter 3: App SDK: UI Resources and Tool Linkage
  4. Chapter 4: Host Bridge and Context Management
  5. Chapter 5: Patterns, Security, and Performance
  6. Chapter 6: Testing, Local Hosts, and Integration Workflows
  7. Chapter 7: Agent Skills and OpenAI Apps Migration
  8. Chapter 8: Release Strategy and Production Operations

Generated by AI Codebase Knowledge Builder