Overview
openLink requests the host to open a URL in the user’s browser. Since MCP Apps run inside sandboxed iframes, they cannot navigate directly or open new windows. This method delegates link opening to the host, which can apply its own security policies (such as URL allowlists or user confirmation dialogs) before opening the link.
The host may deny the request, in which case isError will be true in the response.
Signature
Parameters
Returns
Usage
Open a documentation link
Open a link from a button click
Open a dynamic URL
Related
- Requests overview — all available View-to-host request methods
useOpenLink— sunpeak React convenience hook- CSP and CORS — security considerations for external resources