Safari
Native Safari browser automation for AI agents. 80 tools via AppleScript — zero overhead, keeps logins, runs silently in background. Drop-in alternative to Chrome DevTools MCP with 40-60% less CPU/heat on Apple Silicon.
What is Safari?
Safari is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to native safari browser automation for ai agents. 80 tools via applescript — zero overhead, keeps logins, runs silently in background. drop-in alternative to chrome devtools mcp with 40-60% less cpu/hea...
Native Safari browser automation for AI agents. 80 tools via AppleScript — zero overhead, keeps logins, runs silently in background. Drop-in alternative to Chrome DevTools MCP with 40-60% less CPU/heat on Apple Silicon.
This server falls under the Browser Automation category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Native Safari browser automation for AI agents. 80 tools via
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx safariConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Safari
The Safari MCP server provides native Safari browser automation for AI agents on macOS through AppleScript, exposing 80 tools covering navigation, DOM interaction, data extraction, storage access, screenshots, PDF export, network monitoring, and device emulation. Because it drives Safari directly rather than launching a separate browser instance via Chrome DevTools Protocol, it preserves existing login sessions, runs silently in the background, and uses 40-60% less CPU and battery compared to Chrome-based alternatives — making it well-suited for Apple Silicon Macs. Developers building AI agents that need to browse the web, fill forms, or extract structured data from authenticated sites will find it a low-friction drop-in replacement for Playwright or Puppeteer MCP servers.
Prerequisites
- macOS (any version that includes Safari) with Node.js 18+ installed
- Safari setting enabled: Settings > Advanced > Show features for web developers
- Safari Develop menu setting enabled: Develop > Allow JavaScript from Apple Events
- System permissions granted: Screen Recording, Automation > Safari, and Accessibility (for native interaction tools)
- An MCP-compatible client such as Claude Desktop or Cursor
Enable Safari developer and JavaScript-from-Apple-Events settings
Open Safari Preferences/Settings. Under Advanced, enable 'Show features for web developers'. Then open the Develop menu and enable 'Allow JavaScript from Apple Events'. This is required for AppleScript-based automation to work.
Grant macOS system permissions
Go to System Settings > Privacy & Security and grant the following permissions to Terminal (or your MCP client app): Screen Recording, Automation > Safari, and Accessibility. Restart the app after granting permissions.
Install safari-mcp via npm
Install the package globally or use npx to run it on-demand. The global install is useful if you want the binary available system-wide.
npm install -g safari-mcp
# or run on-demand with:
npx safari-mcpAdd to Claude Desktop config
Edit your claude_desktop_config.json to register the safari-mcp server. The npx approach runs it on-demand without a global install.
{
"mcpServers": {
"safari": {
"command": "npx",
"args": ["safari-mcp"]
}
}
}Add via Claude Code CLI (alternative)
If you use Claude Code in the terminal, add the server with a single CLI command.
claude mcp add safari -- npx safari-mcpRestart your MCP client and test
Restart Claude Desktop. Ask Claude to navigate to a URL in Safari to verify the 80 automation tools are available and working.
Safari Examples
Client configuration (Claude Desktop)
Add this to ~/Library/Application Support/Claude/claude_desktop_config.json on macOS.
{
"mcpServers": {
"safari": {
"command": "npx",
"args": ["safari-mcp"]
}
}
}Prompts to try
Use Claude to drive Safari for navigation, data extraction, and form interactions.
- "Navigate to https://news.ycombinator.com and extract the top 10 story titles and their URLs"
- "Take a screenshot of the current Safari tab"
- "Fill in the login form on the current page with my email and password, then click Sign In"
- "Export the current page to PDF and save it to my Downloads folder"
- "Emulate an iPhone 15 screen size and take a screenshot to check mobile layout"Troubleshooting Safari
AppleScript permission denied or Safari automation not working
Go to System Settings > Privacy & Security > Automation and ensure your terminal or MCP client has permission to control Safari. Also verify that 'Allow JavaScript from Apple Events' is checked in Safari's Develop menu.
Screenshot tool fails with Screen Recording permission error
Open System Settings > Privacy & Security > Screen Recording and add your terminal application or the MCP client. You may need to fully quit and relaunch the app after granting the permission.
Tools appear but interactions have no effect on the browser
Ensure Safari is the active browser and the target tab is open. Some tools require the page to be fully loaded. Use safari_snapshot first to get the current page state and element references before attempting click or fill operations.
Frequently Asked Questions about Safari
What is Safari?
Safari is a Model Context Protocol (MCP) server that native safari browser automation for ai agents. 80 tools via applescript — zero overhead, keeps logins, runs silently in background. drop-in alternative to chrome devtools mcp with 40-60% less cpu/heat on apple silicon. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Safari?
Follow the installation instructions on the Safari GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Safari?
Safari works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Safari free to use?
Yes, Safari is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Safari Alternatives — Similar Browser Automation Servers
Looking for alternatives to Safari? Here are other popular browser automation servers you can use with Claude, Cursor, and VS Code.
Chrome DevTools MCP
★ 40.6kAI-powered Chrome automation server with natural language element detection. Control Chrome browser through MCP protocol for testing, debugging, and performance analysis. Features 91% accuracy in element location, works with free AI models, and suppo
UI TARS Desktop
★ 34.9k📇 🏠 - Browser automation capabilities using Puppeteer, both support local and remote browser connection.
Playwright
★ 32.8kA production-ready browser automation server that enables AI assistants to interact with web pages using tools for navigation, element interaction, and data extraction. It features a built-in Inspector UI and robust crash recovery for reliable automa
Page Agent
★ 18.0kJavaScript in-page GUI agent. Control web interfaces with natural language.
Chrome
★ 11.7kAn extension-based MCP server that enables AI assistants to control your browser, leveraging existing sessions and login states for automation and content analysis. It provides over 20 tools for semantic tab search, interactive element manipulation,
LAMDA
★ 7.8kThe most powerful Android RPA agent framework, next generation mobile automation.
Browse More Browser Automation MCP Servers
Explore all browser automation servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Safari in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Safari?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.