Skip to main content
Glama

MCP Server.exe

by shadowcz007
desktop.ts1.41 kB
import notifier from 'node-notifier' import path from 'path' import fs from 'fs' import os from 'os' export function sendDesktopNotification (title, message, icon) { let data: any = { title, message, sound: true, wait: false } if (icon) { data.icon = icon } // 修正二进制路径(打包后) // @ts-ignore if (process.pkg) { let vendorPath = path.join(path.dirname(process.execPath), 'notifier') if (!fs.existsSync(vendorPath)) { vendorPath = path.join(path.dirname(process.cwd()), 'notifier') } if (!fs.existsSync(vendorPath)) { vendorPath = path.dirname(process.execPath) } const platform = os.platform() let customPath if (platform === 'win32') { customPath = path.join(vendorPath, 'snoretoast.exe') } else if (platform === 'darwin') { customPath = path.join(vendorPath, 'terminal-notifier') } notifier.notify( { ...data, customPath }, (err: any, response: any) => { if (err) console.error('桌面通知失败:customPath:',customPath, 'err:',err) else console.log('桌面通知发送成功',response) } ) } else { // 开发环境正常使用 notifier.notify(data, (err: any, response: any) => { if (err) console.error('桌面通知失败:', err) else console.log('桌面通知发送成功',response) }) } }

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/shadowcz007/mcp_server_exe'

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