Skip to main content
Glama
appid.py1.2 kB
"""this script registers a start menu shortcut for the MCP Windows app with a custom AppUserModelID. This is necessary for the app to be able to send windows toast notifications due to some legacy UWP API limitations. If you press the windows key and type "mcp" in the start menu, you should see the MCP Windows app icon.""" import os import sys from win32com.client import Dispatch import pythoncom APP_ID = "mcp-windows" SHORTCUT_PATH = os.path.join( os.environ["APPDATA"], r"Microsoft\Windows\Start Menu\Programs\MCP Windows.lnk" ) STGM_READWRITE = 0x00000002 def register_app_id(): shell = Dispatch("WScript.Shell") shortcut = shell.CreateShortcut(SHORTCUT_PATH) shortcut.TargetPath = sys.executable shortcut.WorkingDirectory = os.getcwd() shortcut.IconLocation = sys.executable shortcut.Save() # Add AppUserModelID from win32com.propsys import propsys, pscon property_store = propsys.SHGetPropertyStoreFromParsingName(SHORTCUT_PATH, None, STGM_READWRITE) property_store.SetValue(pscon.PKEY_AppUserModel_ID, propsys.PROPVARIANTType(APP_ID, pythoncom.VT_LPWSTR)) property_store.Commit() register_app_id()

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/SecretiveShell/mcp-windows'

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