bb-applescript
A Model Context Protocol (MCP) server that enables LLM clients to interact with macOS applications through AppleScript. Built using the @beyondbetter/bb-mcp-server library, this server provides safe, controlled execution of predefined scripts with optional support for arbitrary script execution.
claude mcp add --transport stdio beyond-better-bb-applescript-mcp-server deno run --allow-all --unstable-kv jsr:@beyondbetter/bb-applescript-mcp-server
How to use
This MCP server exposes AppleScript capabilities to LLM clients via the Beyond Better bb-mcp-server framework. It enables safe, structured interaction with macOS applications through predefined AppleScript scripts bundled in the server (e.g., Finder operations, BBEdit integration, and other scriptable apps). By default, arbitrary script execution is disabled for safety, and a plugin system governs which tools are available. You can enable specific plugins and adjust timeouts to balance responsiveness with safety.
To use the server, configure it as an MCP server in your BB (Beyond Better) environment. The Quick Start demonstrates running the server from JSR (no installation required) by launching Deno with the bb-applescript MCP server package. The server provides a standard AppleScript toolkit (e.g., read_dictionary, check_permissions, and Finder operations) as well as BBEdit-related tools. You can run or test the server locally, or connect Claude Desktop or other clients by pointing them at the server configuration. The available tools are accessed through the MCP API, and responses are structured with clear errors and hints suitable for LLM-based interactions.
How to install
Prerequisites:
- macOS with AppleScript support
- Deno 2.5.0 or later
- A host environment capable of running MCP servers (e.g., Beyond Better BB integration, Claude Desktop, or your own client)
Option A: Run directly (no install required)
- Ensure Deno is installed: curl -fsSL https://deno.land/install.sh | sh
- Start using the server via JSR-like integration (as demonstrated in the README): deno run --allow-all --unstable-kv jsr:@beyondbetter/bb-applescript-mcp-server
- If integrating with Claude Desktop, configure via claude_desktop_config.json as shown in the README: { "mcpServers": { "applescript": { "command": "deno", "args": [ "run", "--allow-all", "--unstable-kv", "jsr:@beyondbetter/bb-applescript-mcp-server" ] } } }
Option B: Run from a local repository (development)
- Clone the repository and navigate to the server folder: git clone https://github.com/your-username/bb-mcp-applescript.git cd bb-mcp-applescript/server
- Copy environment template and adjust as needed: cp .env.example .env
- Edit .env to customize transport, timeouts, and enabling scripts: MCP_TRANSPORT=stdio LOG_LEVEL=info ENABLE_ARBITRARY_SCRIPTS=false APPLESCRIPT_TIMEOUT_DEFAULT=30000 APPLESCRIPT_TIMEOUT_MAX=300000
- Run in development mode with auto-reload or production mode:
deno task dev
or
deno task start - Configure in Beyond Better as described in the README to expose the server to clients.
Additional notes
Notes and tips:
- The server ships with standard AppleScript plugins by default, including safe tools for read_dictionary, check_permissions, and Finder interactions. ArbitraryScript execution is disabled by default and only becomes available if ENABLE_ARBITRARY_SCRIPTS is set to true in environment/config.
- Timeouts are configurable via APPLESCRIPT_TIMEOUT_DEFAULT and APPLESCRIPT_TIMEOUT_MAX. Set values to fit your workload and to prevent long-running scripts from blocking the MCP server.
- When integrating with Claude Desktop or BB, you typically point the MCP server configuration to the deno command with the jsr package path. Ensure the path in your client configuration matches how you run the server.
- Plugins can be controlled with PLUGINS_ALLOWED_LIST and PLUGINS_BLOCKED_LIST to restrict or permit specific capabilities.
- If you plan to develop or customize AppleScript scripts, you can modify the scripts under server/src/plugins/standard.plugin/scripts and server/src/plugins/bbedit.plugin/scripts.
Related MCP Servers
mcp-searxng
MCP Server for SearXNG
mcp-ts-template
TypeScript template for building Model Context Protocol (MCP) servers. Ships with declarative tools/resources, pluggable auth, multi-backend storage, OpenTelemetry observability, and first-class support for both local and edge (Cloudflare Workers) runtimes.
mem0
✨ mem0 MCP Server: A memory system using mem0 for AI applications with model context protocl (MCP) integration. Enables long-term memory for AI agents as a drop-in MCP server.
ez
The easiest path to getting an MCP server going
rdkit
MCP server that enables language models to interact with RDKit through natural language
ntfy
An MCP (Model Context Protocol) server designed to interact with the ntfy push notification service. It enables LLMs and AI agents to send notifications to your devices with extensive customization options.