Back to MCP directory
publicPublicdnsLocal runtime

goscry

GoScry是一个基于Go语言的服务器应用,通过Chrome DevTools协议控制浏览器执行网页操作任务,提供API接口和DOM解析功能。

article

README

🚀 [基于Go语言的自动化工具项目]

这是一个基于 Go 语言实现的自动化工具项目,提供了丰富的功能模块和 API 接口。包含完整的技术文档和使用说明,能帮助用户高效完成自动化任务。

🚀 快速开始

本项目的安装与运行步骤如下:

下载源码

go get github.com/your-username/your-repo-name

启动服务

go run main.go

✨ 主要特性

Go 语言实现的核心功能

  1. 任务执行引擎
    支持多种操作指令,包括点击、输入、选择、滚动、截图、获取 DOM、运行脚本等。
  2. DOM AST 提取器
    基于 Chrome 调试协议(ChromeDP),提供网页结构分析功能。支持 CSS 选择器定位,并返回结构化的 DOM 抽象语法树(AST)。
  3. 自动化测试框架
    提供用于编写和执行自动化测试的接口,支持多种浏览器操作。

命令行工具

your-command [flags] [arguments]

可选标志

  • -v:启用调试模式。
  • -c <config>:指定配置文件路径。
  • --help:显示帮助信息并退出。

💻 使用示例

基础用法

本项目提供了丰富的 API 接口,以下是任务执行接口和 DOM AST API 的请求示例:

任务执行接口请求示例

curl -X POST http://localhost:8080/api/v1/task \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
    "actions": [
        {"type": "click", "selector": "#submit-btn"},
        {"type": "type", "selector": "#username", "text": "admin"}
    ]
}'

DOM AST API 请求示例

curl -X POST http://localhost:8080/api/v1/dom/ast \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
    "url": "https://example.com",
    "parent_selector": "#main-content"
  }'

📚 详细文档

配置文件

默认配置

{
  "browser": {
    "headless": true,
    "binaryPath": "",
    "args": []
  },
  "timeout": 30000 // milliseconds
}

📄 许可证

本项目 licensed under the MIT License - 详情请见 LICENSE 文件。

🔗 贡献指南

欢迎贡献!请随意提交 Pull Request。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client