Communitygithub.com

aiagentwithdhruv/skills

MCP 伺服器,實現 AI 驅動的 macOS 控制 — 應用程式、顯示器、音訊、檔案、螢幕截圖、剪貼簿

skills 是什麼?

此技能提供了一個 MCP 伺服器,讓 Claude 等 AI 代理能透過 15 個工具直接控制 macOS 系統。開發者可以用自然語言讓 AI 打開應用程式、切換深色模式、搜尋檔案、擷取螢幕截圖以及管理剪貼簿。它支援所有使用 MCP 協議的平台,包括 Claude Desktop、Cursor 和 Codex。該伺服器使用 AppleScript 和 macOS 內建指令,不需 API 金鑰或外部服務,完全免費。其設計注重安全性,阻擋 `rm`、`sudo` 等危險指令,並驗證應用程式名稱,避免執行未經授權的操作。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aiagentwithdhruv/skills/tree/HEAD/mac-control

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

macOS 控制 — AI Mac 自動化

讓 Claude 透過 15 個 MCP 工具直接控制你的 Mac。打開應用程式、切換深色模式、搜尋檔案、擷取螢幕截圖、管理剪貼簿 — 全都透過自然語言完成。

位置

專案: /Users/apple/Aiwithdhruv/AI Development/Claude/Mac-Automation/ MCP 伺服器: Mac-Automation/macos_mcp.py

工具參考

系統(唯讀)

get_system_info()                    # macOS 版本、晶片、RAM、運行時間
get_running_apps()                   # 所有可見的執行中應用程式
get_disk_usage()                     # 每個卷宗的儲存空間

應用程式控制

open_app(app_name="Safari")          # 啟動應用程式(驗證是否在 /Applications/ 中)
close_app(app_name="Notes")          # 透過 AppleScript 優雅退出
switch_to_app(app_name="Terminal")   # 切換至前景

顯示器與音訊

toggle_dark_mode()                   # 切換淺色 <-> 深色(即時視覺效果)
set_volume(level=50)                 # 0-100,自動取消靜音

通知

send_notification(title="嘿", message="課程開始了!", sound="Glass")
play_sound(sound_name="Ping")        # 有 14 種系統音效可用

檔案與搜尋

spotlight_search(query="發票.pdf", folder="~/Documents", limit=20)
open_folder(folder_path="~/Desktop") # 在 Finder 中開啟

剪貼簿

get_clipboard()                      # 讀取目前剪貼簿
set_clipboard(text="哈囉世界")        # 寫入剪貼簿

螢幕截圖

take_screenshot(region="full")       # 將 PNG 存到桌面
take_screenshot(region="window")     # 僅前景視窗

結構

輸入

名稱型別必填說明
app_namestr視情況而定不含 .app 的應用程式名稱(例如 'Safari')
levelint視情況而定音量 0-100
titlestr視情況而定通知標題
messagestr視情況而定通知內容
soundstr否音效名稱(default/Glass/Ping/Pop 等)
querystr視情況而定Spotlight 搜尋查詢
folderstr否搜尋範圍的資料夾
textstr視情況而定剪貼簿文字
regionstr否螢幕截圖區域(full/window)

輸出

名稱型別說明
resultstr人類可讀的結果或錯誤訊息

憑證

名稱型別必填說明
(無)——不需要憑證 — 使用本機 macOS 指令

可組合的工具

  • ghost-browser — 螢幕截圖 → 分析 → 自動化瀏覽器
  • google-mcp — 搜尋檔案 → 電子郵件附件
  • instantly-campaigns — 剪貼簿 → 電子郵件範本

費用

免費 — 僅使用標準函式庫,無 API 呼叫。

安全性

  • 被封鎖的關鍵字:rm, sudo, shutdown, format, erase, passwd, kill
  • 應用程式名稱會驗證是否在 /Applications/ 中
  • AppleScript 字串已淨化
  • 所有指令有 10 秒逾時
  • 任何地方皆不使用 shell=True

Individual skills in this repo

This repo contains 10 individual skills — each has its own dedicated page.

aiagentwithdhruv/skills

Add new Modal webhooks for event-driven execution. Use when user asks to create a webhook, add an endpoint, or set up event triggers.

aiagentwithdhruv/skills

Answer Euron Gen AI Bootcamp doubts instantly. Covers Euri API setup across all frameworks (Python, LangChain, OpenAI SDK, TypeScript, n8n, curl), MCP server setup, common errors, model recommendations, and token limits. Use when someone in the bootcamp asks a question.

aiagentwithdhruv/skills

Manage emails across multiple Gmail accounts with unified tooling. Use when user asks to check email, read inbox, label emails, archive messages, or manage Gmail across accounts.

aiagentwithdhruv/skills

Auto-label Gmail emails into Action Required, Waiting On, and Reference categories. Use when user asks to label emails, triage inbox, categorize emails, or organize Gmail.

aiagentwithdhruv/skills

Scrape Google Maps for B2B leads with deep website enrichment and contact extraction. Use when user asks to find local businesses, scrape Google Maps, generate contractor lists, or build local service business databases.

aiagentwithdhruv/skills

Run Claude orchestrator locally with Cloudflare tunneling. Use when user asks to run locally, start local server, or test webhooks locally.

aiagentwithdhruv/skills

Deploy execution scripts to Modal cloud. Use when user asks to deploy to Modal, push code to cloud, or update Modal functions.

aiagentwithdhruv/skills

Scrape and verify business leads using Apify, classify with LLM, enrich emails, and save to Google Sheets. Use when user asks to find leads, scrape businesses, generate prospect lists, or build lead databases for any industry or location.

aiagentwithdhruv/skills

Query Skool community content using RAG pipeline with vector search. Use when user asks to search Skool knowledge, find community answers, or query Skool content.

aiagentwithdhruv/skills

Scrape Upwork jobs and generate personalized proposals with cover letters. Use when user asks to find Upwork jobs, create Upwork proposals, or apply to Upwork listings.

相關技能