Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

browser_launch

Launch and control web browsers on Windows systems for automated testing, data extraction, or web interaction tasks. Supports headless mode and session management.

Instructions

启动浏览器

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headlessNo是否无头模式(可选,默认 false)
sessionIdNo会话 ID(可选)

Implementation Reference

  • The main handler function that implements the logic for launching a Puppeteer browser instance and page for a given session.
    async launchBrowser(headless = false, sessionId = 'default') { try { if (this.browsers.has(sessionId)) { return { success: true, message: '浏览器已存在', sessionId }; } const browser = await this.puppeteer.launch({ headless, defaultViewport: null, args: ['--start-maximized'] }); const page = await browser.newPage(); this.browsers.set(sessionId, browser); this.pages.set(sessionId, page); return { success: true, message: '浏览器已启动', sessionId }; } catch (error) { return { success: false, error: error.message }; } }
  • Registers the browser_launch tool including its name, description, and input schema in the getToolDefinitions() method.
    { name: 'browser_launch', description: '启动浏览器', inputSchema: { type: 'object', properties: { headless: { type: 'boolean', description: '是否无头模式(可选,默认 false)' }, sessionId: { type: 'string', description: '会话 ID(可选)' }, }, }, },
  • Defines the input schema for the browser_launch tool, specifying optional headless and sessionId parameters.
    inputSchema: { type: 'object', properties: { headless: { type: 'boolean', description: '是否无头模式(可选,默认 false)' }, sessionId: { type: 'string', description: '会话 ID(可选)' }, }, },
  • Dispatch handler in executeTool switch statement that calls the launchBrowser method.
    case 'browser_launch': return await this.launchBrowser(args.headless, args.sessionId);

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/eva-wanxin-git/windows-automation-mcp'

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