Puppeteer MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Puppeteer MCP Server
A Model Context Protocol (MCP) server that enables Cursor AI to fetch and analyze web page content using Puppeteer. Perfect for frontend development workflows where you need to inspect rendered HTML, debug components, or analyze live websites.
š Features
Web Page Fetching: Retrieve complete HTML source of any URL
Cursor Integration: Seamlessly works with Cursor AI agent
Puppeteer Powered: Uses headless Chrome for accurate rendering
TypeScript: Fully typed and maintainable codebase
Simple CLI: Easy-to-use command line interface
Related MCP server: Chrome DevTools MCP
š Prerequisites
Node.js 16+
npm or yarn
Cursor IDE
š ļø Installation
Clone or download this project
git clone https://github.com/christophe77/puppeteer-mcp
cd puppeteer-mcpInstall dependencies
npm installBuild the project
npm run buildāļø Configuration
Cursor MCP Setup
Add the following configuration to your Cursor MCP settings (~/.cursor/mcp.json):
{
"mcpServers": {
"puppeteer-mcp": {
"command": "node",
"args": ["C:\\path\\to\\your\\puppeteer-mcp\\dist\\puppeteer-mcp.js"]
}
}
}Important: Replace C:\\path\\to\\your\\puppeteer-mcp with your actual project path.
Restart Cursor
After updating the configuration, restart Cursor completely for the changes to take effect.
šÆ Usage
Method 1: Direct MCP Call (in Cursor)
@mcp puppeteer-mcp.fetchPageSource {"url": "https://example.com"}Method 2: NPM Script (Recommended)
npm run fetch https://example.comMethod 3: Windows Batch File
fetch.bat https://example.comš” Use Cases & Examples
1. Frontend Development Debugging
Scenario: Your React/Next.js component isn't rendering correctly
Problem:
The Header component logo is invisible. Check the code and fetch http://localhost:3000Solution:
Use the MCP tool to fetch the rendered HTML
Compare with your component code
Identify CSS issues, missing classes, or rendering problems
Example:
@mcp puppeteer-mcp.fetchPageSource {"url": "http://localhost:3000"}2. Component Analysis
Scenario: Debugging a complex component structure
Use Cases:
Verify if dynamic content is properly rendered
Check if conditional rendering works as expected
Analyze the final DOM structure
Debug CSS-in-JS or styled-components output
3. SEO & Meta Tag Verification
Scenario: Ensuring proper meta tags and SEO elements
Example:
@mcp puppeteer-mcp.fetchPageSource {"url": "https://myapp.com/product/123"}What to look for:
Meta descriptions
Open Graph tags
Structured data
Title tags
4. Cross-Browser Testing
Scenario: Verify how your app renders in different environments
Use Cases:
Check if CSS Grid/Flexbox works correctly
Verify responsive design
Test JavaScript functionality
Validate accessibility attributes
5. Third-Party Integration Testing
Scenario: Testing external widget or API integrations
Examples:
Payment gateway integration
Analytics tracking
Chat widgets
Social media embeds
6. Performance Analysis
Scenario: Analyzing page structure for optimization
What to analyze:
DOM complexity
Unused CSS
Inline styles
Script loading order
š§ Development
Available Scripts
# Build TypeScript
npm run build
# Build and watch for changes
npm run build:watch
# Start MCP server
npm start
# Development mode (build + watch + start)
npm run dev
# Fetch a webpage (simplified CLI)
npm run fetch <URL>Project Structure
chrome-mcp/
āāā src/
ā āāā puppeteer-mcp.ts # Main MCP server
āāā dist/ # Compiled JavaScript
āāā fetch-web.js # CLI wrapper script
āāā fetch.bat # Windows batch file
āāā package.json
āāā tsconfig.json
āāā README.mdš Troubleshooting
"No tools or prompts" in Cursor
Check the file path in
mcp.json- use absolute pathRestart Cursor completely
Verify the build - run
npm run buildTest manually - run
npm run fetch <URL>
Server not responding
Check Node.js version - requires 16+
Verify dependencies - run
npm installCheck Puppeteer - it may need to download Chrome
Permission issues
Run as administrator if needed
Check file permissions on the project directory
Verify antivirus isn't blocking the process
š Advanced Usage
Custom Puppeteer Options
You can modify src/puppeteer-mcp.ts to add custom Puppeteer options:
const browser = await puppeteer.launch({
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
});Adding More Tools
Extend the MCP server with additional tools:
server.registerTool(
'screenshot',
{
title: 'Take Screenshot',
description: 'Capture a screenshot of a webpage',
inputSchema: { url: z.string() },
},
async ({ url }) => {
// Implementation here
},
);š¤ Contributing
Fork the repository
Create a feature branch
Make your changes
Test thoroughly
Submit a pull request
š License
ISC License - see package.json for details
š Support
If you encounter issues:
Check the troubleshooting section
Verify your Cursor MCP configuration
Test with a simple URL first
Check the console for error messages
Happy coding with Cursor AI! š
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Screenshot, PDF and HTML-to-image rendering API so Claude and Cursor can see any web page.
Screenshot, PDF and HTML-to-image rendering API so Claude and Cursor can see any web page.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables LLMs to perform web browsing tasks, take screenshots, and execute JavaScript using Puppeteer for browser automation.41MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser through DevTools for automated testing, performance analysis, debugging, and web scraping. Provides reliable browser automation using Puppeteer with comprehensive DevTools access.3Apache 2.0
- AlicenseBqualityDmaintenanceEnables AI agents to automate browser interactions including navigation, content extraction, form filling, screenshots, and JavaScript execution across multiple tabs using Puppeteer.271MIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automated debugging, performance analysis, and web interaction. It leverages Puppeteer and Chrome DevTools to provide capabilities like network monitoring, console logging, and automated browser actions.-