Skip to main content

Orion Browser MCP服务

Project description

Orion Browser MCP

基于Orion浏览器的MCP (Machine Communicatin Protocol) 服务,提供浏览器自动化控制能力。

功能特点

  • 支持FastMCP和SSE两种服务模式
  • 提供完整的浏览器控制API,包括导航、点击、输入等操作
  • 支持截图和视觉模式
  • 完善的错误处理和日志记录
  • 模块化设计,易于扩展

安装

要求

  • Python 3.12+
  • 依赖项: 见 pyproject.toml

步骤

  1. 克隆代码库
  2. 进入项目目录
  3. 创建虚拟环境: python -m venv .venv
  4. 激活虚拟环境:
    • Windows: .venv\Scripts\activate
    • Unix/MacOS: source .venv/bin/activate
  5. 安装依赖: pip install -e .

使用方法

基本用法

# 启动FastMCP服务器(默认)
python main.py

# 启用视觉模式
python main.py --vision

# 无头模式
python main.py --headless


### API参考

服务器提供以下工具:

- `go_url`: 导航到指定URL
- `open_tab`: 打开新标签页
- `input_text`: 在元素中输入文本
- `click_element`: 点击指定元素
- `switch_tab`: 切换标签页
- `close_browser`: 关闭浏览器
- `send_keys`: 发送键盘输入
- `scroll_down`/`scroll_up`: 页面滚动
- `scroll_to_text`: 滚动到包含特定文本的元素
- `extract_content`: 提取页面内容
- `click_by_position`: 通过坐标点击页面

## 项目结构

orion_browser_mcp/ ├── init.py # 包初始化文件 ├── main.py # 主入口点 ├── config.py # 配置管理 ├── utils.py # 通用工具函数 ├── browser_actions.py # 浏览器操作封装 ├── server/ # 服务器实现 │ ├── init.py │ ├── fast_server.py # FastMCP服务器


## 贡献

欢迎通过Issue和Pull Request贡献代码和反馈问题。

## 许可

[LICENSE]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orion_browser_mcp-0.4.4.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orion_browser_mcp-0.4.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file orion_browser_mcp-0.4.4.tar.gz.

File metadata

  • Download URL: orion_browser_mcp-0.4.4.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for orion_browser_mcp-0.4.4.tar.gz
Algorithm Hash digest
SHA256 8f0d2c4588c92a7cbb98d456e6a73426e12a22c07c1f4e19b5fb6d012c832f5b
MD5 ddf31646c97196550c50e4aaaa5f60c7
BLAKE2b-256 6c1b1ba32cd0d01b17f0744e5f23ca3f6e57ff1a4dbb77f0b5f92cea56c12b84

See more details on using hashes here.

File details

Details for the file orion_browser_mcp-0.4.4-py3-none-any.whl.

File metadata

File hashes

Hashes for orion_browser_mcp-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0becdbbe7d063e268ddc5edabd7e27725ee51cb058e09269ad6f8d34e494c272
MD5 0b566ba7edfdda40d33e4f6ce68df826
BLAKE2b-256 2bcb3f20b8686066b360524e1b7404e52e05c3eb81201a94dc9a60a81169fcdb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page