MCP-aware Puppeteer wrapper for intelligent web automation
Features β’ Installation β’ Quick Start β’ MCP Tools β’ Examples β’ Contributing
π¬ Watch Demo Video
See Supapup in action - automated web testing with AI agents
$ puppeteer navigate https://example.com
β Navigated to https://example.com
$ puppeteer screenshot
β Screenshot taken (800x600)
[πΈ High token cost image data...]
$ # Now what? Need to inspect elements, write selectors, execute JS...$ supapup navigate https://example.com
β
Navigation successful
π URL: https://example.com
AGENT PAGE VIEW
==============================
Found 42 interactive elements
π FORMS:
β’ form: login-form
- email: form-login-email
- password: form-login-password
- submit: form-login-submit
ποΈ CONTROLS:
β’ link: sign-up β signup-link
β’ link: forgot-password β forgot-password-link
β’ button: get-started β get-started-button
β¨ Ready to interact! No screenshots needed.
Example: execute_action({actionId: "form-login-email", params: {value: "[email protected]"}})The Result?
- β‘ 10x faster - Instant structured data vs screenshots + manual inspection
- π° 90% fewer tokens - Text-based output instead of images
- π― Zero complexity - Semantic IDs ready to use, no CSS selectors needed
- π Dynamic handling - Automatically remaps after page changes
Supapup is an intelligent web automation tool that bridges the gap between AI agents and web browsers. It wraps Puppeteer with Model Context Protocol (MCP) support, providing a structured, predictable interface for programmatic web interaction.
- Semantic Element IDs: Instead of brittle CSS selectors, use meaningful IDs like
form-login-email - Structured Representation: Web pages are presented as organized, actionable interfaces
- Automatic Element Detection: Intelligently identifies interactive elements on any page
- Visual Element Mapping: Number-based element identification for easy interaction
- Unique ID Generation: Handles duplicate elements intelligently - multiple "Add to Cart" buttons get unique IDs with product context
- JavaScript Breakpoints: Set conditional breakpoints and step through code
- Variable Inspection: Examine local variables and expressions during debugging
- Automated Function Debugging: Trigger and debug specific functions automatically
- Request/Response Logging: Capture all network traffic with headers and payloads
- API Request Replay: Replay requests with modified parameters
- Request Interception: Modify requests on-the-fly with custom rules
- Network Throttling: Simulate slow connections (slow-3g, fast-3g, offline) for testing
- Performance Metrics: Track page load times and resource usage
- CAPTCHA Detection: Automatically identifies CAPTCHA pages
- Dynamic Content Handling: Waits for AJAX/DOM changes after actions
- Chunked Screenshots: Handles large pages by splitting screenshots automatically
- Browser Tab Management: Open content directly in new tabs
npm install -g supapup- First, ensure you have Claude CLI installed:
npm install -g @anthropic/claude-cli- Configure Supapup as an MCP server:
claude mcp add supapup "supapup"- Start using Supapup in Claude:
claude "Navigate to example.com and find all buttons"For more Claude CLI MCP configuration:
claude mcp help- Install Gemini CLI:
npm install -g @google/gemini-cli- Configure Supapup in your Gemini config:
{
"mcpServers": {
"supapup": {
"command": "npx",
"args": ["supapup"]
}
}
}npm install supapupgit clone https://github.com/jaspergreen/supapup.git
cd supapup
npm install
npm run build# Add Supapup to Claude CLI
claude mcp add supapup "supapup"
# Use it in a conversation
claude "Navigate to https://example.com and click the login button"
# Or start an interactive session
claude --interactive# Configure in gemini-config.json then:
gemini "Use Supapup to navigate to example.com and find all forms"navigate- Navigate to a URL and get agent-friendly page representationscreenshot- Capture screenshots with automatic chunking for large pagesclose_browser- Close the browser instance
execute_action- Execute actions on elements using semantic IDsdiscover_actions- Find all available actions on the current pageget_page_state- Get current page state and element count
devtools_visual_element_map- Create numbered visual map of page elements- JavaScript helpers for numbered elements:
window.__AGENT_PAGE__.clickElement(1)- Click element 1window.__AGENT_PAGE__.fillElement(25, "text")- Fill element 25window.__AGENT_PAGE__.highlightElement(100)- Highlight element 100window.__AGENT_PAGE__.getElementByNumber(1)- Get element DOM reference
set_breakpoint- Set JavaScript breakpoints with optional conditionsdebug_continue- Resume execution after breakpointdebug_step_over- Step over current linedebug_evaluate- Evaluate expressions in debug contextdebug_get_variables- Get local variables at breakpoint
get_network_logs- Get all network requestsget_api_logs- Get detailed API request/response logsreplay_api_request- Replay requests with modificationsintercept_requests- Set up request interception rulesnetwork_throttle- Control network speed to simulate slow connections (slow-3g, fast-3g, offline, no-throttling)
get_performance_metrics- Get page load and runtime metricsget_accessibility_tree- Get page accessibility structureinspect_element- Get detailed element propertiesevaluate_script- Execute JavaScript in page context
agent_read_content- Extract readable page content in markdown format for articles, search results, or any page text- Supports pagination for large content (Wikipedia, long articles)
- Professional HTML-to-markdown conversion
- Handles pages with thousands of elements efficiently
claude "Test the login flow on https://myapp.com - try logging in with test credentials and tell me if it works"
claude "Navigate to https://shop.example.com and add 3 different products to cart, then check if the cart total is calculated correctly"claude "Go to https://myapp.com/dashboard and check the network logs for any failed API calls. Tell me what's causing the 404 errors"
claude "Monitor the API requests on https://example.com/form when I submit the form. Check if the auth token is being sent correctly"claude "Why does the submit button on https://mysite.com/contact look broken? Take a screenshot and inspect its CSS"
claude "The layout on https://myapp.com is messed up on mobile. Can you check how it looks at 375px width and tell me what's wrong?"claude "I can't find the logout button on https://app.example.com. Can you help me locate it?"
claude "Show me all the forms on https://example.com and tell me which fields are required"claude "Check the performance metrics for https://mysite.com and tell me what's making it load slowly"
claude "Test https://heavysite.com and identify which resources are taking the longest to load"
claude "Set network throttling to slow-3g and test how https://myapp.com performs on a slow connection"claude "Read the Wikipedia article at https://en.wikipedia.org/wiki/Python_(programming_language) and summarize the key points"
claude "Extract the main content from https://news.ycombinator.com and tell me what the top stories are about"
claude "Go to https://docs.python.org/3/tutorial/ and read through the first few sections to help me understand Python basics"claude "Run through the checkout process on https://shop.com: add item to cart, go to checkout, fill in the form with test data, but stop before placing the order"
claude "Test all the navigation links on https://mysite.com and tell me if any are broken"Supapup consists of several specialized modules:
- Agent Page Generator: Creates structured representations of web pages
- Element Detector: Automatically identifies interactive elements
- ID Generator: Creates unique, semantic IDs incorporating context from parent forms, headings, and element properties
- Debugging Tools: Full Chrome DevTools Protocol integration
- Network Tools: Comprehensive request/response monitoring
- Page Analysis: Performance metrics and accessibility analysis
- DevTools Elements: Visual element mapping and manipulation
Supapup ensures every element gets a unique, meaningful ID by:
- Extracting context from parent containers (forms, sections, headings)
- Including semantic meaning (label text, placeholder, button text)
- Adding element type suffixes (button, link, input, checkbox)
- Appending unique indices to guarantee no duplicates
- Handling dynamic content with stable ID regeneration
We welcome contributions! Please see our Contributing Guidelines for details.
# Clone the repository
git clone https://github.com/jaspergreen/supapup.git
cd supapup
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build# Run test scripts
node test-agent-generator.js
node test-complex-page.cjs
node test-supapup-flow.cjsThis project is licensed under the MIT License - see the LICENSE file for details.
- Built on top of Puppeteer
- Implements Model Context Protocol (MCP)
- Inspired by the need for better AI-browser interaction
Made with β€οΈ for AI agents and developers