Sponsored by Deepsite.site

DrissionPage MCP Server -- 骚神出品

Created By
wxhzhwxhzh7 months ago
基于DrissionPage和FastMCP的浏览器自动化MCP服务器,提供丰富的浏览器操作API供AI调用
Content

DrissionPage MCP Server -- 骚神出品

基于DrissionPage和FastMCP的浏览器自动化MCP服务器,提供丰富的浏览器操作API供AI调用。

项目简介

logo

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:

安装到Cursor编辑器

安装说明 安装说明

安装到vscode编辑器

安装说明 安装说明 安装说明

请将以下配置代码粘贴到编辑器的mcpServers设置中(请填写你自己电脑上 main.py 文件的绝对路径):

{
  "mcpServers": {
    "DrssionPageMCP": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "D:\\test10\\DrssionPageMCP\\main.py"
      ]
    }
  }
}

新增mcp配置 ,填写下面的配置:

"DrssionPageMCP": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "D:\\test10\\DrssionPageMCP\\main.py"
      ]
    } 

注意事项:

  • 请根据实际路径修改args中的路径
  • Windows中路径中的反斜杠需要转义(使用\\
  • 确保uv命令在系统PATH中可用
  • 《MCP安装参考教程》

调试命令

调试

npx -y @modelcontextprotocol/inspector uv run D:\\test10\\DrssionPageMCP\\main.py

或者

mcp dev  D:\\test10\\DrssionPageMCP\\main.py

更新日志

v0.1.3

增加 自动上传下载文件功能

v0.1.2

增加 网页后台监听数据包的功能

v0.1.0

  • 初始版本发布
  • 实现基本的浏览器控制功能
  • 提供元素操作 API
Recommend Clients
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
MCP PlaygroundCall MCP Server Tools Online
VISBOOM
ZedCode at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MCP ConnectEnables cloud-based AI services to access local Stdio based MCP servers via HTTP requests
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
DeepChatYour AI Partner on Desktop
Refact.aiOpen-source AI Agent for VS Code and JetBrains that autonomously solves coding tasks end-to-end.
chatmcpChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
Cline – #1 on OpenRouterAutonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
Continue⏩ Create, share, and use custom AI code assistants with our open-source IDE extensions and hub of models, rules, prompts, docs, and other building blocks
Roo Code (prev. Roo Cline)Roo Code (prev. Roo Cline) gives you a whole dev team of AI agents in your code editor.
A Sleek AI Assistant & MCP Client5ire is a cross-platform desktop AI assistant, MCP client. It compatible with major service providers, supports local knowledge base and tools via model context protocol servers .
HyperChatHyperChat is a Chat client that strives for openness, utilizing APIs from various LLMs to achieve the best Chat experience, as well as implementing productivity tools through the MCP protocol.
Cherry Studio🍒 Cherry Studio is a desktop client that supports for multiple LLM providers.
y-cli 🚀A Tiny Terminal Chat App for AI Models with MCP Client Support
LutraLutra is the first MCP compatible client built for everyone