Skip to main content
Glama
Rainmen-xia

Chrome Debug MCP Server

by Rainmen-xia

launch_browser

Start a browser connection to Chrome debugging ports for browser automation with persistent login sessions.

Instructions

启动浏览器连接,连接到Chrome调试端口以保持登录状态

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
remote_hostNo可选的远程Chrome主机URL (例如: http://localhost:9222)

Implementation Reference

  • Core handler function that establishes connection to Chrome debugging port using provided remote host or automatic discovery.
    async launchBrowser(remoteBrowserHost?: string): Promise<BrowserActionResult> {
    	console.log("启动浏览器连接");
    
    	if (this.browser) {
    		await this.closeBrowser();
    	}
    
    	const remoteConnected = await this.connectToRemoteBrowser(remoteBrowserHost);
    
    	if (!remoteConnected) {
    		return {
    			success: false,
    			error: "无法连接到Chrome调试端口。请确保Chrome以 --remote-debugging-port=9222 参数启动"
    		};
    	}
    
    	return { success: true };
    }
  • Input schema definition for the launch_browser tool, including optional remote_host parameter.
    	name: "launch_browser",
    	description: "启动浏览器连接,连接到Chrome调试端口以保持登录状态",
    	inputSchema: {
    		type: "object",
    		properties: {
    			remote_host: {
    				type: "string",
    				description: "可选的远程Chrome主机URL (例如: http://localhost:9222)",
    			},
    		},
    	},
    },
  • src/index.ts:47-59 (registration)
    Registration of the launch_browser tool in the ListToolsRequestSchema handler.
    {
    	name: "launch_browser",
    	description: "启动浏览器连接,连接到Chrome调试端口以保持登录状态",
    	inputSchema: {
    		type: "object",
    		properties: {
    			remote_host: {
    				type: "string",
    				description: "可选的远程Chrome主机URL (例如: http://localhost:9222)",
    			},
    		},
    	},
    },
  • MCP CallToolRequestSchema dispatch handler that invokes the browserSession.launchBrowser method.
    case "launch_browser":
    	result = await this.browserSession.launchBrowser(args?.remote_host as string);
    	break;
  • Output schema/interface for browser action results, used by launchBrowser.
    export interface BrowserActionResult {
    	screenshot?: string;
    	logs?: string;
    	currentUrl?: string;
    	currentMousePosition?: string;
    	success?: boolean;
    	error?: string;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions connecting to Chrome debugging ports and maintaining login state, which hints at session persistence and potential authentication needs. However, it lacks details on error handling, timeouts, whether this is a one-time or reusable connection, or any rate limits—critical for a tool that establishes external connections.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Chinese that directly states the tool's action and purpose without unnecessary words. It's front-loaded with the core function ('启动浏览器连接') and adds just enough context about Chrome debugging and login state, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (establishing external browser connections with login state persistence), lack of annotations, and no output schema, the description is incomplete. It misses critical details like what happens on success/failure, how the connection is managed, or what the agent can expect after launching (e.g., a session ID or confirmation). For a tool with potential side effects and no structured safety hints, this is inadequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'remote_host' documented as an optional Chrome host URL. The description doesn't add any semantic details beyond what the schema provides (e.g., no examples of default behavior if omitted, no explanation of why this parameter matters for login state). Baseline 3 is appropriate as the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '启动浏览器连接' (launch browser connection) and specifies it connects to Chrome debugging ports to maintain login state. It uses specific verbs and identifies the resource (browser/Chrome), but doesn't explicitly differentiate from sibling tools like 'close_browser' or 'navigate_to' beyond its unique connection-establishing function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by mentioning '保持登录状态' (maintain login state), suggesting this tool is for establishing persistent sessions. However, it doesn't provide explicit guidance on when to use it versus alternatives (e.g., no mention of prerequisites or comparisons to other browser-related siblings), leaving usage somewhat inferred rather than clearly defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rainmen-xia/chrome-debug-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server