axmcp

package module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

axmcp

Drive macOS apps the way a human does — through the Accessibility API, from an MCP client.

axmcp is a macOS automation toolkit built around three MCP servers and matching CLIs. It lets an LLM (or a shell script) inspect and operate native apps, Xcode projects, and iOS simulators with the same primitives Apple's own assistive technologies use.

Server What it drives Shape
cmd/axmcp Any running macOS app via AX tree, OCR, pointer, keyboard, windows Open primitive surface
cmd/xcmcp Xcode, simulators, physical devices, previews, App Store Connect Toolset-gated, ~40 tools on demand
cmd/computer-use-mcp Codex Computer Use contract on top of axmcp primitives Legacy 9-tool surface plus native discovery, observation and action tools

If you want an LLM to click through a real app: axmcp. If you want it to build, test, boot a simulator, or add an Xcode target via the File > New UI: xcmcp. If you need a drop-in for the Codex Computer Use tool contract: computer-use-mcp.

Why this exists

  • Accessibility-first, not screenshot-first. Pointer actions target AX elements by role and title, so an LLM can say "click the Build button" and get the actual button — not the pixel that looked right a moment ago.
  • OCR and screenshots are the fallback, not the plan. ax_ocr, ax_ocr_diff, and ax_ocr_click exist for Electron apps, custom canvases, and partially inaccessible UI. They ride on top of the AX flow, not around it.
  • Xcode, fully drivable. See the Xcode automation section below — from xcodebuild wrappers and simulator control all the way up to driving the File > New > Target wizard through the live UI when xcodebuild can't do the job.
  • One repo, three audiences. The primitive surface (axmcp) is for open exploration; the Codex contract (computer-use-mcp) is for drop-in replacement; the Xcode surface (xcmcp) is the IDE-adjacent tool belt. They share one set of internal packages so behavior stays consistent.

Xcode automation, top to bottom

xcmcp and its CLI twin xc cover the whole Apple-developer loop, not just xcodebuild calls. Across its toolsets it speaks to:

  • Projects and schemes — discover_projects, list_schemes, show_build_settings read .xcodeproj / .xcworkspace directly.
  • Build and test — build and test wrap xcodebuild with structured output and GetTestList / RunSomeTests for targeted runs; GetBuildLog returns the last run's log for triage.
  • Simulators — list_simulators, boot_simulator, shutdown_simulator, plus the simulator_extras toolset for open_url, add_media, app containers, orientation, appearance, location, privacy toggles, and screen recording.
  • Physical devices — physical_device toolset for inspection and app lifecycle over devicectl.
  • App lifecycle — install, uninstall, launch, terminate, logs, list_apps, running_apps across sim and device.
  • IDE bridge. The always-on Xcode bridge toolset exposes Xcode's own IDE-side helpers — XcodeRead, XcodeWrite, XcodeUpdate, XcodeGlob, XcodeGrep, XcodeLS, XcodeMV, XcodeRM, XcodeMakeDir, XcodeListNavigatorIssues, XcodeRefreshCodeIssuesInFile, XcodeListWindows, ExecuteSnippet, DocumentationSearch — so any MCP client (Cursor, Zed, Windsurf, Aider, etc.) can read project files with the IDE's own picture of the workspace, list Navigator issues, refresh diagnostics on save, and run snippets in Xcode's context.
  • Preview rendering from any agent. RenderPreview and render_all_previews return real SwiftUI preview renders, so an agent editing views can close the visual loop without a human opening Xcode to check the canvas. Pair with XcodeListNavigatorIssues and XcodeRefreshCodeIssuesInFile and the edit → render → compile-check loop runs end-to-end over MCP.
  • File > New > Target, automated. The headline: xcode_add_target drives the target-creation sheet end-to-end over AX — platform tab, template picker, product name, team, bundle ID, and the "Embed in Application" popup for extensions — then re-reads the project on disk to verify the new target/scheme actually landed. The wizard logic lives in internal/xcodewizard and is shared by both the MCP tool and xc xcode add-target.
  • Code signing and shipping — the asc toolset wraps App Store Connect and altool for authentication key management, app record queries, build uploads, and TestFlight handoff.
  • Crash reports and SPM — crash toolset lists and reads .ips reports; dependency toolset covers Swift Package Manager operations.

Everything is toolset-gated, so you only load what you need:

xcmcp --enable-all           # every toolset on
xcmcp --enable-ui-tools      # just UI automation of the sim
xcmcp --enable-asc-tools     # App Store Connect + altool

Or turn toolsets on and off dynamically inside a session via list_toolsets and enable_toolset.

Appshots

Use the standalone appshot command to capture accessibility context and an optional PNG of one running macOS window.

appshot --app com.apple.TextEdit --image omit

axmcp appshot accepts the same capture flags. MCP clients can call ax_appshot on axmcp or native_appshot on computer-use-mcp.

For Go callers, this illustrative function captures the app's focused window and writes the formatted context to a caller-provided writer.

import (
    "context"
    "io"

    "github.com/tmc/axmcp/appshot"
)

func writeAppshot(ctx context.Context, w io.Writer, app string) error {
    shot, err := appshot.Capture(ctx, app, 0, appshot.Options{Image: appshot.ImageOmit})
    if err != nil {
        return err
    }
    return appshot.WriteContext(w, shot)
}

See Appshots for permissions, image policies, and export. The module also provides axcmd for embeddable Accessibility CLI commands and ghostcursor for animated cursor overlays.

Requirements

  • macOS with Xcode installed.
  • Command Line Tools available through xcrun.
  • Go 1.26 or newer to build from source.
  • Accessibility permission for appshot and the UI operations in axmcp, ax, xcmcp, xc, and computer-use-mcp.
  • A booted simulator or connected device for simulator and device workflows.

Setup

Follow these steps in order. Every command is safe to run unattended.

1. Install the binaries

From a clone of this repo:

go install ./cmd/appshot ./cmd/axmcp ./cmd/xcmcp ./cmd/computer-use-mcp ./cmd/ax ./cmd/xc ./cmd/ascript ./cmd/ascriptmcp

Or directly from the module path without cloning:

go install github.com/tmc/axmcp/cmd/axmcp@latest
go install github.com/tmc/axmcp/cmd/xcmcp@latest
go install github.com/tmc/axmcp/cmd/computer-use-mcp@latest
go install github.com/tmc/axmcp/cmd/ax@latest
go install github.com/tmc/axmcp/cmd/xc@latest

go install writes to $(go env GOPATH)/bin (default $HOME/go/bin), or $(go env GOBIN) if set.

2. Put the install directory on PATH
export PATH="$(go env GOPATH)/bin:$PATH"

Add that line to your shell rc if you want it permanent. Verify:

command -v appshot axmcp xcmcp computer-use-mcp xc ax

The command prints the path of each installed binary it finds.

3. Note the absolute binary paths for your MCP client
echo "AXMCP=$(command -v axmcp)"
echo "XCMCP=$(command -v xcmcp)"
echo "COMPUTER_USE_MCP=$(command -v computer-use-mcp)"

You will paste these exact paths into your MCP client config in step 5.

4. Grant Accessibility permission

macOS refuses every pointer, keystroke, and AX tree call until the calling binary is explicitly approved in System Settings → Privacy & Security → Accessibility.

The first time any of axmcp, xcmcp, ax, xc, or computer-use-mcp issues an AX call, macOS refuses and adds the binary as an unchecked row in that pane. Open it and toggle each entry on.

If an action later no-ops silently or returns "not permitted," the entry was probably turned off again by a software update — re-check the toggle.

5. Register the servers with your MCP client

See MCP client configuration below for ready-to-paste snippets for Claude Code, Cursor, Zed, and the raw JSON schema.

6. Verify the server surfaces are reachable

Once your client has loaded the config, confirm the tools showed up. A quick sanity check outside any client:

printf '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}\n' | axmcp 2>/dev/null | head -c 400

Non-empty JSON with a "tools" array means the binary is healthy and its stdio MCP transport is wired up.

Quick Start

Drive any running app:

axmcp

Exposes ax_apps, ax_tree, ax_find, ax_focus, ax_click, ax_drag, ax_type, ax_menu, ax_set_value, ax_perform_action, ax_keystroke, ax_zoom, ax_pinch, ax_screenshot, ax_ocr, ax_ocr_diff, ax_action_screenshot, ax_ocr_action_diff, ax_ocr_click, ax_ocr_hover, plus window-scoped variants (ax_window_*).

Work with Xcode and simulators:

xcmcp

Always-on: discover_projects, list_schemes, show_build_settings, build, test, list_simulators, boot_simulator, shutdown_simulator, xcode_add_target, list_toolsets, enable_toolset. The Xcode bridge toolset (IDE-facing tools from xcrun mcpbridge) is enabled by default.

Optional toolsets are loaded on demand:

xcmcp --enable-ui-tools --enable-device-tools --enable-ios-tools

Or all at once:

xcmcp --enable-all

Drop-in Codex Computer Use contract:

computer-use-mcp

Exposes exactly list_apps, get_app_state, click, perform_secondary_action, set_value, scroll, drag, press_key, type_text. Call get_app_state once per turn, then act against element_index strings from the snapshot.

MCP client configuration

All three servers speak MCP over stdio. In every config below, replace /Users/you/go/bin/... with the absolute paths you printed in setup step 3.

Claude Code
claude mcp add axmcp /Users/you/go/bin/axmcp
claude mcp add xcmcp /Users/you/go/bin/xcmcp -- --enable-all
claude mcp add computer-use-mcp /Users/you/go/bin/computer-use-mcp

Or edit ~/.claude.json directly:

{
  "mcpServers": {
    "axmcp": { "command": "/Users/you/go/bin/axmcp" },
    "xcmcp": { "command": "/Users/you/go/bin/xcmcp", "args": ["--enable-all"] },
    "computer-use-mcp": { "command": "/Users/you/go/bin/computer-use-mcp" }
  }
}
Cursor

Edit ~/.cursor/mcp.json (same schema as above):

{
  "mcpServers": {
    "axmcp": { "command": "/Users/you/go/bin/axmcp" },
    "xcmcp": { "command": "/Users/you/go/bin/xcmcp", "args": ["--enable-all"] },
    "computer-use-mcp": { "command": "/Users/you/go/bin/computer-use-mcp" }
  }
}
Zed

Edit ~/.config/zed/settings.json:

{
  "context_servers": {
    "axmcp": { "command": { "path": "/Users/you/go/bin/axmcp", "args": [] } },
    "xcmcp": { "command": { "path": "/Users/you/go/bin/xcmcp", "args": ["--enable-all"] } },
    "computer-use-mcp": { "command": { "path": "/Users/you/go/bin/computer-use-mcp", "args": [] } }
  }
}
Any other MCP client

Point it at the absolute binary path with stdio transport. Optional arguments for xcmcp:

  • --enable-all — turn every optional toolset on
  • --enable-ui-tools --enable-device-tools --enable-ios-tools — pick toolsets individually
  • --enable-asc-tools — App Store Connect + altool
  • --wait-for-xcode=0s — skip waiting for Xcode at startup (for headless/CI use)

Within a session, list_toolsets and enable_toolset turn optional xcmcp toolsets on and off without restarting.

Commands

axmcp

axmcp is the open Accessibility surface. It targets running macOS applications directly through the Accessibility API, with OCR and screenshot fallbacks for custom-drawn or partially inaccessible UIs.

Primitive tools cover element discovery, pointer and keyboard input, window manipulation, screenshots, and OCR-driven interactions.

computer-use-mcp

computer-use-mcp is the stateful, session-oriented compatibility server. It holds the narrow Codex Computer Use tool contract on top of the same accessibility and screenshot primitives.

Use native_discover and native_select to retain a window on the current connection, and native_release when finished. Use native_observe and native_act for exact process/window targeting, single-use state tokens and separate execution, observation and postcondition results. See Native observations and actions for inputs, focus requirements and limitations.

The legacy action surface starts with get_app_state and uses its returned state and element indices. The server also exposes the mcp://permissions/status resource; it has no resource templates.

xcmcp

xcmcp serves tools and resources over stdio. See the Xcode automation section above for the full surface; this section just lists the optional toolsets.

Optional toolsets:

  • app: app lifecycle, install, uninstall, logs, and app listing
  • ui: UI tree, tap, inspect, query, screenshot, and wait
  • device: simulator orientation, privacy, location, appearance, and screenshots
  • ios: direct CoreSimulator-based accessibility tree and hit-testing
  • simulator_extras: open URL, add media, and app container lookup
  • physical_device: connected device inspection and app lifecycle actions
  • video: simulator recording
  • crash: crash report listing and reading
  • filesystem: file access helpers
  • dependency: Swift Package Manager helpers
  • asc: App Store Connect and altool helpers
xc

xc exposes the same Xcode automation as a direct CLI, so you can script loops that would otherwise need the IDE.

xc project                                   # resolve the Xcode project from cwd
xc sims list                                 # see all available simulators
xc sims boot 8A2F1C4D-...                    # boot one
xc build --scheme MyApp                      # xcodebuild wrapper
xc test --scheme MyApp                       # run the full test plan
xc app install ./build/MyApp.app             # install to booted sim
xc app launch com.example.MyApp --udid booted
xc app logs com.example.MyApp                # stream device/sim logs
xc ui tree --bundle-id com.apple.finder      # AX tree of a running app
xc ios tree --udid booted                    # direct CoreSimulator AX tree
xc screen shot ~/Desktop/sim.png             # simulator screenshot

# drive the File > New > Target wizard, end-to-end
xc xcode add-target \
    --template "Widget Extension" \
    --product MyWidget \
    --platform iOS \
    --embed-in MyApp
ax

ax is the direct CLI companion to axmcp:

ax apps
ax tree com.apple.finder
ax find com.apple.dt.Xcode --role AXButton --title Build
ascript and ascriptmcp

These commands inspect scriptable applications and run AppleScript-backed operations:

ascript list /Applications/Xcode.app
ascript classes /Applications/Finder.app
ascript script /Applications/Finder.app activate

Resources

xcmcp registers these MCP resources by default:

  • xcmcp://project
  • xcmcp://simulators
  • xcmcp://apps
  • xcmcp://apps/{bundle_id}/tree
  • xcmcp://apps/{bundle_id}/logs

Internal layout

Implementation packages live under internal/.

  • internal/project: discover Xcode projects, inspect schemes and build settings
  • internal/xcodebuild: build and test wrappers
  • internal/xcodewizard: File > New > Target wizard automation, shared by xc and xcmcp
  • internal/simctl: simulator management through xcrun simctl
  • internal/devicectl: physical device management
  • internal/ui: macOS Accessibility access and UI screenshots
  • internal/screen: screen capture helpers
  • internal/computeruse: shared primitives behind computer-use-mcp (app state, input, coords, policy, session, approval, intervention)
  • internal/crash: crash report listing and reading
  • internal/xcmcp/resources: xcmcp resource registration
  • internal/sdef: parser for AppleScript scripting definitions
  • internal/altool and internal/asc: App Store Connect helpers

Environment variables

axmcp reads a small set of optional environment variables. Defaults are picked for unattended use; the tunables exist mostly for debugging and demos.

Variable Default Effect
AXMCP_CURSOR_GLIDE_MS 280 Duration in milliseconds the ghost cursor takes to glide to a click target. Set to 0 to teleport.
AXMCP_CURSOR_SETTLE_MS 90 Milliseconds the cursor pauses on target in its Pressed state before the click is dispatched. 0 disables the dwell.
AXMCP_CURSOR_HOLD_MS 200 Milliseconds the cursor stays visible after the click before fading. 0 disables the hold.
AXMCP_HIGHLIGHT_HUMAN unset When set to a truthy value, draws a visible highlight around OCR matches and click targets — useful when recording demos.
AXMCP_C_SIGNAL_BACKTRACE unset When set to 1, installs a C-level signal handler that prints a native backtrace on crash. Off by default to avoid interfering with Go's own crash reporter.

Notes

  • This repository targets macOS. Many packages use AppKit, Accessibility, or Apple developer tools directly.
  • The repository name is axmcp, but it intentionally contains axmcp, xcmcp, and computer-use-mcp. They cover different layers of the same workflow surface.
  • UI automation depends on macOS Accessibility permission and on the target app being reachable through the Accessibility tree.
  • Some simulator and Xcode automation features rely on private or implementation-defined behavior and are best treated as developer tooling rather than a stable public protocol.
  • The supported entry points are the commands in cmd/. Internal packages may change without notice.

Documentation

Overview

Package axmcp exposes embeddable macOS Accessibility MCP tools and Cobra CLI commands for reuse in other servers and command-line tools, and documents the axmcp module.

Embedding MCP tools

Register all AX tools or a chosen subset on any *mcp.Server:

if err := axmcp.RegisterTools(server,
	axmcp.WithGroups(axmcp.GroupInspect, axmcp.GroupInteract),
	axmcp.WithExcludeTools(axmcp.ToolPinch),
); err != nil {
	return err
}

Embedding CLI commands

Mount the full axmcp CLI command set or a subset into another Cobra CLI:

axCmd, err := axmcp.NewCommand(
	axmcp.WithUse("ax"),
	axmcp.WithCommands(axmcp.CommandApps, axmcp.CommandTree, axmcp.CommandFind),
)
if err != nil {
	return err
}
root.AddCommand(axCmd)

Commands

The module provides the following entry points:

  • cmd/appshot, a CLI for capturing one running macOS window
  • cmd/axmcp, a stdio MCP server and CLI 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 Codex Computer Use contract with per-session application state
  • cmd/xc, a direct CLI built on the same Xcode packages
  • cmd/ax, a direct CLI for the macOS Accessibility API
  • cmd/ascript and cmd/ascriptmcp, tools for scriptable macOS applications

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.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands(opts ...CommandOption) ([]*cobra.Command, error)

Commands constructs fresh Cobra subcommands for the selected subset so they can be embedded directly into any host Cobra CLI.

func NewCommand

func NewCommand(opts ...CommandOption) (*cobra.Command, error)

NewCommand constructs a fresh parent Cobra command (default Use: "axmcp") with visibility flags and the selected subcommands attached.

Example
package main

import (
	"fmt"

	"github.com/spf13/cobra"
	"github.com/tmc/axmcp"
)

func main() {
	host := &cobra.Command{Use: "mytool"}
	sub, err := axmcp.NewCommand(
		axmcp.WithUse("ax"),
		axmcp.WithCommands(axmcp.CommandApps, axmcp.CommandFind, axmcp.CommandScreenshot),
	)
	if err != nil {
		panic(err)
	}
	host.AddCommand(sub)
	for _, c := range sub.Commands() {
		fmt.Println(c.Name())
	}
}
Output:
apps
find
screenshot

func RegisterTools

func RegisterTools(server *mcp.Server, opts ...ToolOption) error

RegisterTools registers the selected AX MCP tools on server. With no options, all 34 AX tools are registered.

Example
package main

import (
	"fmt"

	"github.com/modelcontextprotocol/go-sdk/mcp"
	"github.com/tmc/axmcp"
)

func main() {
	server := mcp.NewServer(&mcp.Implementation{Name: "my-mcp", Version: "1.0.0"}, nil)
	if err := axmcp.RegisterTools(server,
		axmcp.WithGroups(axmcp.GroupInspect),
		axmcp.WithExcludeTools(axmcp.ToolMenuRead),
	); err != nil {
		panic(err)
	}
	tools, _ := axmcp.ResolveTools(
		axmcp.WithGroups(axmcp.GroupInspect),
		axmcp.WithExcludeTools(axmcp.ToolMenuRead),
	)
	fmt.Println(len(tools))
}
Output:
6

func SetAccessibilityWait

func SetAccessibilityWait(d time.Duration)

SetAccessibilityWait configures how long AX operations wait for Accessibility permission before failing.

func SetCLIVisibility

func SetCLIVisibility(enabled bool, delay time.Duration)

SetCLIVisibility configures post-action CLI visual feedback lingering.

func SetDiagnosticWriter

func SetDiagnosticWriter(w io.Writer)

SetDiagnosticWriter directs axmcp diagnostic output to w. Passing nil restores os.Stderr.

func WaitForVisualFeedback

func WaitForVisualFeedback()

WaitForVisualFeedback sleeps briefly if a CLI command triggered visual feedback and visibility lingering is enabled.

Types

type Command

type Command string

Command identifies an embeddable axmcp CLI subcommand.

const (
	CommandApps        Command = "apps"
	CommandTree        Command = "tree"
	CommandFind        Command = "find"
	CommandPipe        Command = "pipe"
	CommandClick       Command = "click"
	CommandHover       Command = "hover"
	CommandRightClick  Command = "rightclick"
	CommandType        Command = "type"
	CommandMenu        Command = "menu"
	CommandMenuRead    Command = "menu-read"
	CommandFocus       Command = "focus"
	CommandFocusState  Command = "focus-state"
	CommandScreenshot  Command = "screenshot"
	CommandPermissions Command = "permissions"
	CommandAppshot     Command = "appshot"
)

func AllCommands

func AllCommands() []Command

AllCommands returns all embeddable axmcp CLI subcommands in canonical order.

func ReadOnlyCommands

func ReadOnlyCommands() []Command

ReadOnlyCommands returns the non-mutating axmcp CLI inspection and capture subcommands.

func ResolveCommands

func ResolveCommands(opts ...CommandOption) ([]Command, error)

ResolveCommands returns the ordered, deduplicated list of CLI subcommands selected by opts. It returns an error if any command name is unknown.

type CommandOption

type CommandOption func(*commandConfig)

CommandOption configures command selection and presentation for NewCommand and Commands.

func WithCommands

func WithCommands(cmds ...Command) CommandOption

WithCommands restricts the returned set to the named CLI subcommands.

func WithExcludeCommands

func WithExcludeCommands(cmds ...Command) CommandOption

WithExcludeCommands omits the named CLI subcommands from the returned set.

func WithUse

func WithUse(use string) CommandOption

WithUse overrides the parent command Use string returned by NewCommand (default "axmcp").

type Group

type Group string

Group identifies a logical subset of AX MCP tools.

const (
	GroupInspect  Group = "inspect"
	GroupInteract Group = "interact"
	GroupMenu     Group = "menu"
	GroupWindow   Group = "window"
	GroupCapture  Group = "capture"
	GroupOCR      Group = "ocr"
	GroupPipe     Group = "pipe"
)

func AllGroups

func AllGroups() []Group

AllGroups returns every logical AX MCP tool group.

type Tool

type Tool string

Tool identifies an embeddable AX MCP tool.

const (
	ToolApps             Tool = "ax_apps"
	ToolTree             Tool = "ax_tree"
	ToolSnapshot         Tool = "ax_snapshot"
	ToolFind             Tool = "ax_find"
	ToolPipe             Tool = "ax_pipe"
	ToolClick            Tool = "ax_click"
	ToolType             Tool = "ax_type"
	ToolMenu             Tool = "ax_menu"
	ToolMenuRead         Tool = "ax_menu_read"
	ToolFocus            Tool = "ax_focus"
	ToolListWindows      Tool = "ax_list_windows"
	ToolScreenshot       Tool = "ax_screenshot"
	ToolAppshot          Tool = "ax_appshot"
	ToolOCR              Tool = "ax_ocr"
	ToolOCRDiff          Tool = "ax_ocr_diff"
	ToolScroll           Tool = "ax_scroll"
	ToolDrag             Tool = "ax_drag"
	ToolZoom             Tool = "ax_zoom"
	ToolPinch            Tool = "ax_pinch"
	ToolActionScreenshot Tool = "ax_action_screenshot"
	ToolOCRActionDiff    Tool = "ax_ocr_action_diff"
	ToolOCRClick         Tool = "ax_ocr_click"
	ToolOCRHover         Tool = "ax_ocr_hover"
	ToolDoubleClick      Tool = "ax_double_click"
	ToolSetValue         Tool = "ax_set_value"
	ToolKeystroke        Tool = "ax_keystroke"
	ToolPerformAction    Tool = "ax_perform_action"
	ToolWindowClick      Tool = "ax_window_click"
	ToolWindowHover      Tool = "ax_window_hover"
	ToolWindowDrag       Tool = "ax_window_drag"
	ToolWindowDragPath   Tool = "ax_window_drag_path"
	ToolWindowMove       Tool = "ax_window_move"
	ToolWindowRaise      Tool = "ax_window_raise"
	ToolWindowAction     Tool = "ax_window_action"
)

func AllTools

func AllTools() []Tool

AllTools returns every AX MCP tool in canonical registration order.

func GroupTools

func GroupTools(g Group) []Tool

GroupTools returns the tools belonging to g, or nil if g is unknown.

func ResolveTools

func ResolveTools(opts ...ToolOption) ([]Tool, error)

ResolveTools returns the ordered, deduplicated list of AX MCP tools selected by opts. It returns an error if any tool or group name is unknown.

type ToolOption

type ToolOption func(*toolConfig)

ToolOption configures which AX MCP tools are registered by RegisterTools.

func WithExcludeTools

func WithExcludeTools(tools ...Tool) ToolOption

WithExcludeTools omits the named tools from registration.

func WithGroups

func WithGroups(groups ...Group) ToolOption

WithGroups restricts registration to tools in the named groups (combined with any tools selected by WithTools).

func WithTools

func WithTools(tools ...Tool) ToolOption

WithTools restricts registration to the named tools (combined with any tools selected by WithGroups).

Directories

Path Synopsis
Package appshot captures a running macOS application's accessibility context and an optional PNG of the same window.
Package appshot captures a running macOS application's accessibility context and an optional PNG of the same window.
Package axcmd provides embeddable Cobra commands for macOS Accessibility API navigation, querying, and interaction.
Package axcmd provides embeddable Cobra commands for macOS Accessibility API navigation, querying, and interaction.
cmd
appshot command
Command appshot captures a running window as accessibility context and an optional image.
Command appshot captures a running window as accessibility context and an optional image.
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 serves AppleScript commands as MCP tools on macOS.
Command ascriptmcp serves AppleScript commands as MCP tools on macOS.
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.
Package ghostcursor draws transient cursor overlays on macOS.
Package ghostcursor draws transient cursor overlays on macOS.
internal
altool
Package altool wraps xcrun altool for app upload and validation.
Package altool wraps xcrun altool for app upload and validation.
appshot
Package appshot captures and formats immutable accessibility context with an optional exact-window PNG.
Package appshot captures and formats immutable accessibility context with an optional exact-window PNG.
appshot/core
Package core implements capture, validation, and export for appshot.
Package core implements capture, validation, and export for appshot.
appshot/testfixture
Package testfixture supplies Appshot image fixtures.
Package testfixture supplies Appshot image fixtures.
appshotlex
Package appshotlex renders prepared, handle-free native appshot rows.
Package appshotlex renders prepared, handle-free native appshot rows.
appshotmcp/wire
Package wire maps appshot attachments to MCP content blocks.
Package wire maps appshot attachments to MCP content blocks.
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.
axengine
Package axengine implements the macOS Accessibility, OCR, screenshot, appshot, pipeline, and MCP tool handlers used by package axmcp and cmd/axmcp.
Package axengine implements the macOS Accessibility, OCR, screenshot, appshot, pipeline, and MCP tool handlers used by package axmcp and cmd/axmcp.
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/appstate/textgen command
Command textgen generates the fixed native text profile from pinned inputs.
Command textgen generates the fixed native text profile from pinned inputs.
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.
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.
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.
xcmcp/resources
Package resources registers MCP resources for projects, applications and simulators.
Package resources registers MCP resources for projects, applications and simulators.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL