# Agent

> Mac Agent for macOS 26: the agentic AI harness for your Mac Desktop. Computer use, automation, scripting, coding, and more. Powered by 18+ providers across local and cloud LLMs.

- **Type:** MCP server
- **Install:** `agentstack add mcp-macos26-agent`
- **Verified:** Pending review
- **Seller:** [macOS26](https://agentstack.voostack.com/s/macos26)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [macOS26](https://github.com/macOS26)
- **Source:** https://github.com/macOS26/Agent
- **Website:** https://macos26.app

## Install

```sh
agentstack add mcp-macos26-agent
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 🦾 Agent! for macOS 26.4.1 or later

## **Agentic AI for your  Mac Desktop**
## Open Source alternative to Claude Code, Cursor and Open Claw

[](https://github.com/macOS26/Agent/releases/latest)
[](https://github.com/macOS26/Agent/stargazers)
[](https://github.com/macOS26/Agent/fork)
[](https://github.com/apple)
[](https://www.swift.org)

Thank you for your interest and support!

---

## Cadence
### Release Schedule
Approved pull requests are tested and implemented on corresponding weekends. Milestone releases are tied to real moments of growth. Reaching 500 stars, for example, will queue a new release. If the latest build becomes the #1 download on [macos26.app](https://macos26.app), that milestone will also trigger a new release. For early adopters: as bug fixes land, pull requests are approved, and new features ship, the main branch will always reflect the latest work. This summer, updates may be a bit slower due to Family Medical Leave and limited computer access. Thanks in advance for your patience.

---

## Backstory and the Tech behind Agent!
Agent! didn't come together overnight. It's the result of three years of building agentic AI apps, drawing on roughly a dozen projects developed along the way. Some of those were published under ANIE, Game Changer, BattleScript, XCF MCP Server and Client, D1F, and about eight original Swift Packages. The missing piece was achieving an intelligent autonomous time loop. Once achieved, I brought in the best of the best from the previous three years. The result is Agent! for macOS 26.4.1 or later.

The original goal was to build a Cursor killer. What emerged is something more interesting: an agentic AI with real legs. Agent! is only limited by your imagination. It can write code including video games like Boss-Man, https://github.com/macos26/bossman, create apps, write poetry via AppleScript within Pages, generate disk images, and attach them to GitHub releases. It can automate most tasks on your Mac. Ask it what you want in plain English or your native language and, after some initial configuration and user approvals, it will do everything it can to carry out your wish. Agent! is relentless, and aims to please.

All of Agent!'s IP is original and open source. Every Swift package dependency and the app itself were originally authored by the same person. This is a genuinely different ecosystem. Most agentic AI apps like Claude Code rely on 65 NPM packages from third parties. Agent! is 100% native, requires very little RAM, and weighs in at 35.5 uncompressed. That footprint includes Xcode automation, a Swift Syntax 6.2 package for troubleshooting native apps, Accessibility, AppleScript, AgentScript/ScriptingBridge, Safari automation, MCP Server support, and more. Out of the box.

## What's New 🚀

- **🌐 OpenRouter provider:** Full integration with OpenRouter's model catalog — one API key, 200+ models. Smart catalog fetches available models, protocol toggle (OpenAI/Anthropic) routes Claude models through the Anthropic protocol and everything else through OpenAI, and ClaudeService auto-routes when OpenRouter is selected.
- **Apple AI as a real tool-calling agent:** On-device Apple Intelligence (FoundationModels.Tool) handles UI automation requests like *"take a photo using Photo Booth"* locally — multi-step tool calls, zero cloud LLM tokens, falls through to the cloud LLM only on failure.
- **SDEF + runtime app discovery:** Bundle ID resolution is now zero-hardcoded. Apps in `Agent/SDEFs/` plus every `.app` in `/Applications`, `/System/Applications`, `~/Applications` are discovered at runtime — installing a new app extends what the agent can target with no code edit.
- **Prompt caching for every OpenAI-format provider:** Z.ai, OpenAI, Grok, Mistral, DeepSeek, Qwen, Gemini, BigModel, Hugging Face — `cached_tokens` is parsed from the response and shown in the LLM Usage panel. JSON request bodies use `.sortedKeys` so byte-stable prefixes actually hit the provider's cache.
- **On-device token compression:** Apple AI summarizes old conversation turns when context exceeds 30K tokens (Tier 1 of `tieredCompact`) — free, private, no API tokens consumed. Toggleable in the brain icon popover.
- **Anti-hallucination prompt rule:** Every system prompt now includes explicit guidance against fabricating findings from incomplete tool reads. The 10-consecutive-reads guard pushes the model toward "narrow or call done()" instead of "guess".
- **Autonomous task loop, Xcode integration, AXorcist desktop automation, privileged daemon, multi-tab LLM config, Ollama pre-warming via `LLMRegistry`** — all the previously-shipped fundamentals are still there.

## Star History ⭐️

 
   
   
   
 

**One app. Any AI. Total command over your Mac.**

Agent! wires **18 LLM providers** — Claude, GPT, Gemini, Grok, Mistral, DeepSeek, Qwen, Z.ai, BigModel, Hugging Face, **OpenRouter**, Ollama (cloud and local), vLLM, LM Studio, Codestral, Mistral Vibe, and on-device **Apple Intelligence** — into a native macOS app that doesn't just talk about doing things. It does them.

Watch it read your codebase, fix the bug, build the Xcode project, and commit the diff while you make coffee. Tell it to open Safari and text you the price of flights to Tokyo. Say *"Agent!"* from across the room and have it run your test suite by voice. Text your Mac from iMessage and get a polished answer before you reach your car.

It edits files with surgical string-replace diffs — every change one-click undoable from a Time-Machine-style rollback. It drives any Mac app through the Accessibility API — no AppleScript required. It remembers your preferences across sessions. It spawns parallel sub-agents for work that fans out. It indexes entire codebases into a portable JSONL repo-map that any LLM can consume. It runs shell commands as you, or as root via a Launch Daemon you approve exactly once.

Bring your own API key. Run it fully local on Ollama, vLLM, or LM Studio. Or run it free, forever, on Apple Intelligence. No subscription. No telemetry. No vendor lock-in. Your keys, your machine, your data.

Download it. Say what you need. Watch it happen.

## Quick Start (Download)

1. **Download** [Agent!](https://github.com/macOS26/Agent/releases/latest) and drag to Applications
2. **Open Agent!** -- it sets up everything automatically
3. **Pick your AI** -- Settings → choose a provider → enter API key

## Quick Start (Build from Source)

1. **Clone the repository:**
   ```bash
   git clone https://github.com/macos26/agent.git
   cd Agent
   ```

#### Option A: Build with Xcode (Apple Developer account)
2. **Open `Agent.xcodeproj` in Xcode.**
3. **Build and Run the `Agent` target.**
4. **Approve the Helper Tool:** When prompted, authorize the privileged daemon to allow root-level command execution.

#### Option B: Build without an Apple Developer account
2. **Run the build script** (requires only Xcode Command Line Tools):
   ```bash
   ./build.sh              # Debug build
   ./build.sh Release      # Release build
   ```
3. The app lands in `build/DerivedData/Build/Products/Debug/Agent!.app`
4. **Run it:** `open "build/DerivedData/Build/Products/Debug/Agent!.app"`

> ⚠️ Without a developer account the app is ad-hoc signed. The Launch Agent/Daemon helpers won't register (SMAppService needs a team ID), but the LLM loop, all tools, accessibility, AppleScript, shell, and MCP all work.

#### Then:
5. **Configure your AI Provider:** Go to Settings and enter your API key or select a local provider like Ollama.

> 💡 **Cheap GLM setup:** **GLM-5.1** runs on all four cheap providers — **Ollama**, **Hugging Face**, **Z.ai**, **BigModel** — at pennies per million tokens. New here? Start with **Z.ai** (fastest signup, GLM-5.1 is the default, nothing to provision). Running locally? Only **GLM-4.7-Turbo** (32B) fits on consumer hardware (M2/M3/M4 Mac, 64-128GB, via Ollama) — GLM-5 and GLM-5.1 are too large (~1.6TB), use them via the cloud providers above.

## What Can It Do?

> *"Play my Workout playlist in Music"*
> *"Build the Xcode project and fix any errors"*
> *"Take a photo with Photo Booth"*
> *"Send an iMessage to Mom saying I'll be home at 6"*
> *"Open Safari and search for flights to Tokyo"*
> *"Refactor this class into smaller files"*
> *"What calendar events do I have today?"*

Just type what you want. Agent! figures out how and makes it happen.

---

## Key Features

### 🧠 Agentic AI Framework
Built-in autonomous task loop that reasons, executes, and self-corrects. Agent! doesn't just run code; it observes the results, debugs errors, and iterates until the task is complete.

### 🛠 Agentic Coding
Full coding environment built in. Reads codebases, edits files with precision, runs shell commands, builds Xcode projects, manages git, and auto-enables coding mode to focus the AI on development tools. Replaces Claude Code, Cursor, and Cline -- no terminal, no IDE plugins, no monthly fee. Features **Time Machine-style backups** for every file change, letting you revert any edit instantly.

### 🔍 Dynamic Tool Discovery
Automatically detects and uses available tools (Xcode, Playwright, Shell, etc.) based on your prompt. No manual configuration required for core tools.

### 🛡 Privileged Execution
Securely runs root-level commands via a dedicated macOS Launch Daemon. The user approves the daemon once, then the agent can execute commands autonomously via XPC.

#### Why there's no manual `setCodeSigningRequirement` on the XPC listener

Users sometimes ask why `AgentHelper`'s XPC listener accepts connections without a manual `connection.setCodeSigningRequirement(...)` check. The short answer: **SMAppService already enforces signing identity one layer below your code**, so the check would be redundant.

That recommendation is a holdover from the pre-SMAppService **SMJobBless era**, where launchd did not validate identity for you and the XPC server had to set a designated-requirement string itself. SMAppService changed that contract:

- The app-bundle-embedded plist plus signature-gated registration **is** the code-signing requirement.
- The Mach service names (`Agent.app.toddbruss.helper`, `Agent.app.toddbruss.user`) are namespaced to the signed bundle that registered them — no other bundle can claim them.
- Any signature mismatch (tampering, re-signing, different Team ID, bundle swap) **breaks the XPC channel at the launchd layer** — `listener(_:shouldAcceptNewConnection:)` is never even invoked.

**Empirical proof:** Agent! itself attempted to re-sign its own daemons during an experiment and immediately lost the ability to connect. `NSXPCConnection` to both Mach services failed at the launchd layer before a single byte reached the listener delegate — exactly the behavior a manual `setCodeSigningRequirement` call would enforce, except SMAppService is doing it in the kernel's XPC lookup path where it cannot be bypassed from userland.

| Enforcement | Mechanism | Bypassable from userland? |
|---|---|---|
| Helper must be in signed app bundle | Gatekeeper + SMAppService registration | No |
| Helper must match app's Team ID (469UCUB275) | Code signing + SMAppService | No |
| Mach service name bound to signed bundle | launchd / XPC namespace | No |
| Helper binary hash matches registered identity | SMAppService + kernel XPC lookup | No (re-signing breaks the channel) |
| User approved the helper | System Settings → Login Items & Extensions | No (user gesture required) |

Adding `setCodeSigningRequirement` explicitly would be reasonable belt-and-braces defense-in-depth (useful only if the app were ever ported off SMAppService, or if SIP were disabled), but it is **not a gap** in the current architecture. See [docs/SECURITY.md](docs/SECURITY.md) for the full trust-anchor write-up.

### 🖥 Desktop Automation (AXorcist)
Control any Mac app through the Accessibility API. Click buttons, type into fields, navigate menus, scroll, drag -- all programmatically. Powered by [AXorcist](https://github.com/steipete/AXorcist) for reliable, fuzzy-matched element finding.

### 🤖 18 AI Providers

The provider picker (LLM Settings, toolbar button #7) shows 17 providers; Apple Intelligence is reached via the separate brain icon (#8). Source of truth: `AgentTools.APIProvider`.

| Provider | API key | Best for |
|---|---|---|
| **Claude** (Anthropic) | Paid | Long autonomous tasks, complex reasoning, prompt caching |
| **OpenAI** | Paid | General purpose, tool calling, vision |
| **Google Gemini** | Paid (free tier) | Long context, vision, fast |
| **Grok** (xAI) | Paid | Real-time info |
| **Mistral** | Paid | Open-weight cloud, fast tool calling |
| **Codestral** (Mistral) | Paid | Code-specialized Mistral |
| **Mistral Vibe** | Paid | Mistral's chat/agent product |
| **DeepSeek** | Cheap | Budget cloud, strong coding, prompt cache hit reporting |
| **Hugging Face** | Varies | Open-source models hosted serverless or on dedicated endpoints |
| **OpenRouter** | Paid | 200+ models through one API key — Claude, GPT, Gemini, Llama, Mistral, and more. Smart protocol toggle routes Claude models via Anthropic protocol, everything else via OpenAI |
| **Z.ai** | Cheap | GLM-5.1 via API — recommended starting point |
| **BigModel** (Zhipu) | Cheap | GLM family via Zhipu's API |
| **Qwen** (Alibaba) | Cheap | Qwen 2.5 / 3 via Dashscope |
| **Ollama** (cloud) | Free tier | Run open models via Ollama's hosted endpoint |
| **Local Ollama** | Free + hardware | Self-hosted Ollama daemon — fully offline, no account |
| **vLLM** | Free + hardware | Self-hosted vLLM server with prefix caching |
| **LM Studio** | Free + hardware | Self-hosted, easiest GUI for local models |
| **Apple Intelligence** | Free, on-device | Triage, summary, accessibility intent (via brain icon, not the provider picker) |

> 💡 **Self-hosted "free" providers (Local Ollama, vLLM, LM Studio) are only free in the API-fee sense.** Running a 30B+ model with usable speed needs an M2/M3/M4 Ultra Mac Studio (64-128GB unified memory) or a Linux box with 24GB+ VRAM. If you don't already have that hardware, the cloud paths above (Ollama Cloud, Hugging Face, Z.ai, BigModel, DeepSeek) are dramatically cheaper than buying it.

## Toolbar Buttons

The Agent! header contains **15 buttons** for quick access to settings, monitors, and tools. Each button opens a popover when clicked. Source of truth: `Agent/Views/HeaderSectionView.swift`.

| # | Icon | Name | What it does |
|---|------|------|--------------|
| 1 | ⚙️ | **Services** | Toggle the Launch Agent / Launch Daemon, manage project folder, scan command output |
| 2 | 💬 | **Messages Monitor** | Toggle iMessage monitoring on/off — green when active. Opens the recipients list and approval UI |
| 3 | ✋ | **Accessibility** | Open the Accessibility settings sheet (permission status, axorcist diagnostics) |
| 4 | 🖥️ | **MCP Servers** | Add/remove/configure MCP (Model Context Protocol) servers — extends Agent! with `mcp_*` tools |
| 5 |  | **Coding Preferences** | Toggle auto-verify, visual tests, auto-PR, auto-scaffold. Green when any are on |
| 6 | 🔧 | **Tools** | Per-provider tool toggles. Enable/disable individual built-in and MCP tools |
| 7 | 🧠 | **LLM Settings** | Pick AI provider, model, API key, base URL. Pulses when a task is running |
| 8 | 🧬 | **Apple Intelligence** | Configure FoundationModels (on-device Apple AI). Filled when available |
| 9 | 🎛️ | **Agent Options** | Temperature, max iterations, vision auto-screenshot, plan-mode encouragement, etc. |
| 10 | 🔄 | **Fallback Chain** | Configure provider fallback order — Agent! retries with the next provider when one fails |
| 11 | 🔲 | **HUD** | Toggle the green-CRT scanline overlay on the LLM Output view |
| 12 | 📊 | **LLM Usage** | Per-model token usage and cost tracking. Green when there's recorded usage |
| 13 | ↩️ | **Rollback** | Time-Machine-style file backup browser. Restore any previous version of any file Agent! edited |
| 14 | 🕐 | **History** | Past prompts, errors, and task summaries fo

…

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [macOS26](https://github.com/macOS26)
- **Source:** [macOS26/Agent](https://github.com/macOS26/Agent)
- **License:** MIT
- **Homepage:** https://macos26.app

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-macos26-agent
- Seller: https://agentstack.voostack.com/s/macos26
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
