DrissionPage
The Model Context Protocol (MCP) service based on DrissionPage provides AI assistants with powerful browser automation capabilities. | 基于 DrissionPage 的模型上下文协议 (MCP) 服务,为 AI 助手提供强大的浏览器自动化能力。
claude mcp add --transport stdio persist-1-drissionpage-mcp-server python -m drissionpage_mcp.main \ --env PYTHONPATH="Yourpath/DrissionPage-MCP-Server/src"
How to use
DrissionPage-MCP-Server provides a Python-based MCP service that exposes a rich set of browser automation capabilities built on DrissionPage. It implements the MCP protocol so an AI assistant can request navigation, element interactions, DOM and page data extraction, screenshots, and file operations through a standardized interface. The server includes 17 categorized tools ranging from browser management (connect/start browser, create new tabs, navigate) to element actions (click, input text, read text), DOM access (get DOM tree, find elements), network monitoring, screenshot services, and CDP/advanced JavaScript execution. You can configure the MCP server in your AI IDE (e.g., Trae AI IDE) by pointing to the Python entry module and setting the module path via PYTHONPATH. Once started, the server communicates over STDIO mode and accepts MCP requests that map to these tools.
To use it, connect to the server from your AI assistant, then call the available MCP tools by name. Typical workflows include: connecting to a browser, navigating to a page, performing element interactions, taking screenshots, and saving page sources. The documentation enumerates each tool (for example connect_browser, navigate, click_element, input_text, take_screenshot, get_dom_tree, execute_javascript, run_cdp_command) and describes their expected parameters and return values. The server is designed for high performance via the FastMCP framework and supports asynchronous operations, making it suitable for complex automation tasks inside chat-assisted workflows.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- Git installed
- Optional: a virtual environment tool (venv) if you prefer isolated environments
Step-by-step installation:
-
Clone the repository git clone https://github.com/persist-1/DrissionPage-MCP-Server.git cd DrissionPage-MCP-Server/
-
Set up a Python virtual environment (recommended)
Unix/macOS
python3 -m venv .venv source .venv/bin/activate
Windows (PowerShell)
..venv\Scripts\Activate.ps1
-
Install Python dependencies (requirements files are in the project) pip install -r requirements.txt
If there are additional requirements files (e.g., requirements-dev.txt), install them as needed
-
Install or ensure uv (uvicorn-like runner) is available if your workflow relies on it. The README demonstrates using uv sync for a synchronized environment. pip install uv
-
Run the MCP server in STDIO mode (as shown in the README) uv sync # if you use uv for environment setup drissionpage-mcp # start the MCP service in STDIO mode
-
Verify the server is running by sending a test MCP request or checking logs for startup confirmation.
Additional notes
Tips and common notes:
- The server is Python-based and configured to be launched in STDIO mode. The Trae AI IDE example config shows how to point to the Python module and set PYTHONPATH to the src directory.
- Environment variables can customize paths and behavior. For example, DRISSIONPAGE_MCP_LOG_LEVEL can be set to DEBUG to get verbose logs.
- If you encounter import or path issues, ensure PYTHONPATH includes the src directory from the project (as shown in the Trae config example).
- For debugging, you can run the server with verbose logs (e.g., drissionpage-mcp --log-level DEBUG) and monitor startup messages.
- If you use a virtual environment, activate it before running the commands in the installation steps to ensure dependencies resolve correctly.
- The MCP tools list in the docs describes the available functions like navigate, click_element, take_screenshot, and others. Use consistent naming when calling these tools from your AI assistant.
Related MCP Servers
cursor-notebook
Model Context Protocol (MCP) server designed to allow AI agents within Cursor to interact with Jupyter Notebook (.ipynb) files
lc2mcp
Convert LangChain tools to FastMCP tools
fast -telegram
Telegram MCP Server and HTTP-MTProto bridge | Multi-user auth, intelligent search, file sending, web setup | Docker & PyPI ready
GraphMemory-IDE
AI-assisted development MCP providing long-term, on-device "AI memory" for IDEs. Powered by Kuzu GraphDB and exposed via MCP server
davinci -professional
An enterprise-grade MCP server that exposes the full functionality of DaVinci Resolve and DaVinci Resolve Studio (through version 20) to either Claude Desktop or Cursor MCP clients. Fully configured and tested as a Claude Desktop Extension making installation as easy as clicking a button. Supports both Windows and Macintosh.
Convert-Markdown-PDF
Markdown To PDF Conversion MCP