Content
# DrissionPage MCP Server --
Browser automation MCP server based on DrissionPage and FastMCP, providing rich browser operation APIs for AI calls.
## Project Introduction
<img src="img/DrissionPageMCP-logo.png">
DrissionPage MCP is a browser automation MCP server based on DrissionPage and FastMCP. It provides a series of powerful browser operation APIs, allowing you to easily implement web automation operations through AI.
### Main Features
- Supports browser opening, closing, and connection management
- Provides rich page element manipulation methods
- Supports JavaScript code execution
- Supports CDP protocol operations
- Provides convenient file download function
- Supports keyboard key simulation
- Supports page screenshot function
- Added function to listen to data packets in the background of the webpage
- Added automatic upload and download file function
#### Python requirements
- Python >= 3.9
- pip (latest version)
- uv (latest version)
#### Browser requirements
- Chrome browser (recommended version 90 and above)
#### Required Python packages
- drissionpage >= 4.1.0.18
- fastmcp >= 2.4.0
- uv
## Installation instructions
- Git clone this repository to your local machine. The core file is main.py:
- First, you need to do [💖MCP installation environment preparation](./MCP安装教程.md)
### Install to Cursor editor
<img src="img/install_to_Cursor1.png">
<img src="img/install_to_cursor2.png">
### Install to vscode editor
<img src="img/install_to_vscode0.png">
<img src="img/install_to_vscode1.png">
<img src="img/install_to_vscode2.png">
Please paste the following configuration code into the `mcpServers` setting of the editor (`please fill in the absolute path of the main.py file on your computer`):
```json
{
"mcpServers": {
"DrissionPageMCP": {
"type": "stdio",
"command": "uv",
"args": ["--directory", "D:\\test10\\DrissionPageMCP", "run", "main.py"]
}
}
}
```
Add mcp configuration and fill in the following configuration:
``` json
"DrissionPageMCP": {
"type": "stdio",
"command": "uv",
"args": ["--directory", "D:\\test10\\DrissionPageMCP", "run", "main.py"]
}
```
Precautions:
- Please modify the path in `args` according to the actual path
- Backslashes in paths in Windows need to be escaped (using `\\`)
- Make sure the `uv` command is available in the system PATH
- [《MCP installation reference tutorial》](https://docs.trae.ai/ide/model-context-protocol)
## Debug command
Debug
```
npx -y @modelcontextprotocol/inspector uv run D:\\test10\\DrissionPageMCP\\main.py
```
Or
```
mcp dev D:\\test10\\DrissionPageMCP\\main.py
```
## Update log
### v0.1.3
Added automatic upload and download file function
### v0.1.2
Added function to listen to data packets in the background of the webpage
### v0.1.0
- Initial version released
- Implement basic browser control functions
- Provide element operation API
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.
git
A Model Context Protocol server for Git automation and interaction.