Skip to main content
Glama
ebowwa
by ebowwa

start_web_monitor

Launch a web interface to visually execute and monitor commands for managing iOS/macOS projects programmatically via Xcode MCP Server.

Instructions

Start the web interface for visual command execution and monitoring

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'start_web_monitor': invokes WebMonitorManager.start() and formats the response with the web interface URL.
    if (name === 'start_web_monitor') { const result = await this.webMonitorManager.start(); return { content: [ { type: 'text', text: `${result.message}\n\nWeb interface available at: ${result.url}` } ] }; }
  • Tool schema definition including name, description, and empty input schema (no parameters required).
    { name: 'start_web_monitor', description: 'Start the web interface for visual command execution and monitoring', inputSchema: { type: 'object', properties: {}, required: [] } },
  • src/index.ts:87-89 (registration)
    Registers the 'start_web_monitor' tool (via webMonitorTools array) in the MCP listTools request handler.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [...tools, ...webMonitorTools], }));
  • WebMonitorManager.start(): core logic finds an available port, spawns the web-server process with node, waits for startup confirmation, handles errors and cleanup.
    async start(): Promise<{ url: string; port: number; message: string }> { if (this.isRunning && this.webServerProcess) { return { url: `http://localhost:${this.port}`, port: this.port, message: 'Web monitor is already running' }; } try { // Find an available port this.port = await this.findAvailablePort(); // Spawn the web server process const webServerPath = join(__dirname, 'web-server.js'); console.error(`[WebMonitor] Starting web server at ${webServerPath} on port ${this.port}`); this.webServerProcess = spawn('node', [webServerPath], { env: { ...process.env, PORT: this.port.toString() }, stdio: ['ignore', 'pipe', 'pipe'], detached: false }); // Wait for the "running at" message await new Promise<void>((resolve, reject) => { const timeout = setTimeout(() => { reject(new Error('Web server failed to start within timeout')); }, 5000); if (this.webServerProcess!.stdout) { this.webServerProcess!.stdout.on('data', (data) => { const output = data.toString(); if (output.includes('running at')) { clearTimeout(timeout); resolve(); } }); } this.webServerProcess!.on('error', (err) => { clearTimeout(timeout); reject(err); }); this.webServerProcess!.on('exit', (code) => { clearTimeout(timeout); reject(new Error(`Web server exited with code ${code}`)); }); }); this.isRunning = true; // Handle process cleanup this.webServerProcess.on('exit', () => { this.isRunning = false; this.webServerProcess = null; }); const url = `http://localhost:${this.port}`; return { url, port: this.port, message: `Web monitor started successfully at ${url}` }; } catch (error) { this.stop(); throw error; } }

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/ebowwa/xcode-mcp'

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