stevenayl/mcp-safari-server
If you are the rightful owner of mcp-safari-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that provides programmatic control of Safari browser on macOS, ideal for web automation, testing, and debugging with AI assistants like Claude.
The Safari MCP Server is designed to enable AI assistants to interact with the Safari browser through a standardized protocol. It offers a suite of tools for navigation, element interaction, JavaScript execution, and page monitoring. This makes it particularly useful for AI-assisted web development and debugging, automated testing and quality assurance, web scraping and data extraction, real-time error monitoring, and visual regression testing. By leveraging the capabilities of the Safari MCP Server, developers can automate repetitive tasks, streamline testing processes, and enhance the efficiency of web development workflows. The server's integration with Claude Code further enhances its utility by providing real-time error monitoring and automatic error reporting, allowing for immediate fixes and continuous improvement of web applications.
Features
- Navigate: Open URLs in Safari
- Execute JavaScript: Run JS code in the current page context
- Get Page Info: Retrieve current URL and page title
- Take Screenshots: Capture the current Safari window
- Automatic Error Monitoring: Monitor JavaScript errors and send them to Claude Code for immediate fixing
Usages
usage with Claude
{ "mcpServers": { "safari": { "command": "node", "args": ["/path/to/mcp-safari-server/dist/index.js"], "env": {} } } }
usage with Claude development
{ "mcpServers": { "safari": { "command": "npx", "args": ["tsx", "/path/to/mcp-safari-server/src/index.ts"], "env": {} } } }
Tools
navigate
Navigate Safari to a URL
execute_script
Execute JavaScript in the current page
get_page_info
Get information about the current page
take_screenshot
Take a screenshot of the current Safari window
get_console_logs
Retrieve console logs from the page
refresh_page
Refresh the current page
go_back
Navigate to the previous page
go_forward
Navigate to the next page
start_error_monitoring
Start monitoring JavaScript errors
stop_error_monitoring
Stop error monitoring
click_element
Click on an element in the page
type_text
Type text into an input field
scroll_to
Scroll to an element or position
select_option
Select an option from a dropdown
get_element_text
Get the text content of an element
wait_for_element
Wait for an element to appear