Skip to main content
Glama
README.md
# steel-tester

内网 Steel Browser 工具:CLI + MCP。`browser_navigate` 对齐 cursor-ide-browser:默认复用上次视图并打开 URL。

## 依赖

- Node.js `>= 22.13`
- `playwright-core`(CDP,不下载 Chromium)
- `@modelcontextprotocol/sdk` + `zod`(MCP)
- 可访问的内网 Steel(`STEEL_BROWSER_API_URL`)

## 安装

```bash
npm install -g steel-tester
# 或
npm install -D steel-tester
```

## 配置

优先级:`--api-url` / `--cdp-url` > 环境变量 > 当前目录 `.env`。

```bash
export STEEL_BROWSER_API_URL=http://<host>:3000/v1
# 可选:STEEL_CDP_URL=ws://10.0.0.12:3000/
```

## CLI

```bash
npx steel-tester open --url=https://www.baidu.com
npx steel-tester open --url=https://www.baidu.com --new-tab --screenshot
npx steel-tester open --url=https://www.baidu.com --view-id=<sessionId>
npx steel-tester open --url=https://www.baidu.com --clean
```

stdout:

```json
{
  "viewId": "<uuid>",
  "sessionId": "<uuid>",
  "cdpUrl": "ws://<ip>:3000/",
  "url": "https://www.baidu.com/",
  "title": "百度一下"
}
```

## MCP

```bash
npx steel-tester mcp
```

```json
{
  "mcpServers": {
    "steel-tester": {
      "command": "npx",
      "args": ["-y", "steel-tester", "mcp"],
      "env": {
        "STEEL_BROWSER_API_URL": "http://<host>:3000/v1"
      }
    }
  }
}
```

工具:`browser_navigate`

| 参数 | 说明 |
|------|------|
| `url` | 要打开的 URL(必填) |
| `viewId` | 目标 session id;省略则用上次视图 |
| `newTab` | `true` 时新建标签再导航 |
| `take_screenshot_afterwards` | `true` 时导航后截图 |
| `clean` | `true` 时先释放全部 live session |

## 开发

```bash
npm install
npm run build
npm run steel-tester -- open --url=https://example.com --clean
```

Maintenance

ActivitySlowing
ResponsivenessNo issues