Moonlight MCP Plugin
Provides Git integration with capabilities for status, diff, log, and policy-checked execution of Git commands.
Offers macOS native automation including accessibility, input, window control, screen capture, notifications, clipboard, file dialogs, audio, and scheduler (launchd).
Serves as a gateway for OpenAI/ChatGPT to access local macOS resources, enabling AI agents to interact with files, Git, processes, and native automation on the user's Mac.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Moonlight MCP PluginCheck the Git status of my project and summarize recent commits."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Moonlight is a macOS local gateway that exposes your Mac's files, projects, processes, and native automation to ChatGPT as MCP tools — for ChatGPT web, ChatGPT desktop, and ChatGPT computer use. It connects through the official OpenAI Secure MCP Tunnel (outbound HTTPS only, Desktop loopback HTTP MCP, no public port opened).
This is a fork of lnwjud by Adisorn NM — the Windows runtime surface is removed and the project is rebranded for the macOS + ChatGPT ecosystem. Credit to the original author for the groundwork; see License.
Quick start
1. Install the app
Download the DMG (arm64 or x64) from Releases.
Drag Moonlight into
/Applicationsand launch it.Releases are unsigned: right-click the app → Open (or
xattr -d com.apple.quarantine /Applications/Moonlight.app). Verify with the publishedSHA256SUMS.txt/PROVENANCE.json.Add the project folder ChatGPT should work on (Projects page).
Grant Screen Recording and Accessibility when prompted for native automation.
No system Node.js needed — the app bundles its own runtime.
2. Connect ChatGPT
In OpenAI Platform: create a tunnel, create a runtime API key (Tunnels Read + Use).
In Moonlight: Settings → OpenAI Secure MCP Tunnel → save key, paste tunnel ID, Configure Tunnel, Start Tunnel. The tunnel targets the Desktop loopback HTTP MCP (
sample_mcp_remote_no_authprofile), not a separate headless runtime.In ChatGPT web/desktop (Developer mode): Plugins → add connection → Tunnel → pick the tunnel.
In ChatGPT computer use: attach the same tunnel connection so the agent can operate your Mac's files and UI.
Confirm that the default runtime exposes 178 tools (or 184 when Codex delegation is explicitly enabled) and run a read-only smoke test before trying writes.
Use Moonlight to list registered workspaces, show Git status for the selected project, and summarize the top-level project tree. Do not modify anything.Related MCP server: macos-computer-use-mcp
Features
Workspace & files — register projects; search, read, edit files with paging and persistent indexing
Git — status, diff, log, and policy-checked execution
Processes & Modern MCP Tasks — owned process lifecycle with bounded logs, timeout, cancellation, and full Modern MCP Tasks Protocol (
io.modelcontextprotocol/tasks) support (tasks/get,tasks/update,tasks/cancel) for asynchronous background executionmacOS native — accessibility, input, window control, screen capture, notifications, clipboard, file dialogs, audio, scheduler (launchd)
Browser — managed Chrome / CDP automation with Set-of-Marks annotated observations
Durable goals — goal continuation with lease fencing and scheduled handoff
Live Logs & Work Log — high-performance SQLite streaming, event loop yielding, candidate pre-filtering, fast non-blocking atomic file exports, and expandable untruncated activity inspection
Extensible — local skill discovery, child MCP servers, compound/parallel workflows
Bundled OpenAI tunnel-client — pre-packaged universal binary (
v0.0.14) for macOS (arm64 & x64) with pinned SHA-256 verification and zero external dependencies
Session resilience / แนวทางสำหรับผู้ปฏิบัติการ
Use Capture Incident in Control Center or Live Logs when a turn looks wrong. Validate the configured tunnel health endpoint against the live runtime address:
profile="$HOME/Library/Application Support/tunnel-client"
tc="${MOONLIGHT_TUNNEL_CLIENT_PATH:-/Applications/Moonlight.app/Contents/Resources/tunnel-client/tunnel-client}"
[ -f "$tc" ] || exit 1
"$tc" doctor --profile moonlight --profile-dir "$profile" --explain || exit 1
address=$(grep -E 'health.*(listening|listen_addr).*(127\.0\.0\.1|localhost):[0-9]+' "$profile/moonlight-tunnel.log" | tail -1 | grep -oE '(127\.0\.0\.1|localhost):[0-9]+' | tail -1)
[ -n "$address" ] || exit 1
curl "http://$address/healthz"Security and operational model
Moonlight is powerful by design — use it only on machines and workspaces you trust.
Active Project scope bounds mutations; the exact
delete_fileis the only mutation eligible for scoped auto-approval, and only when the target is proven recoverable inside the Active Project.Approval — with Full Bypass OFF, approval-required mutations need explicit chat confirmation plus an independent trusted host exact-action approval. Desktop dialogs are cancel-first; standalone/headless runtimes without a trusted host approval provider fail closed.
Recovery Trash — deleted files and pre-replacement backups are recorded under
<dataRoot>/recovery-trash(or encrypted checkpoints) before the authoritative mutation.Full Bypass — a separate opt-in control (default OFF) that skips application-level approval/scope checks for explicit targets; it cannot override OS permissions or input validation.
Loopback MCP binds to 127.0.0.1; use the Secure MCP Tunnel for remote access. The tunnel profile stores only an
env:key reference, never the key.
Build from source
Requirements: macOS, Node.js 24 (nvm/nodejs.org, not Homebrew), Corepack + pnpm 10.15.0.
git clone https://github.com/misternay/moonlight-mcp-plugin.git
cd moonlight-mcp-plugin
corepack pnpm@10.15.0 install --frozen-lockfile
corepack pnpm@10.15.0 build
corepack pnpm@10.15.0 desktop # dev desktop app
corepack pnpm@10.15.0 package:macos # local DMG + ZIP (arm64 only)Checks: lint, typecheck, test:release, docs:tools:check. Layout: apps/desktop (Electron), apps/cli, packages/*, docs/.
Tools
The complete generated tool index (230 total definitions; 178 advertised by default; 184 with Codex enabled) lives in docs/TOOL_CATALOG.md.
Docs
License
This project is licensed under the MIT License.
Moonlight is a fork of lnwjud by Adisorn NM — original author credit goes to them and the original project, which this fork builds on.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides native macOS computer control tools including mouse and keyboard simulation, screenshot capture, and application management for MCP-compatible agents. It enables AI assistants to directly interact with the macOS operating system and installed apps through standard tool calls.2437 npm8MIT
- AlicenseNot gradedqualityBmaintenanceProvides 146 MCP tools for AI agents to control macOS, including screenshots, mouse, keyboard, window management, app automation, file system, OCR, and built-in app semantics like Calendar, Mail, Safari, Music, Messages. Enables full control over macOS through natural language.1MIT
- AlicenseNot gradedqualityCmaintenanceGives ChatGPT Web hands on your Mac — files, git, terminal, browser, and windows via MCP, with outbound-only tunnel and delete protection.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables ChatGPT to securely control a local workstation via an MCP tunnel, exposing 44 tools for file/project editing, git, process supervision, browser automation, and Office document handling across macOS, Linux, and Windows.7MIT