Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/adelelo13/mac-control-mcp/claude-mdgit clone --depth 1 https://github.com/AdelElo13/mac-control-mcpWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00806 | $0.00806 |
| Opus 5 | $0.00403 | $0.00403 |
| Sonnet 5 | $0.00161 | $0.00161 |
| Haiku 4.5 | $0.00081 | $0.00081 |
Grade A, and why
mac-control-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Project: mac-control-mcp
Context
- What this builds: Native macOS MCP server (Model Context Protocol) for controlling macOS via Accessibility API, AppleScript, and system frameworks
- Stack: Swift 6, Swift Package Manager, macOS 14+, AX API (ApplicationServices), AppKit, EventKit, Contacts, CoreLocation, AVFoundation
- Platform: macOS
- Phase: Active development / production (v0.8.x)
- Repo: AdelElo13/mac-control-mcp (public on GitHub)
- Binary:
.build/debug/mac-control-mcp(debug),.build/release/mac-control-mcp(release)
Build
swift build # debug
swift build -c release # release (for shipping/notarization)
swift test # run test suite
Architecture
Sources/MacControlMCP/— all source filesTools.swift— main dispatch router + tool registryTools+V2.swift,Tools+V2Phase*.swift— tool definitions split by phase*Controller.swift— domain controllers (Accessibility, Window, Menu, etc.)AppleAppsController.swift— Messages, Mail, Calendar, Reminders, ContactsSystemInfoController.swift— disk, battery, network, bluetooth, system loadHardwareController.swift— brightness, volume, night shift
Tests/— unit + integration testsTestHarness/— manual test scripts
Tool routing rules
| Task | Use |
|---|---|
| macOS UI automation | AX API via AccessibilityController |
| Contacts lookup | CNContactStore (NOT AppleScript — Contacts.app may not be running) |
| Calendar/Reminders | EventKit directly |
| Browser control | BrowserController (AppleScript fallback) |
| Disk/system info | SystemInfoController via df -k -P (KB → GB conversion applied) |
Known pitfalls
df -gon macOS does NOT reliably return GB values — always usedf -kand divide by 1024² to get real GBlist_menu_titlesdefaults to frontmost app whenpidis omitted — no need to callfocused_appfirst- AppleScript
tell application "Contacts"fails with -600 when Contacts.app isn't running — useCNContactStoreinstead parsePID(nil)returnsnilsame as an invalid pid — checkarguments["pid"] == nilto distinguish "not provided" from "invalid"- Always wrap framework imports in
#if canImport(...)guards (EventKit, Contacts, CoreLocation not available on all platforms) list_windowsis NOT a reliable process-liveness probe: its CG fallback can report a residual window-server entry (count:1,minimized:true, empty title) for a window that is already closed. To detect a windowless zombie, walk the AX tree (get_ui_tree) and require anAXWindownode — a zombie exposes only a childlessAXApplicationroot (2026-07-06, ControlZoo pid 19604/38320)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 62 lines · 806 tokens per session scan A 66f7f0684b30
mac-control-mcp CLAUDE.md is an instructions file published in the GitHub repository AdelElo13/mac-control-mcp (16 stars, last pushed 1mo ago), licensed MIT. It adds 806 tokens to every session, about $0.0040 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
FastLED GEMINI.md
Gemini CLI instructions for FastLED/FastLED, a project described as: The FastLED library for colored LED animation on Arduino. Please direct questions/requests for help to the FastLED Reddit community: http://fastled.io/r We'd like to use github "issues" just for tracking library bugs / enhancements.
kicad-happy GEMINI.md
Instructions for aklofas/kicad-happy, covering kicad-happy, agent guidelines, skills, running analysis and schematic analysis.
brilliant_sdk AGENTS.md
Instructions for brilliantlabsAR/brilliant_sdk, covering brilliant sdk — agent guide, how an app works (the pattern behind everything), minimal reading paths, verify without hardware and testing.
NeoMind CLAUDE.md
Instructions for camthink-ai/NeoMind, covering neomind — edge ai platform for iot, development commands, ecosystem repositories, extension package contract (.nep) and device type template contract (json).
AMD-BC-250-Windows-Driver AGENTS.md
Instructions for Keshas-dev/AMD-BC-250-Windows-Driver, covering amd bc-250 windows driver — agent notes, host machine, ⚠️ historical-data caution (2026-08-21, strengthened), fresh re-verifications (current build, 2026-08-21) and workspace boundary.
Nothan-OS CLAUDE.md
Instructions for Vinalinux-Org/Nothan-OS, covering claude.md — nothanos, hard rules, toolchain, driver and design philosophy.