Skip to main content
Glama

stop_gui

Stop the web GUI server for managing Claude Code conversation sessions.

Instructions

Stop the web GUI server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'stop_gui' tool. Checks if the web server instance exists, attempts a graceful shutdown via the /api/shutdown endpoint, calls stopWebServer to kill the process if necessary, and returns a success message.
    server.tool('stop_gui', 'Stop the web GUI server', {}, async () => { if (webServerInstance) { const port = webServerInstance.port // Call shutdown API first for graceful shutdown try { await fetch(`http://localhost:${port}/api/shutdown`, { method: 'POST' }) } catch { // Server might already be stopping } // Then kill the process if still running await stopWebServer(webServerInstance) webServerInstance = null return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Web GUI stopped successfully' }, null, 2), }, ], } } return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Web GUI was not running' }, null, 2), }, ], } })
  • Registers the 'stop_gui' MCP tool with empty schema and the inline handler function.
    server.tool('stop_gui', 'Stop the web GUI server', {}, async () => { if (webServerInstance) { const port = webServerInstance.port // Call shutdown API first for graceful shutdown try { await fetch(`http://localhost:${port}/api/shutdown`, { method: 'POST' }) } catch { // Server might already be stopping } // Then kill the process if still running await stopWebServer(webServerInstance) webServerInstance = null return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Web GUI stopped successfully' }, null, 2), }, ], } } return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Web GUI was not running' }, null, 2), }, ], } })
  • Supporting function called by the stop_gui handler to terminate the web server child process gracefully.
    export async function stopWebServer(server: WebServer): Promise<void> { server.process.kill('SIGTERM') }

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/DrumRobot/claude-sessions-mcp'

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