Documentation / @agentick/mcp / createMCPApp
Function: createMCPApp()
createMCPApp(
options):Promise<MCPAppHandle>
Defined in: client/apps.ts:114
Create an MCP App bridge for a sandboxed iframe.
The host should:
- Create the iframe with appropriate
sandboxandallowattributes (usebuildAllowAttribute(permissions)for theallowattribute) - Set the iframe's src to a URL serving the ui:// resource HTML
- Wait for the iframe to load
- Call
createMCPApp({ iframe, ... })to wire up the bridge
The bridge handles:
- postMessage JSON-RPC protocol via PostMessageTransport
- Tool call proxying from the iframe to the MCP server
- Visibility enforcement (model-only tools rejected)
- Standard MCP forwarding (resources/read, prompts/get, etc.)
Parameters
options
Returns
Promise<MCPAppHandle>