Skip to main content
Glama
TrueOleg

MCP Mac Apps Server

by TrueOleg

get_running_applications

Retrieve a list of all currently running applications on macOS to monitor active processes and manage system resources.

Instructions

Получает список всех запущенных приложений на Mac

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • TypeScript handler function that uses AppleScript via osascript to fetch and format the list of currently running Mac applications (non-background processes).
    private async getRunningApplications() { try { // Получаем список запущенных приложений через AppleScript const { stdout } = await execAsync( `osascript -e 'tell application "System Events" to get name of every application process whose background only is false'` ); const apps = stdout .trim() .split(", ") .map((app) => app.trim()) .filter((app) => app.length > 0); return { content: [ { type: "text", text: `Запущенные приложения:\n${apps.join("\n")}`, }, ], }; } catch (error) { throw new Error( `Не удалось получить список приложений: ${error instanceof Error ? error.message : String(error)}` ); } }
  • Python handler function that uses AppleScript via osascript to fetch and format the list of currently running Mac applications (non-background processes).
    def get_running_applications() -> str: """Gets list of running applications""" apple_script = 'tell application "System Events" to get name of every application process whose background only is false' stdout, stderr = exec_command(f'osascript -e \'{apple_script}\'') if stderr: raise Exception(f"Failed to get list of applications: {stderr}") apps = [app.strip() for app in stdout.strip().split(", ") if app.strip()] return "Running applications:\n" + "\n".join(apps)
  • TypeScript tool schema definition including name, description, and empty input schema (no parameters required).
    name: "get_running_applications", description: "Получает список всех запущенных приложений на Mac", inputSchema: { type: "object", properties: {}, }, },
  • Python tool schema definition including name, description, and empty input schema (no parameters required).
    "name": "get_running_applications", "description": "Gets list of all running applications on Mac", "inputSchema": { "type": "object", "properties": {}, }, },
  • src/index.ts:311-312 (registration)
    TypeScript dispatch/registration in the CallToolRequestSchema handler that routes to the getRunningApplications method.
    case "get_running_applications": return await this.getRunningApplications();
  • src/server.py:597-598 (registration)
    Python dispatch/registration in the tools/call handler that calls the get_running_applications function.
    elif tool_name == "get_running_applications": result_text = get_running_applications()

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/TrueOleg/MCP-expirements'

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