Skip to main content
Glama
nexon33

Electron Terminal MCP Server

terminal_get_sessions

Retrieve active terminal sessions from an Electron-based terminal server to manage and monitor command execution programmatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:388-410 (registration)
    Registers the 'terminal_get_sessions' MCP tool with an inline handler function that checks if the server is running, starts the Electron process if needed, fetches active terminal sessions from the API endpoint `/sessions`, and returns the list of sessions as formatted JSON text.
    server.tool( "terminal_get_sessions", {}, async () => { try { // Check if server is running, start if not if (!(await isServerRunning())) { await startElectronProcess(); } const response = await axios.get(`${apiBaseUrl}/sessions`); const result = response.data; return { content: [{ type: "text", text: `Active sessions:\n\n ${JSON.stringify(result, null, 2)}`, exitCode: 0 }] }; } catch (error) { return formatErrorResponse(error); } } );
  • The handler function for the 'terminal_get_sessions' tool. It ensures the Electron server is running, retrieves active sessions via API, and formats the response as text content with session list in JSON.
    async () => { try { // Check if server is running, start if not if (!(await isServerRunning())) { await startElectronProcess(); } const response = await axios.get(`${apiBaseUrl}/sessions`); const result = response.data; return { content: [{ type: "text", text: `Active sessions:\n\n ${JSON.stringify(result, null, 2)}`, exitCode: 0 }] }; } catch (error) { return formatErrorResponse(error); } }
  • Empty schema indicating the tool takes no input parameters.
    {},

Other Tools

Related 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/nexon33/console-terminal-mcp-server'

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