MCP Web Browser Server
MCP Web Browser Server
An advanced web browsing server for the Model Context Protocol (MCP) powered by Playwright, enabling headless browser interactions through a flexible, secure API.
<a href="https://glama.ai/mcp/servers/lwqlaw6k6d"><img width="380" height="200" src="https://glama.ai/mcp/servers/lwqlaw6k6d/badge" alt="Web Browser Server MCP server" /></a>
🌐 Features
- Headless Web Browsing: Navigate to any website with SSL certificate validation bypass
- Full Page Content Extraction: Retrieve complete HTML content, including dynamically loaded JavaScript
- Advanced Web Interaction Tools:
- Extract text content
- Click page elements
- Input text into form fields
- Capture screenshots
- Extract page links
🚀 Quick Start
Prerequisites
- Python 3.10+
- MCP SDK
- Playwright
Installation
Configuration for Claude Desktop
Add to your claude_desktop_config.json
:
💡 Usage Examples
Basic Web Navigation
Web Interaction
Screenshot Capture
Link Extraction
🛡️ Security Features
- SSL certificate validation bypass
- Secure browser context management
- Error handling and logging
- Configurable timeout settings
🔧 Troubleshooting
Common Issues
- SSL Certificate Errors: Automatically bypassed
- Slow Page Load: Adjust timeout in
browse_to()
method - Element Not Found: Verify selectors carefully
Logging
All significant events are logged to stderr for easy debugging.
📋 Tool Parameters
browse_to(url: str, context: Optional[Any] = None)
url
: Website to navigate tocontext
: Optional context object (currently unused)
extract_text_content(selector: Optional[str] = None, context: Optional[Any] = None)
selector
: Optional CSS selector to extract specific contentcontext
: Optional context object (currently unused)
click_element(selector: str, context: Optional[Any] = None)
selector
: CSS selector of the element to clickcontext
: Optional context object (currently unused)
get_page_screenshots(full_page: bool = False, selector: Optional[str] = None, context: Optional[Any] = None)
full_page
: Capture entire page screenshotselector
: Optional element to screenshotcontext
: Optional context object (currently unused)
get_page_links(context: Optional[Any] = None)
context
: Optional context object (currently unused)
input_text(selector: str, text: str, context: Optional[Any] = None)
selector
: CSS selector of input elementtext
: Text to inputcontext
: Optional context object (currently unused)
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Development Setup
📄 License
MIT License
🔗 Related Projects
💬 Support
For issues and questions, please open an issue on GitHub.
An advanced web browsing server enabling headless browser interactions via a secure API, providing features like navigation, content extraction, element interaction, and screenshot capture.
- 🌐 Features
- 🚀 Quick Start
- 💡 Usage Examples
- 🛡️ Security Features
- 🔧 Troubleshooting
- 📋 Tool Parameters
- browse_to(url: str, context: Optional[Any] = None)
- extract_text_content(selector: Optional[str] = None, context: Optional[Any] = None)
- click_element(selector: str, context: Optional[Any] = None)
- get_page_screenshots(full_page: bool = False, selector: Optional[str] = None, context: Optional[Any] = None)
- get_page_links(context: Optional[Any] = None)
- input_text(selector: str, text: str, context: Optional[Any] = None)
- browse_to(url: str, context: Optional[Any] = None)
- 🤝 Contributing
- 📄 License
- 🔗 Related Projects
- 💬 Support