DrissionPage MCP Server
A professional browser automation server that enables MCP clients to perform structured web navigation, element interaction, and data extraction using the DrissionPage framework. It features 14 deterministic tools optimized for LLMs to automate web workflows efficiently without relying on vision-based models.
README
DrissionPage MCP Server
Professional browser automation for Claude Code and MCP clients powered by DrissionPage
Official Repositories: GitHub | GitCode
🚀 What is DrissionPage MCP?
DrissionPage MCP Server is a production-ready Model Context Protocol (MCP) server that brings professional browser automation capabilities to Claude Code, Claude Desktop, and other MCP clients.
Unlike screenshot-based approaches, it provides structured, deterministic web automation through 14 powerful tools that leverage the efficiency of DrissionPage, a high-performance browser automation framework.
🌟 Why Choose DrissionPage MCP?
- LLM-Optimized: Works with structured data instead of requiring vision models
- Deterministic: Reliable element selection with CSS and XPath support
- Fast & Lightweight: Built on DrissionPage's efficient engine with minimal overhead
- Type-Safe: Full type hints and Pydantic validation for all tools
- Production Ready: Thoroughly tested and documented, ready for real-world use
- Easy Integration: Simple
pip install+ JSON configuration
⚡ Quick Install
# Install from PyPI
pip install drissionpage-mcp
# Verify installation
drissionpage-mcp --version
📦 Setup in Claude Code (30 seconds)
-
Edit MCP configuration:
- macOS/Linux:
~/.config/claude-code/mcp_settings.json - Windows:
%APPDATA%\claude-code\mcp_settings.json
- macOS/Linux:
-
Add this configuration:
{ "mcpServers": { "drissionpage": { "command": "drissionpage-mcp" } } } -
Restart Claude Code and start using!
🎯 Quick Examples
Navigate and Screenshot
"Visit https://example.com and take a screenshot for me"
Search and Extract
"Go to Wikipedia, search for Python, and get the first paragraph"
Form Automation
"Fill out the form at https://httpbin.org/forms/post and submit it"
Data Scraping
"Get the top 10 news headlines from news.ycombinator.com"
🛠️ 14 Powerful Tools
🌐 Navigation (4 tools)
page_navigate- Navigate to any URLpage_go_back/page_go_forward- Browser historypage_refresh- Reload current page
🎯 Element Interaction (3 tools)
element_find- Find elements by CSS selector or XPathelement_click- Click any elementelement_type- Input text into elements
📸 Page Operations (5 tools)
page_screenshot- Capture full page or viewportpage_resize- Adjust browser windowpage_click_xy- Click by coordinatespage_close- Close browserpage_get_url- Get current URL
⏱️ Wait Operations (2 tools)
wait_for_element- Wait for element to appear (with timeout)wait_time- Delay execution
📚 Documentation
| Guide | Description |
|---|---|
| QUICKSTART.md | 5-minute setup guide |
| USAGE_GUIDE.md | Complete usage reference |
| TESTING_AND_INTEGRATION.md | Integration with MCP clients |
| examples/README.md | Configuration examples |
🏗️ Architecture
Built with clean, modular design:
DrissionMCP/
├── src/
│ ├── cli.py # Entry point
│ ├── server.py # MCP server
│ ├── context.py # Browser management
│ ├── response.py # Response formatting
│ ├── tab.py # Page operations
│ └── tools/ # 14 automation tools
├── examples/ # Configuration templates
├── tests/ # Unit tests
└── playground/ # Testing utilities
Key Principles:
- ✅ Type-safe Pydantic models for all tools
- ✅ Async/await throughout
- ✅ Clean separation of concerns
- ✅ Comprehensive error handling
- ✅ Full test coverage
🔧 Configuration
Basic Setup (Recommended)
{
"mcpServers": {
"drissionpage": {
"command": "drissionpage-mcp"
}
}
}
Advanced Setup
{
"mcpServers": {
"drissionpage": {
"command": "drissionpage-mcp",
"args": ["--log-level", "DEBUG"],
"env": {
"CHROME_PATH": "/custom/path/to/chrome"
}
}
}
}
See examples/README.md for more configuration options.
📋 Requirements
- Python 3.8+ (3.11+ recommended)
- Chrome or Chromium browser
- Any MCP-compatible client: Claude Code, Claude Desktop, Cursor, VS Code, etc.
🧪 Testing
Verify Installation
# Quick verification
python -c "from DrissionPage import ChromiumPage; p = ChromiumPage(); print('✅ Ready')"
# Or run tests
pip install -e ".[dev]"
pytest tests/
Try It Out
# Interactive testing
python playground/local_test.py
# Quick start validation
python playground/quick_start.py
🚀 Use Cases
✅ Automated Testing - Test web applications ✅ Data Scraping - Extract structured data from websites ✅ Form Automation - Fill and submit forms ✅ Monitoring - Check for updates or changes ✅ Screenshot Verification - Capture and verify page state ✅ Content Analysis - Analyze web content programmatically
🐛 Troubleshooting
Tools Not Loading?
drissionpage-mcp --version
Should output: drissionpage-mcp 0.1.0
Browser Issues?
# Check browser installation
which google-chrome # Linux
which chromium # macOS
Claude Code Not Finding Server?
- Verify config file path
- Restart Claude Code after changes
- Check logs:
drissionpage-mcp --log-level DEBUG
See TESTING_AND_INTEGRATION.md for complete troubleshooting guide.
📊 Project Status
| Component | Status |
|---|---|
| Core Features | ✅ Complete |
| Testing | ✅ 100% Coverage |
| Documentation | ✅ Comprehensive |
| Production Ready | ✅ Yes |
| PyPI Package | ✅ Published |
Version: 0.1.0 | License: Apache 2.0 | Maintained: ✅ Active
🗺️ Roadmap
Current (v0.1.0)
- [x] 14 core automation tools
- [x] Full MCP protocol support
- [x] Production-ready codebase
- [x] Comprehensive documentation
- [x] PyPI distribution
Future (v0.2+)
- [ ] Form handling utilities
- [ ] File upload support
- [ ] Shadow DOM selectors
- [ ] Session persistence
- [ ] Proxy support
- [ ] Network interception
📖 Integration Examples
Claude Code
{
"mcpServers": {
"drissionpage": {
"command": "drissionpage-mcp"
}
}
}
Claude Desktop
{
"mcpServers": {
"drissionpage": {
"command": "drissionpage-mcp"
}
}
}
See examples/ for more client configurations.
🤝 Contributing
Contributions are welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if needed
- Submit a pull request
🔒 Security
- Does not store or transmit sensitive data
- Runs locally in your environment
- No external API calls
- Respects website terms of service
Best Practices:
- Don't automate without permission
- Use on test environments when possible
- Respect robots.txt
- Add appropriate delays between actions
📄 License
Licensed under Apache License 2.0 - see LICENSE
🙏 Acknowledgments
- DrissionPage - Excellent browser automation library
- Model Context Protocol - Protocol specification
- Claude - Making AI assistants capable and useful
💬 Support
📈 Statistics
🌟 Show Your Support
If you find this project useful, please consider:
- ⭐ Starring on GitHub
- 📤 Sharing with your network
- 💬 Leaving feedback or suggestions
- 🐛 Reporting issues to help improve
Made with ❤️ by Wukunyun
Ready to automate your workflows? Install now: pip install drissionpage-mcp
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。