The Zypin MCP server provides essential browser automation capabilities using Playwright, allowing clients to control a browser instance through 16 core tools:
Navigation: Navigate to URLs (navigate
), go back/forward in browser history (go_back
, go_forward
), and reload pages (reload
)
Interaction: Click elements (click
), type text (type
), select dropdown options (select
), and fill multiple form fields simultaneously (fill_form
)
Information Retrieval: Get page snapshots (snapshot
), take screenshots (screenshot
), extract text content (get_text
), current URL (get_url
), and page title (get_title
)
Utilities: Wait for elements to appear (wait_for
), execute JavaScript code (evaluate
), and close the browser session (close
)
Enables browser automation using Firefox through Playwright, allowing navigation, form interaction, element manipulation, and screenshot capture for web scraping and testing workflows
Zypin MCP
A simple MCP (Model Context Protocol) server for browser automation using Playwright. This is a simplified version that focuses on essential browser automation features without the complexity of the full Playwright MCP server.
Features
Simple Setup: Minimal configuration and dependencies
Essential Tools: Core browser automation functionality
Fast: Lightweight implementation with minimal overhead
Reliable: Focused on the most commonly used features
Project Structure
File Descriptions
index.js
: Main entry point that sets up the MCP server, handles CLI arguments, and manages the browser lifecyclebrowser.js
: Simple wrapper around Playwright that provides essential browser automation methodstools.js
: Defines all 16 MCP tools with their schemas and handlerstest.js
: Basic test suite to verify core functionality.gitignore
: Minimal git ignore rules for essential exclusions
Architecture
The project follows a simple, modular architecture:
Component Interactions
MCP Client sends requests to the server via STDIO transport
index.js receives MCP protocol messages and routes them to appropriate handlers
tools.js defines the available tools and their schemas
browser.js executes the actual browser automation commands
Key Design Principles
Single Responsibility: Each file has a clear, focused purpose
Minimal Dependencies: Only 3 essential packages
Command Line Only: Simple CLI options, no config files
Essential Tools Only: 16 tools covering 80% of use cases
Error Handling: Clear error messages and graceful failures
Quick Start
Installation
Option 1: Standalone Installation
Option 2: Integrated with Zypin Core (Recommended)
Basic Usage
Standalone Usage
Add to your MCP client configuration:
Integrated Usage (Zypin Core)
Benefits of Zypin Core Integration:
✅ Unified CLI interface
✅ Automatic updates with
zypin update
✅ Integrated with testing workflow
✅ Consistent command structure
Command Line Options
Standalone Usage
Integrated Usage (Zypin Core)
Available Options:
--browser <browser>
: Browser to use (chromium, firefox, webkit) - default: chromium--headless
: Run in headless mode (default)--headed
: Run in headed mode (overrides headless)--width <width>
: Viewport width - default: 1280--height <height>
: Viewport height - default: 720--timeout <timeout>
: Default timeout in milliseconds - default: 30000
Default Settings:
Browser: chromium
Mode: headless
Viewport: 1280x720
Timeout: 30000ms
Available Tools
Navigation
navigate(url)
- Go to a URLgo_back()
- Go back to previous pagego_forward()
- Go forward to next pagereload()
- Reload current page
Interaction
click(selector)
- Click an elementtype(selector, text)
- Type text into input fieldselect(selector, value)
- Select option from dropdownfill_form(fields)
- Fill multiple form fields
Information
snapshot()
- Get page snapshot with interactive elementsscreenshot(filename?)
- Take screenshotget_text(selector)
- Get text from elementget_url()
- Get current URLget_title()
- Get page title
Utilities
wait_for(selector, timeout?)
- Wait for element to appearevaluate(script)
- Run JavaScript on pageclose()
- Close browser
Integration with Zypin Core
Zypin MCP is now integrated into the Zypin Core framework, providing a unified testing and automation experience.
Complete Testing Workflow
MCP Client Configuration
When using Zypin Core integration, configure your MCP client to use the integrated command:
Benefits of Integration
Unified Interface: All testing tools accessible through one CLI
Automatic Updates: MCP server updates with
zypin update
Consistent Workflow: Same command patterns across all tools
Integrated Monitoring: Health checks and process management
Template Support: MCP projects can be created from templates
Examples
Basic Navigation
Form Interaction
Element Interaction
Comparison with Full Playwright MCP
Feature | Zypin MCP | Full Playwright MCP |
Bundle Size | ~10MB | ~50MB |
Dependencies | 3 | 15+ |
Configuration | CLI only | 50+ options |
Tools | 15 essential | 30+ advanced |
Setup Time | 2 minutes | 10+ minutes |
Use Cases | 80% of scenarios | 100% of scenarios |
Requirements
Node.js 18 or newer
MCP-compatible client (VS Code, Cursor, Claude Desktop, etc.)
License
MIT
Development
Running Tests
Adding New Tools
To add a new tool:
Add the tool definition to
tools.js
:
Add corresponding method to
browser.js
if neededUpdate this README with the new tool documentation
Project Metrics
Lines of Code: ~500 lines total
Files: 6 core files
Dependencies: 3 packages
Bundle Size: ~10MB
Startup Time: < 2 seconds
Contributing
This is a simplified version focused on essential functionality. For advanced features, consider using the full Playwright MCP server.
Guidelines
Keep it simple - avoid adding complexity unless absolutely necessary
Focus on the 80% use case - don't add features for edge cases
Maintain the single-file architecture for each component
Test any changes with the included test suite
Troubleshooting
Common Issues
Browser not found error:
MCP client connection issues:
Ensure the server starts without errors:
npx https://github.com/zypin-testing/zypin-mcp --help
Check that your MCP client configuration is correct
Verify the server is running in the correct directory
Tool execution errors:
Check that selectors are valid CSS selectors
Ensure elements exist on the page before interacting
Use
wait_for
tool to wait for elements to appear
Command line issues:
Check that browser type is one of:
chromium
,firefox
,webkit
Ensure viewport dimensions are positive numbers
Verify command line arguments are valid
Debug Mode
Run with debug output:
Getting Help
Check the MCP documentation
Review the Playwright documentation
Test with the included
test.js
file
local-only server
The server can only run on the client's local machine because it depends on local resources.
A lightweight MCP server for browser automation using Playwright with essential tools for navigation, form interaction, and web scraping. Provides 16 core browser automation tools with minimal setup and fast performance.