Skip to content

Latest commit

 

History

History

mac-tools

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

mac-tools

Lets the model in BoltAI run shell commands and AppleScript on your Mac.

Tool What it runs
run_bash_command a command, with /bin/bash -c
execute_apple_script AppleScript, with osascript

These tools have the same access as your macOS account. Turn the server on only in chats where you want that.

Requirements

  • BoltAI 3
  • Python 3.10 or later. The python3 that comes with macOS is 3.9, so install a newer one with brew install python or from python.org.

Install

git clone https://github.com/BoltAI/mcp-examples.git ~/mcp-examples
cd ~/mcp-examples/mac-tools
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

Add it to BoltAI

Open Settings › MCP Servers › Edit Configuration and add one of these inside "mcpServers". Replace YOUR-NAME with your macOS user name.

Option A: BoltAI starts it

"mac-tools": {
  "command": "/Users/YOUR-NAME/mcp-examples/mac-tools/.venv/bin/python",
  "args": ["/Users/YOUR-NAME/mcp-examples/mac-tools/server.py"]
}

AppleScript needs a BoltAI version newer than 3.1.1 in this mode. On 3.1.1, use Option B.

Option B: run it in Terminal

Start the server and leave the Terminal window open:

~/mcp-examples/mac-tools/.venv/bin/python ~/mcp-examples/mac-tools/server.py --http

Then add:

"mac-tools": {
  "command": "",
  "transport": "http",
  "endpoint": "http://127.0.0.1:8765/mcp"
}

Use it

In a chat, open the Tools menu and turn on mac-tools. Then ask, for example:

  • "How much free disk space do I have?"
  • "Which apps are running right now?"
  • "Make a new note in Notes called Shopping with eggs and milk."

Permissions

The first time a script controls another app, or a command reads Documents, Desktop or Downloads, macOS asks for permission. The prompt names BoltAI (Option A) or Terminal (Option B). You can change your answer later in System Settings › Privacy & Security, under Automation and Files and Folders.

Troubleshooting

  • "Not authorized to send Apple events" (-1743): on BoltAI 3.1.1 with Option A, switch to Option B. Otherwise you denied the prompt earlier; allow it in System Settings › Privacy & Security › Automation.
  • The reply shows the tool call as text instead of running it: the model isn't handling tool calls well. Try another model.
  • The server doesn't show as running: check its status in Settings › MCP Servers. For Option B, make sure the Terminal window is still open.