UNPKG

@dorothywebb/any-browser-mcp

Version:

Any Browser MCP - Launch Chrome with your actual data in debug mode for comprehensive browser automation

82 lines 2.4 kB
/** * Chrome Launcher - Manages separate Chrome instances for MCP * Launches Chrome with debugging in a separate profile to avoid interfering with user's main Chrome */ /// <reference types="node" resolution-mode="require"/> import { ChildProcess } from 'child_process'; export interface ChromeLaunchOptions { debugPort?: number; profilePath?: string; headless?: boolean; userAgent?: string; windowSize?: { width: number; height: number; }; args?: string[]; copyUserData?: boolean; sourceProfilePath?: string; } export interface ChromeInstance { process: ChildProcess; debugPort: number; profilePath: string; pid: number; startTime: Date; } export declare class ChromeLauncher { private config; private runningInstances; private verbose; constructor(verbose?: boolean); /** * Check if Chrome is available for debugging on the specified port */ isDebugPortAvailable(port: number): Promise<boolean>; /** * Get the default Chrome user data directory for the current platform */ private getDefaultChromeUserDataDir; /** * Find Chrome executable path for the current platform */ private getChromePath; /** * Copy user's Chrome data to MCP profile directory */ private copyUserChromeData; /** * Prepare Chrome profile directory with optional user data copying */ private prepareProfileDirectory; /** * Launch a separate Chrome instance for MCP use */ launchSeparateChrome(options?: ChromeLaunchOptions): Promise<ChromeInstance>; /** * Wait for Chrome to be ready for debugging */ private waitForChromeReady; /** * Get or launch Chrome instance for MCP use */ getOrLaunchChrome(options?: ChromeLaunchOptions): Promise<ChromeInstance>; /** * Close a specific Chrome instance */ closeInstance(instance: ChromeInstance): Promise<void>; /** * Close all MCP Chrome instances */ closeAllInstances(): Promise<void>; /** * Get information about running instances */ getRunningInstances(): ChromeInstance[]; /** * Check if Chrome executable exists */ isChromeAvailable(): boolean; } export declare function createChromeLauncher(verbose?: boolean): ChromeLauncher; //# sourceMappingURL=ChromeLauncher.d.ts.map