Get the FREE Ultimate OpenClaw Setup Guide →

DrissionPage

The Model Context Protocol (MCP) service based on DrissionPage provides AI assistants with powerful browser automation capabilities. | 基于 DrissionPage 的模型上下文协议 (MCP) 服务,为 AI 助手提供强大的浏览器自动化能力。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository git clone https://github.com/persist-1/DrissionPage-MCP-Server.git cd DrissionPage-MCP-Server/

  2. Set up a Python virtual environment (recommended)

    Unix/macOS

    python3 -m venv .venv source .venv/bin/activate

    Windows (PowerShell)

    ..venv\Scripts\Activate.ps1

  3. 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

  4. 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

  5. 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

  6. 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

Sponsor this space

Reach thousands of developers