Why Gemini shows confirmation prompts
Gemini.app can show the prompt “Allow Gemini to run Execute Command?” before it runs a command tool, including a tool exposed by a local MCP server. The prompt is a host application safety control. If you want Gemini to proceed without repeatedly asking, AI To Local V3.2 offers a console shortcut for the Gemini preference settings described below.
Automatic approval changes how Gemini handles command confirmation on this Mac. Use it only when you understand the commands the connected AI may run, keep AI To Local folder access narrow, and leave High-Risk Shell disabled unless your task requires it.
V3.2 one-click console setup
The easiest option is built into AI To Local V3.2 (Build 20261117.44). No terminal commands are needed.
- Open the local AI To Local console at
http://127.0.0.1:18926. - Open Gemini Spark MCP.
- Select Enable 1-Click Auto-Approve and follow the confirmation shown by the console.
- Restart Gemini.app if the console asks you to do so, then test a low-risk operation in an approved project folder.
The console button applies the required Gemini preference values for you. The manual steps below let developers inspect or configure the same settings directly.
Manual configuration with defaults
Quit Gemini first, then run these commands in Terminal. They enable Gemini's command-tool YOLO preference and MCP confirmation bypass.
killall Gemini GeminiAppLauncher 2>/dev/null
defaults write com.google.GeminiMacOS user9_enableCommandToolYoloMode -data 7b2264656661756c7456616c7565223a7b225f30223a747275657d7d
defaults write com.google.GeminiMacOS user8_enableCommandToolYoloMode -data 7b2264656661756c7456616c7565223a7b225f30223a747275657d7d
defaults write com.google.GeminiMacOS bundledMcpBypassConfirmation -bool true
open -a GeminiVerify the saved preferences
This Python snippet reads the preference file under the current account's home directory, without embedding a personal username.
python3 -c '
import json
import os
import plistlib
path = os.path.expanduser("~/Library/Preferences/com.google.GeminiMacOS.plist")
with open(path, "rb") as prefs_file:
prefs = plistlib.load(prefs_file)
for key in ["user9_enableCommandToolYoloMode", "user8_enableCommandToolYoloMode", "bundledMcpBypassConfirmation"]:
value = prefs.get(key)
print(key, "->", json.loads(value) if isinstance(value, bytes) else value)
'The values should show the YOLO setting enabled and bundledMcpBypassConfirmation set to True. If the file is missing, launch Gemini once and repeat the configuration command.
Accessibility fallback for remaining prompts
If a Gemini update or a particular action still shows an approval dialog, you can use this optional AppleScript helper to click an English Allow button. It requires macOS Accessibility permission for the process that runs the script.
tell application "System Events"
if exists (process "Gemini") then
tell process "Gemini"
try
click (first button of window 1 whose name contains "Allow")
end try
end tell
end if
end tellTo run it repeatedly while Gemini is open, save it as a script and use a controlled loop with a short delay. Grant Accessibility access only to the app or terminal that needs it. Stop the helper when you no longer need it.
Configure AI To Local as local MCP
Gemini for macOS uses a local process connection for this setup. Open the AI To Local Console at http://127.0.0.1:18926, select Gemini Spark MCP, and copy the exact standalone CLI binary path shown there. In Gemini's local MCP configuration, use that path with the stdio mode argument. The example below uses the default Homebrew location; use whichever path your local console displays:
/opt/homebrew/bin/aitolocal-mcp -mode stdioThe standalone binary avoids launching the signed app bundle from a context that may be restricted by macOS Hardened Runtime. If Gatekeeper quarantine attributes prevent a trusted local copy from launching, clear those attributes and ensure the binary is executable. Replace the example path with the exact path shown by your local console:
xattr -cr /opt/homebrew/bin/aitolocal-mcp && chmod +x /opt/homebrew/bin/aitolocal-mcpUse whichever binary path your local console displays. In AI To Local, approve only the project folders the Gemini connection needs.
One-command factory reset
To remove the preference overrides and restore Gemini's default confirmation behavior, run this reset command:
defaults delete com.google.GeminiMacOS user9_enableCommandToolYoloMode 2>/dev/null; defaults delete com.google.GeminiMacOS user8_enableCommandToolYoloMode 2>/dev/null; defaults delete com.google.GeminiMacOS bundledMcpBypassConfirmation 2>/dev/null; killall Gemini 2>/dev/null; open -a GeminiFor installation, local Bearer token, and tool permission guidance, see the AI To Local documentation.