
JCAppleScript
io.github.johnnyclemPublished by GitHub account johnnyclemv2.0.0Updated Oct 24, 2026
Control macOS apps via AppleScript/JXA: sanitized commands for Messages, Mail, Finder, and more.
Overview
A local macOS MCP server that lets an assistant control Apple apps such as Messages, Mail, Finder, Notes and Safari through AppleScript and JXA.
- What you can do
- Run arbitrary AppleScript or JXA code, or send a tell command to a named app, and check script syntax without executing it (these code-execution tools can be disabled in safe mode). Browse, search and inspect the built-in command sheets for 12 macOS apps, and dry-run a command to see the exact script it would run. Execute pre-built commands for Messages, Mail, Reminders, Calendar, Notes, Finder, Safari, Music, Terminal, System Settings, Xcode and Speech Recognition. List running applications and load extra community app definitions from JSON manifests.
- When to use it
- Useful when you want an assistant on a Mac to send messages or mail, manage reminders, calendar events, notes or files, control Music or Safari, or drive Xcode and Terminal through vetted shortcuts rather than free-form scripting.
- Requirements
- Runs as a local process on macOS 13.0 or later; the release ships a prebuilt universal binary bundle for Claude Desktop, or it can be built with Swift 5.9+. No authentication is declared. Optional environment variables: JCAS_SAFE_MODE and JCAS_APP_MANIFESTS. macOS automation permissions for the target apps are likely needed.
Installation
In SourceWeft
- Open JCAppleScript in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
JCAppleScript
A Swift package for executing AppleScript from macOS applications, featuring a built-in MCP server that lets AI assistants control macOS apps through pre-built command shortcuts.
Overview
JCAppleScript provides three components:
- JCAppleScript (library) - Core AppleScript execution engine
- AppShortcuts (library) - Registry of pre-built AppleScript commands for popular macOS apps
- jcas-mcp (executable) - MCP (Model Context Protocol) server for AI-driven app automation
Installation
Swift Package Manager
Add JCAppleScript to your Package.swift:
Then add the targets you need:
Quick Start
Using the Core Engine
When embedding untrusted values in script source, escape them first:
Using App Shortcuts
Using the MCP Server
The jcas-mcp executable is a Model Context Protocol server that AI assistants (Claude, GPT, etc.) can use to control macOS applications.
It is published to the official MCP registry as io.github.johnnyclem/jcas-mcp, and each GitHub release ships a prebuilt jcas-mcp.mcpb bundle (universal macOS binary) that can be installed directly in Claude Desktop via Settings → Extensions.
Setup with Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
Build the server:
Available MCP Tools
† Hidden and disabled when the server runs in safe mode (see below).
Server Configuration
CLI flags: jcas-mcp --manifest prints the full registry as JSON, --version prints the server version, --help shows usage.
Example AI Interaction
Supported Applications
JCAppleScript ships with command sheets for 12 built-in macOS apps:
Adding Custom App Support
Implement the ScriptableApp protocol to add support for any scriptable macOS app:
Community App Registry
JCAppleScript is designed to grow through community contributions. The app shortcut system uses a standard protocol (ScriptableApp) that makes it easy to:
- Add new applications - Implement
ScriptableAppfor any scriptable macOS app - Extend existing apps - Submit new commands for already-registered apps
- Share command sheets - Export/import app definitions via JSON manifests
We're building a browsable registry (similar to npmjs.org) where you can:
- Browse applications and their supported AppleScript commands
- Submit new commands for existing apps
- Add entirely new applications to the registry
- Generate JSON manifests for integration with other tools
Exporting and Importing the Registry
Example manifest:
The MCP server loads extra manifests from the JCAS_APP_MANIFESTS environment variable at startup.
Security Model
Registry command arguments are sanitized before script generation:
- String, file-path, and date arguments are escaped (
\,", and control characters) so they cannot break out of AppleScript string literals. - Integer and boolean arguments are strictly validated/normalized — malformed values are rejected at validation and fall back to declared defaults during generation.
- Values outside a parameter's
allowedValueslist are dropped. - Arguments that don't correspond to a declared parameter are discarded.
Commands that execute caller-supplied code (Terminal shell commands, Safari JavaScript) are flagged dangerous and can be disabled wholesale with JCAS_SAFE_MODE=1. Use the preview_app_command tool to inspect the exact script a command will run before executing it.
Note that execute_applescript, execute_jxa, and tell_application execute arbitrary code by design — only expose them to clients you trust, or run the server in safe mode.
Architecture
Requirements
- macOS 13.0+
- Swift 5.9+
Legacy
The original Objective-C implementation (2013) is preserved in the Legacy/ directory for reference. It provided basic NSAppleScript wrapping with variable substitution. The new Swift implementation builds on those concepts while adding the MCP server, app registry, and modern Swift patterns.
License
MIT License - Copyright (c) 2013 John Clem. See LICENSE for details.
Source: README.md at commit 57e718e
Tools
0Version history
1- v2.0.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts