MCP server that controls Arc via AppleScript, with optional CDP (remote-debugging-port) support for reading console/network events.
- macOS (Arc AppleScript)
- Arc
- Bun
bun installbun run devAdd the following config to your MCP client:
{
"mcpServers": {
"arc-devtools": {
"command": "bunx",
"args": ["--bun", "@alango/arc-devtools-mcp@latest"]
}
}
}Note: Using
@alango/arc-devtools-mcp@latestensures that your MCP client will always use the latest version.
Claude Code
Use the Claude Code CLI to add the Arc DevTools MCP server:
claude mcp add arc-devtools --scope user -- bunx --bun @alango/arc-devtools-mcp@latestClaude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"arc-devtools": {
"command": "bunx",
"args": ["--bun", "@alango/arc-devtools-mcp@latest"]
}
}
}Cursor
Go to Cursor Settings -> MCP -> New MCP Server. Use the config provided above.
Copilot / VS Code
Follow the MCP install guide and use the config provided above.
Cline
Follow the guide and use the config provided above.
Windsurf
Follow the configure MCP guide and use the config provided above.
OpenCode
Add the following to your opencode.json (guide):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"arc-devtools": {
"type": "local",
"command": ["bunx", "--bun", "@alango/arc-devtools-mcp@latest"]
}
}
}AppleScript:
arc_list_spacesarc_focus_spacearc_list_tabsarc_get_active_tabarc_open_urlarc_focus_tabarc_close_tabarc_reload_tabarc_execute_js
CDP (remote debugging):
arc_cdp_statusarc_cdp_connectarc_cdp_disconnectarc_cdp_get_consolearc_cdp_get_network
List tabs:
{"tool":"arc_list_tabs","input":{}}Open a URL:
{"tool":"arc_open_url","input":{"url":"https://example.com"}}Execute JS in active tab:
{"tool":"arc_execute_js","input":{"javascript":"console.log('hello from mcp')"}}Connect to CDP and read console/network:
{"tool":"arc_cdp_connect","input":{"port":9222}}{"tool":"arc_cdp_get_console","input":{"limit":50}}{"tool":"arc_cdp_get_network","input":{"limit":200}}CDP tools (arc_cdp_*) require Arc to be running with a remote debugging port enabled. There are two ways to set this up:
- Open Arc and navigate to
arc://inspect/#remote-debugging - Follow the dialog to enable remote debugging
Once enabled, the MCP server can connect to Arc automatically.
If Option 1 is not available, you can launch Arc manually with the remote debugging flags:
Step 1: Quit Arc
osascript -e 'tell application "Arc" to quit'Step 2: Relaunch Arc with flags
open -na "Arc" --args \
--remote-debugging-port=9222 \
--remote-allow-origins=http://127.0.0.1If you want to allow any origin (less strict):
open -na "Arc" --args \
--remote-debugging-port=9222 \
--remote-allow-origins=*Warning: Enabling the remote debugging port opens a debugging port on the running browser instance. Any application on your machine can connect to this port and control the browser. Avoid browsing sensitive websites while the debugging port is open.
ARC_MCP_CDP_ORIGIN(default:http://127.0.0.1)- Must match what you pass to
--remote-allow-origins=...(unless you use*).
- Must match what you pass to
ARC_MCP_ARC_USER_DATA_DIR- Overrides the Arc user data dir used to read
DevToolsActivePort.
- Overrides the Arc user data dir used to read
403 Forbidden/ "Rejected an incoming WebSocket connection"- Arc was launched without the matching
--remote-allow-origins=.... - Fix: restart Arc with
--remote-allow-origins=http://127.0.0.1(or*).
- Arc was launched without the matching
http://127.0.0.1:9222/json/versionreturns 404- This can happen in Arc. This server falls back to
DevToolsActivePortfor browser WebSocket discovery.
- This can happen in Arc. This server falls back to
- Port is listening but connect fails intermittently
- Arc can restart/rotate the
DevToolsActivePortUUID. Re-runarc_cdp_connect.
- Arc can restart/rotate the