We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lxman/safari-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
#!/bin/bash
# Safari MCP Server Setup Script
# This script helps set up the development environment
echo "π Setting up Safari MCP Server..."
# Check if we're on macOS
if [[ "$OSTYPE" != "darwin"* ]]; then
echo "β Error: This server only works on macOS"
echo " Safari and SafariDriver are only available on macOS systems"
exit 1
fi
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "β Error: Node.js is not installed"
echo " Please install Node.js 18+ from https://nodejs.org/"
exit 1
fi
# Check Node.js version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "β Error: Node.js version 18+ is required"
echo " Current version: $(node -v)"
echo " Please update Node.js from https://nodejs.org/"
exit 1
fi
echo "β
Node.js version: $(node -v)"
# Check if Safari is available
if ! command -v safaridriver &> /dev/null; then
echo "β Error: SafariDriver not found"
echo " SafariDriver should be available at /usr/bin/safaridriver"
echo " Make sure you're running macOS with Safari 10+"
exit 1
fi
echo "β
SafariDriver found: $(which safaridriver)"
# Install dependencies
echo "π¦ Installing dependencies..."
npm install
if [ $? -ne 0 ]; then
echo "β Error: Failed to install dependencies"
exit 1
fi
echo "β
Dependencies installed"
# Build the project
echo "π¨ Building project..."
npm run build
if [ $? -ne 0 ]; then
echo "β Error: Failed to build project"
exit 1
fi
echo "β
Project built successfully"
# Check Safari configuration
echo "π Checking Safari configuration..."
# Check if Developer menu is enabled (we can't check this programmatically)
echo "β οΈ Please ensure Safari is configured:"
echo " 1. Safari β Preferences β Advanced β 'Show Develop menu in menu bar' β"
echo " 2. Develop β Allow Remote Automation β"
# Try to enable SafariDriver
echo "π§ Attempting to enable SafariDriver..."
echo " You may be prompted for your admin password..."
sudo safaridriver --enable
if [ $? -eq 0 ]; then
echo "β
SafariDriver enabled successfully"
else
echo "β οΈ SafariDriver enable failed. You may need to run manually:"
echo " sudo safaridriver --enable"
fi
echo ""
echo "π Setup complete!"
echo ""
echo "Next steps:"
echo "1. Run the server: npm start"
echo "2. Add to Claude Desktop config:"
echo " File location: ~/Library/Application Support/Claude/claude_desktop_config.json"
echo ""
echo " Add this configuration:"
echo " {"
echo ' "mcpServers": {'
echo ' "safari-devtools": {'
echo ' "command": "node",'
echo " \"args\": [\"$(pwd)/build/index.js\"]"
echo " }"
echo " }"
echo " }"
echo ""
echo "3. Restart Claude Desktop to load the server"
echo ""
echo "For more information, see README.md"