AxMCPAppBridge Generated TypeScript API reference. typescript api api/reference build/apidocs/Class.AxMCPAppBridge.md class AxMCPAppBridge

AxMCPAppBridge

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L186

Protocol and policy core for an MCP Apps host. Rendering remains host-owned; this bridge supplies the validated sandbox payload and JSON-RPC dispatch.

Constructors

Constructor

TypeScript
new AxMCPAppBridge(options: Readonly<AxMCPAppBridgeOptions>): AxMCPAppBridge;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L191

Parameters

ParameterType
optionsReadonly<AxMCPAppBridgeOptions>

Returns

AxMCPAppBridge

Methods

handleViewMessage()

TypeScript
handleViewMessage(message: Readonly<AxMCPJSONRPCMessage>): Promise<undefined | AxMCPJSONRPCResponse>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L232

Parameters

ParameterType
messageReadonly<AxMCPJSONRPCMessage>

Returns

Promise<undefined | AxMCPJSONRPCResponse>


loadResource()

TypeScript
loadResource(): Promise<AxMCPAppResource>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L201

Returns

Promise<AxMCPAppResource>


notifyHostContextChanged()

TypeScript
notifyHostContextChanged(context: Readonly<Record<string, unknown>>): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L282

Parameters

ParameterType
contextReadonly<Record<string, unknown>>

Returns

Promise<void>


notifyToolCancelled()

TypeScript
notifyToolCancelled(reason: string): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L278

Parameters

ParameterType
reasonstring

Returns

Promise<void>


notifyToolInput()

TypeScript
notifyToolInput(arguments_: Readonly<Record<string, unknown>>): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L258

Parameters

ParameterType
arguments_Readonly<Record<string, unknown>>

Returns

Promise<void>


notifyToolInputPartial()

TypeScript
notifyToolInputPartial(arguments_: Readonly<Record<string, unknown>>): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L266

Parameters

ParameterType
arguments_Readonly<Record<string, unknown>>

Returns

Promise<void>


notifyToolResult()

TypeScript
notifyToolResult(result: Readonly<AxMCPToolCallResult>): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L274

Parameters

ParameterType
resultReadonly<AxMCPToolCallResult>

Returns

Promise<void>


teardown()

TypeScript
teardown(reason: string): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/apps.ts#L291

Parameters

ParameterType
reasonstring

Returns

Promise<void>

Docs