Documentation
¶
Overview ¶
Package axmcp documents the axmcp module.
axmcp is a macOS automation toolkit built around three MCP servers and matching CLIs:
- cmd/axmcp, an open Accessibility surface for any running macOS app
- cmd/xcmcp, for Xcode, simulators, devices, previews, and App Store Connect workflows
- cmd/computer-use-mcp, a stateful server that implements the Codex Computer Use tool contract on top of the same primitives
The module is command-first. Internal packages are shared implementation libraries, not a public import surface.
Commands ¶
The main entry points are:
- cmd/axmcp, a stdio MCP server for macOS Accessibility automation
- cmd/xcmcp, a stdio MCP server for project inspection, build and test, simulator control, device control, UI inspection, and Xcode integration
- cmd/computer-use-mcp, a stdio MCP server implementing the 9-tool Codex Computer Use contract with per-session application state
- cmd/xc, a direct CLI built on the same packages
- cmd/ax, a direct CLI for the macOS Accessibility API
- cmd/ascript and cmd/ascriptmcp, tools for scriptable macOS applications
Internal Packages ¶
The main implementation packages are:
- internal/project, for discovering Xcode projects and schemes
- internal/xcodebuild, for build and test execution
- internal/xcodewizard, for File > New > Target UI automation shared by cmd/xc and cmd/xcmcp
- internal/simctl, for simulator management through xcrun simctl
- internal/devicectl, for physical device management
- internal/ui, for macOS Accessibility access and UI screenshots
- internal/screen, for screen capture helpers
- internal/ghostcursor, for an animated cursor overlay
- internal/computeruse, for the primitives behind cmd/computer-use-mcp (appstate, input, coords, policy, session, approval, intervention, instruction, magnify, overlay)
- internal/crash, for crash report inspection
- internal/resources, for MCP resource registration
Environment ¶
axmcp targets macOS and assumes Xcode and the simulator tooling are installed. Packages that drive the UI require Accessibility permission in System Settings > Privacy & Security > Accessibility. Simulator and device features also depend on the corresponding runtime state, such as a booted simulator or a connected device.
cmd/axmcp honors a small set of optional AXMCP_* environment variables for ghost-cursor pacing, demo highlighting, and crash diagnostics. See the repository README for the full list with defaults and units.
This package exists to document the module as a whole. The supported entry points are the commands under cmd/. Library code lives in internal/ packages and is not intended as a public import surface.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
ascript
command
Command ascript is a CLI for exploring and running AppleScript commands against scriptable macOS applications.
|
Command ascript is a CLI for exploring and running AppleScript commands against scriptable macOS applications. |
|
ascriptmcp
command
Command ascriptmcp is an MCP server that dynamically exposes scriptable macOS applications as MCP tools by parsing their sdef (scripting definition).
|
Command ascriptmcp is an MCP server that dynamically exposes scriptable macOS applications as MCP tools by parsing their sdef (scripting definition). |
|
ax
command
Command ax is a CLI for macOS Accessibility API navigation with dynamic tab completion.
|
Command ax is a CLI for macOS Accessibility API navigation with dynamic tab completion. |
|
axmcp
command
Command axmcp is an MCP server for macOS Accessibility API automation.
|
Command axmcp is an MCP server for macOS Accessibility API automation. |
|
computer-use-mcp
command
|
|
|
xc
command
|
|
|
xcmcp
command
Command xcmcp is a MCP server that exposes various tools for interacting with Xcode projects, simulators, devices, and related resources.
|
Command xcmcp is a MCP server that exposes various tools for interacting with Xcode projects, simulators, devices, and related resources. |
|
internal
|
|
|
altool
Package altool wraps xcrun altool for app upload and validation.
|
Package altool wraps xcrun altool for app upload and validation. |
|
asc
Package asc wraps the asc CLI for App Store Connect API operations.
|
Package asc wraps the asc CLI for App Store Connect API operations. |
|
computeruse
Package computeruse defines the shared model for the session-oriented computer-use server.
|
Package computeruse defines the shared model for the session-oriented computer-use server. |
|
computeruse/approval
Package approval implements app-control approval tracking for computer-use sessions, including session and persistent approvals plus explicit deny, cancel, and persistence-failed outcomes.
|
Package approval implements app-control approval tracking for computer-use sessions, including session and persistent approvals plus explicit deny, cancel, and persistence-failed outcomes. |
|
computeruse/appstate
Package appstate builds live app snapshots for the computer-use server.
|
Package appstate builds live app snapshots for the computer-use server. |
|
computeruse/coords
Package coords converts between computer-use coordinate spaces.
|
Package coords converts between computer-use coordinate spaces. |
|
computeruse/input
Package input provides reusable input helpers for the computer-use server.
|
Package input provides reusable input helpers for the computer-use server. |
|
computeruse/instruction
Package instruction provides app-specific hints for computer-use sessions.
|
Package instruction provides app-specific hints for computer-use sessions. |
|
computeruse/intervention
Package intervention detects recent physical user input.
|
Package intervention detects recent physical user input. |
|
computeruse/magnify
Package magnify resolves semantic zoom and pinch requests into concrete backend actions.
|
Package magnify resolves semantic zoom and pinch requests into concrete backend actions. |
|
computeruse/policy
Package policy enforces computer-use safety policies.
|
Package policy enforces computer-use safety policies. |
|
devicectl
Package devicectl provides wrappers around xcrun devicectl for physical device management.
|
Package devicectl provides wrappers around xcrun devicectl for physical device management. |
|
ghostcursor
Package ghostcursor draws a transient overlay cursor for pointer actions.
|
Package ghostcursor draws a transient overlay cursor for pointer actions. |
|
purego/coresim
Package coresim provides purego bindings for CoreSimulator.framework.
|
Package coresim provides purego bindings for CoreSimulator.framework. |
|
purego/objc
Package objc provides Objective-C runtime bindings using purego.
|
Package objc provides Objective-C runtime bindings using purego. |
|
sdef
Package sdef parses macOS scripting definition (sdef) XML and generates AppleScript runners from the parsed definitions.
|
Package sdef parses macOS scripting definition (sdef) XML and generates AppleScript runners from the parsed definitions. |
|
xcodewizard
Package xcodewizard drives Xcode's File > New > Target wizard through the macOS Accessibility API.
|
Package xcodewizard drives Xcode's File > New > Target wizard through the macOS Accessibility API. |