DrissionPageSAFE
基于DrissionPage和FastMCP的浏览器自动化MCP服务器,提供丰富的浏览器操作API供AI调用
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
基于DrissionPage和FastMCP的浏览器自动化MCP服务器,提供丰富的浏览器操作API供AI调用。
项目简介
DrissionPage MCP 是一个基于 DrissionPage 和 FastMCP 的浏览器自动化MCP server服务器,它提供了一系列强大的浏览器操作 API,让您能够轻松通过AI实现网页自动化操作。
主要特性
- 支持浏览器的打开、关闭和连接管理
- 提供丰富的页面元素操作方法
- 支持 JavaScript 代码执行
- 支持 CDP 协议操作
- 提供便捷的文件下载功能
- 支持键盘按键模拟
- 支持页面截图功能
- 增加 网页后台监听数据包的功能
- 增加自动上传下载文件功能
Python要求
- Python >= 3.9
- pip(最新版本)
- uv (最新版本)
浏览器要求
- Chrome 浏览器(推荐 90 及以上版本)
必需的Python包
- drissionpage >= 4.1.0.18
- fastmcp >= 2.4.0
- uv
安装说明
- 把本仓库git clone到本地,核心文件是main.py:
- 首先要进行💖MCP安装环境准备工作
安装到Cursor编辑器
安装到vscode编辑器
请将以下配置代码粘贴到编辑器的mcpServers设置中(请填写你自己电脑上 main.py 文件的绝对路径):
{
"mcpServers": {
"DrissionPageMCP": {
"type": "stdio",
"command": "uv",
"args": ["--directory", "D:\\test10\\DrissionPageMCP", "run", "main.py"]
}
}
}新增mcp配置 ,填写下面的配置:
"DrissionPageMCP": {
"type": "stdio",
"command": "uv",
"args": ["--directory", "D:\\test10\\DrissionPageMCP", "run", "main.py"]
} 注意事项:
- 请根据实际路径修改
args中的路径 - Windows中路径中的反斜杠需要转义(使用
\\) - 确保
uv命令在系统PATH中可用 - 《MCP安装参考教程》
调试命令
调试
npx -y @modelcontextprotocol/inspector uv run D:\\test10\\DrissionPageMCP\\main.py
或者
mcp dev D:\\test10\\DrissionPageMCP\\main.py
更新日志
v0.1.3
增加 自动上传下载文件功能
v0.1.2
增加 网页后台监听数据包的功能
v0.1.0
- 初始版本发布
- 实现基本的浏
3cf5c282711eOBSERVED · 2026-10-06Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add drssionpagemcp -- uvx drssionpagemcp
{
"mcpServers": {
"drssionpagemcp": {
"command": "uvx",
"args": [
"drssionpagemcp"
]
}
}
}Exposed tools (37)
33 read · 4 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
arrow_down | read | 向当前标签页发送按键 arrow_down |
arrow_up | read | 向当前标签页发送按键 arrow_up |
connect_or_open_browser | read | |
convert_elemnet_to_drissionpage | read | 把元素转换为drissionpage格式的字符串 |
download_file | read | 下载文件到指定路径 |
element_click | read | 通过xpath点击标签页中某个元素,最好先判断元素是否存在 |
element_input | read | 通过xpath给标签页中某个元素输入内容,最好先判断元素是否存在 |
getInputElementsInfo | read | 获取当前标签页的所有可进行输入操作的元素,对元素进行输入操作前优先使用这个方法 |
get_a_elements_info | read | 获取当前标签页中所有a元素标签的信息,定位元素时优先使用 |
get_all_clickable_elements | read | 获取当前标签页的所有可点击元素 |
get_all_input_elements | read | 获取当前标签页的所有可输入元素 |
get_body_text | read | 获取当前标签页的body的文本内容 |
get_button_elements_info | read | 获取当前标签页中所有button元素标签的信息,定位元素时优先使用 |
get_cdp_event_data | read | 获取CDP事件回调函数收集到的数据 |
get_current_tab_element_html | read | 获取当前标签页的某个元素的html |
get_current_tab_info | read | 获取当前标签页的信息,包括url, title, id |
get_current_tab_screenshot | read | |
get_current_tab_screenshot_as_file | read | |
get_dom_tree | read | 获取当前标签页的DOM树结构信息 |
get_elements_info_by_keyword | read | 根据关键词获取当前标签页中包含该关键词的文本节点的所有元素列表 定位元素时优先使用 |
get_elements_info_by_tagname | read | 获取当前标签页中所有指定tagname的元素信息,定位元素时优先使用 ,参数是tagname |
get_input_elements_info | read | 获取当前标签页中所有input元素标签的信息,定位元素时优先使用 |
get_response_received_listener_data | read | 获取监听到的数据,返回数据列表 |
get_tab_list | read | 获取当前浏览器的所有标签页的信息,包括url, title, id |
is_element_exist | read | 通过xpath或者文本节点是否包含关键词判断标签页中某个元素是否存在 |
new_tab | read | 用DrissionPage 控制的浏览器,打开新标签页并 打开一个网址 |
on_cdp_event | read | 设置监听CDP事件 |
page_down | read | 向当前标签页发送按键 page_down |
page_up | read | 向当前标签页发送按键 page_up |
process_data | read | |
response_received_listener | read | |
response_received_listener_stop | write | 关闭监听网页发送的数据包 |
run_cdp | write | 在当前标签页中运行谷歌CDP协议代码并获取结果 |
run_js | write | |
send_enter | write | 向当前页面发送 enter 回车键 |
test | read | 生成一个请求对文本进行摘要的用户消息。 |
wait | read | 网页等待a秒 |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
drissionpage, fastmcp, uv
Gates applied: no_behavioural_pass, no_license.
3cf5c282711efull audit observations/trust-audit/mcp-server/wxhzhwxhzh__drissionpage.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-06 | 3cf5c282711e | SAFE | B | 89 | first audit |
Questions
What is the DrissionPage MCP server?
基于DrissionPage和FastMCP的浏览器自动化MCP服务器,提供丰富的浏览器操作API供AI调用
What tools does DrissionPage expose?
37 in total: 33 read-only, 4 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is DrissionPage safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does DrissionPage need?
No credential environment variables were found in its source, so it appears to need none.
How does DrissionPage run?
It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as drssionpagemcp.
How current is this page?
The grade is for one exact copy of the source (3cf5c282711e), read on 2026-10-06. The repository is watched and re-audited when it changes.