DrissionPageMCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_versionC | 获取版本号 |
| get_DrissionPage_code_guideC | 获取 DrissionPage 代码指南 |
| connect_or_open_browserB | 用DrissionPage 打开或接管已打开的浏览器,参数通过字典传递。 必要参数: config (dict): 可选键包括 、debug_port、browser_path、headless 返回: dict: 浏览器信息 |
| new_tabC | 用DrissionPage 控制的浏览器,打开新标签页并 打开一个网址 |
| waitD | 等待a秒 |
| getA | 在当前标签页打开一个网址 |
| download_fileC | 控制浏览器下载文件到指定路径 Args: url (str): 文件的URL地址 path (str): 文件保存的路径 rename (str): 重命名文件名 Returns: str: 下载结果信息 |
| upload_fileA | 点击当网页上的 元素触发上传文件的操作,上传file_path文件到当前网页 Args: Returns: str: 上传结果信息,如果元素不存在则返回错误信息 |
| send_enterA | 向当前页面发送 enter 回车键 |
| getInputElementsInfoA | 获取当前标签页的所有可进行输入操作的元素,对元素进行输入操作前优先使用这个方法 |
| click_by_xpathA | 通过xpath点击当前标签页中某个元素,最好先获取页面dom信息,再决定Xpath的写法 |
| click_by_containing_textA | 根据包含指定文本的方式点击网页元素。 参数: content: 要查找的文本内容。 index: 当匹配到多个元素时指定要点击的索引,默认不指定。 返回: 点击结果说明,或错误提示。 |
| input_by_xapthA | 通过xpath给当前标签页中某个元素输入内容,最好先判断元素是否存在 Args: xpath (str): 元素的XPath表达式 input_value (str): 要输入的内容 clear_first (bool): 是否先清除已有内容,默认为True Returns: Any: 输入操作的结果,如果元素不存在则返回错误信息 |
| get_body_textB | 获取当前标签页的body的文本内容 |
| run_jsA | 在当前标签页中运行JavaScript代码并返回执行结果 查找网页元素,获取元素信息,操作网页元素优先使用这个方法 Args: js_code (str): 要执行的JavaScript代码 Returns: Any: JavaScript代码执行结果 Note:
想要获取执行的js代码的返回值,可以在js_code中使用return语句。
想要获取异步函数的返回值,可以参考下面代码
return (async (url) => {
const response = await fetch(url);
const data = await response.json(); |
| run_cdpB | 在当前标签页中运行谷歌CDP协议代码并获取结果 Args: Returns: Any: CDP命令执行结果 Note: 举例1说明 run_cdp('Page.stopLoading') 举例2说明 run_cdp('Page.navigate', url='https://example.com') |
| listen_cdp_eventA | 设置监听CDP事件 应该先运行cdp 命令 激活对应的域,比如 Network.enable |
| get_cdp_event_dataB | 获取CDP事件回调函数收集到的数据 |
| get_url_with_response_listenerB | 开启一个新的标签页,设置监听,访问tab_url, tab_url: 被监听的标签页的url mimeType: 需要监听的接收的数据包的mimeType类型 url_include: 需要监听的接收的数据包的url包含的关键字 refresh: 是否刷新页面, |
| response_listener_stopC | 关闭监听网页发送的数据包 |
| get_response_listener_dataB | 获取监听到的数据,返回数据列表 |
| get_current_tab_screenshotA | 获取当前标签页的网页截图 Returns: bytes: 截图的二进制数据 |
| get_current_tab_screenshot_as_fileB | 获取当前标签页的屏幕截图并保存为文件 Args: path (str): 截图保存路径,默认为当前目录 Returns: str: 截图的文件路径 |
| get_current_tab_infoA | 获取当前标签页的信息,包括url, title, id |
| send_keyC | 向当前标签页发送特殊按键 |
| getSimplifiedDomTreeD | – |
| move_toA | 鼠标移动悬停到指定xpath的元素上 |
| dragA | 将元素拖动到指定偏移位置 Args: xpath: 要拖动的元素xpath路径 offset_x: x轴偏移量(像素) offset_y: y轴偏移量(像素) duration: 拖动持续时间(毫秒),默认为1000 Returns: dict: 包含偏移量和持续时间的字典,格式为{"offset_x": int, "offset_y": int, "duration": int} 或 str: 当元素不存在时返回错误信息 Raises: 无显式抛出异常,但内部可能因元素不存在而返回错误信息 |
| save_dict_to_sqliteA | 将字典或JSON字符串保存到SQLite数据库中。 参数: data (dict or list of dict or str): 字典、列表字典,或JSON字符串。 db_path (str): SQLite 数据库文件路径。 table_name (str): 要创建的表名。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wxhzhwxhzh/DrissionPageMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server