Skip to content

Documentation / @agentick/mcp / BrowserMCPAppHost

Class: BrowserMCPAppHost ​

Defined in: client/browser-app-host.ts:121

Constructors ​

Constructor ​

new BrowserMCPAppHost(options): BrowserMCPAppHost

Defined in: client/browser-app-host.ts:125

Parameters ​

options ​

BrowserMCPAppHostOptions

Returns ​

BrowserMCPAppHost

Methods ​

close() ​

close(): Promise<void>

Defined in: client/browser-app-host.ts:265

Tear down all mounted apps.

Returns ​

Promise<void>


get() ​

get(appSessionId): MountedApp | undefined

Defined in: client/browser-app-host.ts:249

Get a handle to a currently-mounted app.

Parameters ​

appSessionId ​

string

Returns ​

MountedApp | undefined


list() ​

list(): string[]

Defined in: client/browser-app-host.ts:260

List all currently-mounted app session IDs.

Returns ​

string[]


mount() ​

mount(container, options): Promise<MountedApp>

Defined in: client/browser-app-host.ts:133

Mount an app in the given container element. Creates the iframe, wires PostMessage ↔ channel relay, notifies the server.

Parameters ​

container ​

HTMLElement

options ​

MountAppOptions

Returns ​

Promise<MountedApp>


unmount() ​

unmount(appSessionId): Promise<void>

Defined in: client/browser-app-host.ts:223

Unmount an app by sessionId. Tears down the iframe and notifies the server.

Parameters ​

appSessionId ​

string

Returns ​

Promise<void>

Released under the ISC License.