Skip to main content
Glama

uitars-mcp

MCP 服务器,为 AI 编码代理提供本地 GUI 接地能力——即查找屏幕上任何 UI 元素并返回其精确像素坐标的能力。

UI-TARS-2B 提供支持,这是字节跳动推出的 2B 参数 GUI 接地模型。

为什么选择它

Claude Code 内置的计算机使用功能会将每个屏幕截图发送到云端进行分析。而此 MCP 服务器运行的是本地视觉模型:

  • 每次查找元素约 1.2 秒(相比云端往返延迟)

  • 4.1GB 显存(可在任何现代 GPU 上运行)

  • 完全离线——无需 API 密钥,无云端依赖

  • 90.7% 的准确率(基于 ScreenSpot 桌面文本基准测试)

  • 原生像素坐标——返回精确的点击目标

设置

1. 下载 UI-TARS-2B

# Requires ~4.5GB disk space
huggingface-cli download bytedance-research/UI-TARS-2B-SFT --local-dir ./ui-tars-2b

2. 安装带有 CUDA 的 PyTorch

# Install CUDA-enabled PyTorch first (adjust cu126 to your CUDA version)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126

3. 安装 uitars-mcp

pip install uitars-mcp
# or from source:
pip install -e .

4. 配置 Claude Code

添加到您的 Claude Code MCP 设置中 (~/.claude/settings.json):

{
  "mcpServers": {
    "uitars-mcp": {
      "command": "uitars-mcp",
      "env": {
        "UITARS_MODEL": "/path/to/ui-tars-2b"
      }
    }
  }
}

如果安装在虚拟环境中,请使用可执行文件的完整路径:

{
  "mcpServers": {
    "uitars-mcp": {
      "command": "/path/to/venv/bin/uitars-mcp",
      "env": {
        "UITARS_MODEL": "/path/to/ui-tars-2b"
      }
    }
  }
}

工具

工具

功能

延迟

find_element

通过描述查找 UI 元素,返回点击坐标

~1.2s

describe_screen

描述屏幕上可见的所有内容

~2s

read_screen_text

OCR — 读取屏幕上的所有文本

~3s

check_element

检查元素状态(启用、值等)

~1s

verify_action

通过检查屏幕状态验证操作是否成功

~1.5s

suggest_action

建议实现目标的下一步操作

~1.5s

benchmark

测量端到端延迟

不定

工作原理

  1. 通过 mss 进行屏幕截图(快速、跨平台)

  2. 调整大小至 1344px 宽(最佳视觉 token 数量)

  3. 在 GPU 上运行 UI-TARS-2B 推理

  4. 将模型 0-1000 的归一化坐标转换为原生屏幕像素

  5. 返回可用于 computer-use 点击工具的坐标

模型在首次调用时延迟加载(约 3 秒),随后保留在显存中以供后续调用。

环境变量

变量

默认值

描述

UITARS_MODEL

(必需)

UI-TARS-2B 模型目录的路径

要求

  • Python 3.10+

  • 具有 4.1GB+ 显存的 NVIDIA GPU

  • 支持 CUDA 的 PyTorch

  • Windows 或 Linux(macOS 未经测试)

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lxsoftroxs/uitars-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server