DrissionPage MCP Server

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.

Category
Visit Server

README

DrissionPage MCP Server

Professional browser automation for Claude Code and MCP clients powered by DrissionPage

PyPI Downloads License Python Version Status

Official Repositories: GitHub | GitCode

English Version | δΈ­ζ–‡η‰ˆζœ¬


πŸš€ 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)

  1. Edit MCP configuration:

    • macOS/Linux: ~/.config/claude-code/mcp_settings.json
    • Windows: %APPDATA%\claude-code\mcp_settings.json
  2. Add this configuration:

    {
      "mcpServers": {
        "drissionpage": {
          "command": "drissionpage-mcp"
        }
      }
    }
    
  3. 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 URL
  • page_go_back / page_go_forward - Browser history
  • page_refresh - Reload current page

🎯 Element Interaction (3 tools)

  • element_find - Find elements by CSS selector or XPath
  • element_click - Click any element
  • element_type - Input text into elements

πŸ“Έ Page Operations (5 tools)

  • page_screenshot - Capture full page or viewport
  • page_resize - Adjust browser window
  • page_click_xy - Click by coordinates
  • page_close - Close browser
  • page_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!

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if needed
  5. 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


πŸ’¬ Support


πŸ“ˆ Statistics

Downloads PyPI Version


🌟 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured