{"id":37085966,"url":"https://github.com/hihuzhen/browser-mcp","last_synced_at":"2026-01-14T10:34:35.563Z","repository":{"id":313164695,"uuid":"1050220542","full_name":"hihuzhen/browser-mcp","owner":"hihuzhen","description":"Browser MCP","archived":false,"fork":false,"pushed_at":"2025-11-18T03:39:51.000Z","size":246,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-18T05:31:52.727Z","etag":null,"topics":["automation","browser","browser-extension","mcp","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hihuzhen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-04T05:58:21.000Z","updated_at":"2025-11-18T03:39:55.000Z","dependencies_parsed_at":"2025-09-04T10:24:37.361Z","dependency_job_id":"60404fcf-a7e1-437c-bd27-6b95e3c47391","html_url":"https://github.com/hihuzhen/browser-mcp","commit_stats":null,"previous_names":["hihuzhen/browser-mcp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hihuzhen/browser-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hihuzhen%2Fbrowser-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hihuzhen%2Fbrowser-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hihuzhen%2Fbrowser-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hihuzhen%2Fbrowser-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hihuzhen","download_url":"https://codeload.github.com/hihuzhen/browser-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hihuzhen%2Fbrowser-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:25:19.714Z","status":"ssl_error","status_checked_at":"2026-01-14T10:22:49.371Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","browser","browser-extension","mcp","websocket"],"created_at":"2026-01-14T10:34:34.802Z","updated_at":"2026-01-14T10:34:35.558Z","avatar_url":"https://github.com/hihuzhen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Browser MCP Server 🚀\n\n[English](README_EN.md) | 简体中文\n\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/Python-3.11%2B-blue.svg)](https://www.python.org/downloads/) [![Stars](https://img.shields.io/github/stars/hihuzhen/browser-mcp.svg?style=social\u0026label=Stars)](https://github.com/hihuzhen/browser-mcp/stargazers) [![Forks](https://img.shields.io/github/forks/hihuzhen/browser-mcp.svg?style=social\u0026label=Forks)](https://github.com/hihuzhen/browser-mcp/network/members) [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hihuzhen/browser-mcp/pulls)\n\nBrowser MCP Server是一个基于WebSocket通信的浏览器MCP（Model Context Protocol）服务器实现，允许AI助手控制你的浏览器。\n\n## 🚀 项目特点\n\n- **WebSocket通信**: 使用WebSocket替代原有的通信方式，提供更高效的双向通信\n- **Python后端**: App服务端完全使用Python重写，利用FastMCP框架\n- **浏览器自动化**: 允许AI助手执行各种浏览器操作\n- **本地运行**: 完全在本地运行，保证用户隐私\n- **多工具支持**: 支持截图、交互式操作等多种工具\n\n## 📁 项目结构\n\n```\n├── packages/           # 项目包\n│   ├── app/            # Python实现的MCP服务器\n│   │   ├── src/nep_browser_engine/  # 主源码目录\n│   │   ├── pyproject.toml  # Python项目配置\n│   │   └── .gitignore      # Python项目的gitignore文件\n│   └── extension/      # Chrome浏览器扩展\n│       ├── common/     # 通用代码和常量\n│       ├── entrypoints/ # 入口点(background和popup)\n│       └── inject-scripts/ # 注入到网页的脚本\n├── .gitignore          # 根目录gitignore文件\n└── LICENSE             # 许可证文件\n```\n\n### App部分（Python实现）\n\n主要组件：\n- **WebSocket服务**: 实现WebSocket服务器，负责与浏览器扩展通信\n- **MCP服务**: 实现MCP协议，提供各种浏览器控制工具\n- **消息处理**: 处理WebSocket消息和MCP工具调用\n\n### Extension部分（TypeScript实现）\n\n主要组件：\n- **WebSocket客户端**: 负责与Python服务端通信\n- **工具处理器**: 处理来自服务端的工具调用请求\n- **注入脚本**: 在网页中执行各种操作\n\n## 🛠️ 核心功能\n\n### 页面交互\n- **元素点击**: 通过CSS选择器点击页面元素\n- **表单填写**: 填写表单或选择选项\n- **键盘操作**: 模拟键盘输入\n- **获取页面内容**: 提取页面文本和HTML\n- **获取元素**: 获取页面中的特定元素\n- **交互式元素识别**: 自动识别页面中的交互式元素\n\n### 媒体和网络\n- **截图**: 截取整个页面或特定元素\n\n## 🚀 快速开始\n\n### 前置要求\n\n- Python 3.9+ 和 pip/poetry/uv\n- Chrome/Chromium浏览器\n\n### 安装步骤\n\n#### 1. 安装Chrome扩展\n\n```bash\ncd extension\npnpm install\npnpm run build\n\n# 或者去releases中下载指定版本\n```\n\n然后在Chrome浏览器中:\n1. 打开 `chrome://extensions/`\n2. 启用\"开发者模式\"\n3. 点击\"加载已解压的扩展程序\"\n\n#### 2. 运行服务\n\n```json\n{\n  \"mcpServers\": {\n    \"nep-browser-engine\": {\n      \"type\": \"stdio\",\n      \"command\": \"uvx\",\n      \"args\": [\"nep-browser-engine\"]\n    }\n  }\n}\n```\n\n#### 3. 连接扩展和服务\n\n点击浏览器中的扩展图标，连接到WebSocket服务。\n\n## 📝 使用说明\n\n### 与MCP协议客户端一起使用\n\n可以将本服务与支持MCP协议的AI客户端一起使用，例如Claude、CherryStudio等。\n\n\n## 🛠️ 可用工具列表\n\n以下是主要的可用工具：\n\n### 浏览器管理\n- `get_windows_and_tabs`: 获取所有打开的窗口和标签页\n- `browser_navigate`: 导航到URL或刷新当前标签页\n- `browser_close_tabs`: 关闭特定标签页或窗口\n- `browser_go_back_or_forward`: 浏览器历史前进或后退\n\n### 页面交互\n- `browser_click_element`: 点击页面元素\n- `browser_fill_or_select`: 填写表单或选择选项\n- `browser_get_elements`: 获取页面元素\n- `browser_keyboard`: 模拟键盘输入\n- `browser_get_web_content`: 获取网页内容\n- `browser_screenshot`: 截取页面截图\n\n## 🔧 开发指南\n\n### Python服务端开发\n\n1. 确保安装了所有依赖\n2. 可以通过修改 `app/src/nep_browser_engine/config.py` 来配置WebSocket端口等参数\n3. 运行时可以通过参数指定传输协议: `python -m nep_browser_engine.app --transport stdio`\n\n### Chrome扩展开发\n\n1. 修改代码后运行 `pnpm run build` 重新构建扩展\n2. 扩展会自动重新加载（如果在开发者模式下）\n3. WebSocket默认连接地址为 `ws://localhost:18765`\n\n## 📋 注意事项\n\n- 本项目仍在开发中，可能存在一些bug和不完善的地方\n- 使用前请确保理解所有工具的功能和潜在风险\n- 请勿将本项目用于任何非法或未经授权的活动\n\n## 🤝 贡献\n\n欢迎提交issue和PR来帮助改进这个项目！\n\n## 鸣谢\n本项目参考 [hangwin/mcp-chrome](https://github.com/hangwin/mcp-chrome)\n\n## 📄 许可证\n\n[MIT License](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhihuzhen%2Fbrowser-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhihuzhen%2Fbrowser-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhihuzhen%2Fbrowser-mcp/lists"}