Installation Guide
Installation Guide
Section titled “Installation Guide”Version: 1.1.0
Reading Time: 5 minutes
Prerequisites
Section titled “Prerequisites”Before installing, ensure you have:
- Node.js 18.0.0+ (20.0.0+ recommended)
- npm 9.0.0+ (10.0.0+ recommended)
Check your versions:
node --version # Should show v18.0.0 or highernpm --version # Should show 9.0.0 or higher
Installation Methods
Section titled “Installation Methods”🚀 Method 1: Quick Try (No Installation)
Section titled “🚀 Method 1: Quick Try (No Installation)”Perfect for testing or one-time use:
npx puppeteer-mcp
This downloads and runs the latest version automatically.
📦 Method 2: Global Installation
Section titled “📦 Method 2: Global Installation”Best for CLI usage and Claude Desktop integration:
npm install -g puppeteer-mcp
After installation, run from anywhere:
puppeteer-mcp
🔧 Method 3: Project Installation
Section titled “🔧 Method 3: Project Installation”For integration into your Node.js application:
npm install puppeteer-mcp
Add to your code:
const { PuppeteerMCP } = require('puppeteer-mcp');// orimport { PuppeteerMCP } from 'puppeteer-mcp';
🐳 Method 4: Docker Installation
Section titled “🐳 Method 4: Docker Installation”For containerized deployments:
# Using pre-built image (when available)docker pull puppeteer-mcp:latestdocker run -p 3000:3000 puppeteer-mcp
# Or build from sourcegit clone https://github.com/williamzujkowski/puppeteer-mcp.gitcd puppeteer-mcpdocker build -t puppeteer-mcp .docker run -p 3000:3000 -p 50051:50051 puppeteer-mcp
📁 Method 5: From Source
Section titled “📁 Method 5: From Source”For development or customization:
# Clone the repositorygit clone https://github.com/williamzujkowski/puppeteer-mcp.gitcd puppeteer-mcp
# Install dependenciesnpm install
# Build the projectnpm run build
# Start the servernpm start
Platform-Specific Instructions
Section titled “Platform-Specific Instructions”🐧 Linux
Section titled “🐧 Linux”Ubuntu/Debian Dependencies
Chrome requires additional system libraries:
sudo apt-get updatesudo apt-get install -y \ libnss3 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libxkbcommon0 \ libxcomposite1 \ libxdamage1 \ libxrandr2 \ libgbm1 \ libgtk-3-0 \ libasound2
CentOS/RHEL/Fedora Dependencies
sudo yum install -y \ alsa-lib \ atk \ cups-libs \ gtk3 \ libXcomposite \ libXdamage \ libXrandr \ libgbm \ libxkbcommon \ pango
Alpine Linux (Docker)
# Add to your DockerfileRUN apk add --no-cache \ chromium \ nss \ freetype \ freetype-dev \ harfbuzz \ ca-certificates \ ttf-freefont
🍎 macOS
Section titled “🍎 macOS”Chrome dependencies are typically handled automatically. If you encounter issues:
# Install Xcode Command Line Tools if neededxcode-select --install
# Using Homebrew (optional)brew install --cask google-chrome
🪟 Windows
Section titled “🪟 Windows”Windows Setup
-
Use PowerShell as Administrator
-
Install via npm:
Terminal window npm install -g puppeteer-mcp -
For WSL2 (Recommended):
- Install WSL2:
wsl --install
- Follow Linux instructions inside WSL2
- Install WSL2:
Verify Installation
Section titled “Verify Installation”Check Installation
Section titled “Check Installation”# For global installpuppeteer-mcp --version
# For project installnpx puppeteer-mcp --version
Test Server Startup
Section titled “Test Server Startup”# Start the serverpuppeteer-mcp
# In another terminal, check healthcurl http://localhost:8443/api/v1/health
Expected response:
{ "status": "healthy", "version": "1.1.0", "uptime": 12.345, "timestamp": "2025-01-05T12:00:00.000Z"}
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”❌ Permission Denied (EACCES)
Problem: npm ERR! code EACCES
Solutions:
-
Use npx instead:
Terminal window npx puppeteer-mcp -
Fix npm permissions:
Terminal window mkdir ~/.npm-globalnpm config set prefix '~/.npm-global'echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrcsource ~/.bashrcnpm install -g puppeteer-mcp -
Use a Node version manager (recommended):
Terminal window # Install nvmcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash# Install Node.jsnvm install 20nvm use 20npm install -g puppeteer-mcp
❌ Chrome Download Failed
Problem: Puppeteer can’t download Chrome
Solutions:
-
Behind a proxy:
Terminal window export HTTPS_PROXY=http://proxy.company.com:8080export HTTP_PROXY=http://proxy.company.com:8080npm install puppeteer-mcp -
Use system Chrome:
Terminal window export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=trueexport PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chromenpm install puppeteer-mcp -
Change download host:
Terminal window export PUPPETEER_DOWNLOAD_HOST=https://storage.googleapis.comnpm install puppeteer-mcp
❌ Chrome Won't Start
Problem: “Failed to launch the browser process”
Solution: Install missing dependencies
# Ubuntu/Debiansudo apt-get updatesudo apt-get install -y $(cat <<EOFlibnss3 libatk-bridge2.0-0 libdrm2 libxkbcommon0libgbm1 libasound2 libatspi2.0-0 libxshmfence1EOF)
# Or run in Docker which includes all dependencies
❌ Port Already in Use
Problem: Error: listen EADDRINUSE
Solutions:
-
Find and kill the process:
Terminal window # Linux/macOSlsof -i :3000kill -9 <PID># Windowsnetstat -ano | findstr :3000taskkill /PID <PID> /F -
Use different port:
Terminal window PORT=3001 puppeteer-mcp
Advanced Troubleshooting
Section titled “Advanced Troubleshooting”🔍 Debug Mode
Enable verbose logging:
DEBUG=puppeteer:* NODE_ENV=development puppeteer-mcp
🧹 Clean Installation
If all else fails, try a clean installation:
# Remove global packagenpm uninstall -g puppeteer-mcp
# Clear npm cachenpm cache clean --force
# Remove node_modules in projectrm -rf node_modules package-lock.json
# Reinstallnpm install -g puppeteer-mcp
Next Steps
Section titled “Next Steps”✅ Installation complete! Now:
- Configure your environment - Set up authentication and customize settings
- Try your first automation - Run basic examples
- Set up Claude Desktop - Enable AI-powered automation
Getting Help
Section titled “Getting Help”- 📚 Check the FAQ for common questions
- 💬 Open an issue on GitHub
- 🔍 Search existing issues for solutions
Tip: Having issues? Try npx puppeteer-mcp
first - it often resolves installation problems! 🎯