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
Command computer-use-mcp serves macOS application observations and input actions over MCP.
|
Command computer-use-mcp serves macOS application observations and input actions over MCP. |
|
xc
command
Command xc builds Xcode projects and controls iOS simulators.
|
Command xc builds Xcode projects and controls iOS simulators. |
|
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. |
|
buildversion
Package buildversion reports the version of the module a binary was built from, for use as an MCP server's advertised version.
|
Package buildversion reports the version of the module a binary was built from, for use as an MCP server's advertised version. |
|
cmdflag
Package cmdflag reads command-line boolean flags before command initialization.
|
Package cmdflag reads command-line boolean flags before command initialization. |
|
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 coordinates app-control grants and revocation.
|
Package approval coordinates app-control grants and revocation. |
|
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/overlay
Package overlay draws labeled OCR matches on captured images.
|
Package overlay draws labeled OCR matches on captured images. |
|
computeruse/policy
Package policy enforces computer-use safety policies.
|
Package policy enforces computer-use safety policies. |
|
computeruse/session
Package session keeps native observations alive while actions hold leases.
|
Package session keeps native observations alive while actions hold leases. |
|
crash
Package crash lists and reads macOS crash reports.
|
Package crash lists and reads macOS crash reports. |
|
debugger
Package debugger manages LLDB sessions attached to macOS applications.
|
Package debugger manages LLDB sessions attached to macOS applications. |
|
devicectl
Package devicectl provides wrappers around xcrun devicectl for physical device management.
|
Package devicectl provides wrappers around xcrun devicectl for physical device management. |
|
focusless
Package focusless reports the window server's focus and Space state.
|
Package focusless reports the window server's focus and Space state. |
|
ghostcursor
Package ghostcursor draws a transient overlay cursor for pointer actions.
|
Package ghostcursor draws a transient overlay cursor for pointer actions. |
|
macosapp
Package macosapp discovers, launches and waits for macOS applications and windows.
|
Package macosapp discovers, launches and waits for macOS applications and windows. |
|
macsigning
Package macsigning configures signing defaults for macgo application bundles.
|
Package macsigning configures signing defaults for macgo application bundles. |
|
preview
Package preview prepares SwiftUI source and instructions for generating previews.
|
Package preview prepares SwiftUI source and instructions for generating previews. |
|
project
Package project discovers Xcode projects and reads their schemes and build settings.
|
Package project discovers Xcode projects and reads their schemes and build settings. |
|
purego/cfhandle
Package cfhandle operates on retained foreign CoreFoundation handles without converting their integer representation to Go pointers.
|
Package cfhandle operates on retained foreign CoreFoundation handles without converting their integer representation to Go pointers. |
|
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. |
|
resources
Package resources registers MCP resources for projects, applications and simulators.
|
Package resources registers MCP resources for projects, applications and simulators. |
|
screen
Package screen captures iOS simulator screenshots with optional scaling.
|
Package screen captures iOS simulator screenshots with optional scaling. |
|
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. |
|
simctl
Package simctl manages iOS simulators, installed applications and recordings.
|
Package simctl manages iOS simulators, installed applications and recordings. |
|
ui
Package ui exposes accessibility elements and application control for macOS and simulators.
|
Package ui exposes accessibility elements and application control for macOS and simulators. |
|
ui/permissions
Package permissions checks and requests macOS automation permissions and displays onboarding status.
|
Package permissions checks and requests macOS automation permissions and displays onboarding status. |
|
xcodebuild
Package xcodebuild runs Xcode builds and tests and collects products and diagnostics.
|
Package xcodebuild runs Xcode builds and tests and collects products and diagnostics. |
|
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. |