Skip to main content
MCP Apps SDK

Overview

requestDisplayMode asks the host to change how the MCP App View is displayed. The three possible display modes are:
  • "inline" — The default mode. The View is rendered inline within the chat conversation.
  • "fullscreen" — The View expands to fill the host’s available space.
  • "pip" — Picture-in-picture mode. The View floats in a small overlay window.
These values are defined by the McpUiDisplayMode type. See Core Types for the full type definition. The host may not support all display modes. The returned mode reflects what was actually set, which may differ from the requested mode if the host does not support it. Always check the host context’s availableDisplayModes before requesting a mode change, and use the returned value to update your UI state.

Signature

Parameters

params
object
required
mode
McpUiDisplayMode
required
The desired display mode. One of "inline", "fullscreen", or "pip".
options
RequestOptions
Optional request configuration such as timeout or abort signal.

Returns

result
object
mode
McpUiDisplayMode
The display mode actually set by the host. This may differ from the requested mode if the host does not support it.

Usage

Toggling between inline and fullscreen

Entering picture-in-picture mode

Handling unsupported modes gracefully

Building a mode switcher