Skip to main content
MCP Apps SDK

Overview

getHostCapabilities() returns the capabilities the host advertised during the initialization handshake. Use this for feature detection — check whether a capability exists before calling the corresponding method. Returns undefined before connect() completes.

Signature

Returns

return
McpUiHostCapabilities | undefined
The host’s capabilities, or undefined if the app has not connected yet. See McpUiHostCapabilities for the full type definition.

Usage

Check before calling server tools

Check before sending messages

Check before downloading files

Build a capabilities summary

Capability Fields