Skip to main content
Glama
Global-MCP-Server

Global-MCP-Server

by zhywwyzh

Global-MCP-Server

Trae global MCP server (global-diff-ops): the operations tool for the VLA-Diff project (Phase 1 read-only + Phase 2 write operations). This directory is a standalone deployment replica (the source lives in VLA-Diff-MCP/ inside the VLA_Diff repository), registered in Trae's global MCP configuration.

Deployment mode

This deployment runs with VLADIFF_MCP_PROFILE=ops (see the env in the global mcp.json): it exposes 11 operation tools, without publish_prompt. That sensitive write operation (fabricating LLM instructions) is only provided by the MCP instance (vla-diff-prompt, profile=prompt) in the VLA_Diff workspace, so it is not exposed globally. The tool filtering logic is implemented in the _tool decorator in server.py.

Related MCP server: VLA-Diff-MCP

Features

Provide stable tools to the Agent via the MCP protocol, replacing ad-hoc bash commands each time:

Phase 1: read-only tools

Tool

Description

Run location

ros_topic_status

Query ROS topic frequency + latest message

container ros_noetic_uss_nav

ros_topic_echo

Read the last n messages of a ROS topic

container

process_status

Query the status of key service processes

host

tmux_status

List tmux sessions

host

tmux_capture

Capture tmux session pane output

host

read_log

Read agent_run / scene_graph logs

container

Phase 2: write tools

Tool

Description

Safety mechanism

publish_prompt

Publish forged instructions to /agent_prompt Not exposed in this deployment (only the VLA_Diff workspace instance provides it)

—

tmux_send

Send commands to a tmux session (auto-create if it does not exist; no kill-session)

None (uses the reuse rules)

restart_service

Restart ego_planner etc. (kill first, then start; run in the background)

confirm=True explicit confirmation

exec_cmd

Fallback for arbitrary shell commands inside the container

No whitelist; use with caution

SSH remote tools

Tool

Description

Safety mechanism

ssh_exec

Run shell commands on a remote host; host can be a ~/.ssh/config alias (e.g. moon) or user\@ip (e.g. diff\@10.176.224.12)

Password is only passed via environment variable (sshpass -e), never in ps/logs

ssh_hosts

List all host aliases and connection information in \~/.ssh/config

Read-only (only reads; no writes)

Authentication strategy: by default uses ~/.ssh keys (BatchMode; fails immediately with an error instead of hanging). When a password path is provided, code uses password when the source uses password argument when provided. TCP connections to the same host are reused within 10 minutes (ControlMaster), so consecutive commands skip repeated authentication.

Environment Setup

# 创建虚拟环境并按 uv.lock 安装依赖(标准 .venv,已被 .gitignore 忽略)
uv sync

Running

.venv/bin/python server.py

Default stdio transport; the MCP client (Trae global config ~/.config/Trae CN/User/mcp.json) lifts it as a subprocess.

Prerequisites

  • The Docker container ros_noetic_uss_nav has been created (depended on by ROS-type tools).

  • If it is not running, ROS-type tools return a clear error, while tmux / process tools are not affected.

Extension Directions

  • More restartable services: elastic-tracker, tracking_service, etc. (add as needed to KNOWN_RESTART).

  • Service configuration: update the start commands to a YAML file to avoid hard-coding them in code.

Available Tools

11 tools
exec_cmdA

在容器内执行任意 shell 命令(通用兜底工具)。

用于 rostopic pub、catkin_make 等临时操作;不经过任何白名单,谨慎使用。

Inputs: command (required). Returns: result

process_statusA

查询项目关键服务是否在运行(宿主机 pgrep -f 匹配)。

已知服务名: ego_planner / agent_run / tracking_api / tensorrt_api / vlm_detect / roscore;也可以直接传任意进程关键字做匹配。

Inputs: service (required). Returns: result

read_logA

读取项目日志尾部内容(容器内路径)。

已知服务名: agent_run(run_main/logs/agent_run,自动取最新 process_*.json)、 scene_graph(仓库 log/ 目录,自动取最新文件)。 也可以直接传容器内任意文件路径(如 /home/gwq/workspace/VLA_Diff/log/xxx.json)。 参数 lines 范围 10~2000。

Inputs: service (required), lines. Returns: result

restart_serviceA

重启关键 ROS 服务(先杀进程,再后台启动)。

当前支持: ego_planner(obj_nav.launch)。 安全设计:confirm 必须显式传 True 才执行,防止误杀正在运行的服务。 重启后请调用 ros_topic_status 验证 occupancy 话题有数据才算成功。

Inputs: service (required), confirm. Returns: result

ros_topic_echoA

读取 ROS 话题最新 n 条消息(--noarr,不含数组字段内容)。

参数 n 取值范围 1~5。用于查看 /bridge/Instruct、/agent_run/log 等话题内容。

Inputs: topic (required), n. Returns: result

ros_topic_statusA

查询 ROS 话题状态:采样频率(hz) + 最新消息摘要。

在容器内执行 rostopic hz -w 5 与 rostopic echo -n 1 --noarr。 参数 topic 为完整话题名,例如 /drone_0_ego_planner_node/grid_map/occupancy。 用于验证 ego-planner 重启是否成功(occupancy 有 hz 即成功)等场景。

Inputs: topic (required). Returns: result

ssh_execA

在远程主机上执行 shell 命令并返回输出。

host 两种写法(由系统 ssh 解析 ~/.ssh/config):

  • 别名:如 moon / thor / J30V2-oldest

  • user@ip:如 diff@10.176.224.12 认证:默认使用 ~/.ssh 下的密钥(含 config 中各 Host 的 IdentityFile); 传入 password 则改用密码认证(sshpass 实现,密码仅经环境变量传递)。 timeout 为远程命令执行超时(秒,默认 60)。

Inputs: host (required), command (required), timeout, password. Returns: result

ssh_hostsA

列出 ~/.ssh/config 中已配置的主机别名及连接信息。

返回每个 Host 的 别名 / HostName / User / Port / IdentityFile, 用于查询当前哪些机器可用 ssh_exec 直接连。

Inputs: no named parameters. Returns: result

tmux_captureA

抓取指定 tmux 会话当前 pane 的输出内容(向后 lines 行)。

用于查看某服务在 tmux 中持续输出的日志,如 ego-planner / agent_run 的实时输出。 参数 lines 范围 10~2000。

Inputs: session (required), lines. Returns: result

tmux_sendA

向指定 tmux 会话发送按键/命令。

会话不存在时自动创建 detached 会话再发送。 遵循复用规则:不会 kill-session;需要重启会话内程序时, 先发送 "C-c" 停止旧程序,再发送新启动命令。

Inputs: command (required), session (required), enter. Returns: result

tmux_statusA

列出宿主机所有 tmux 会话(名称 / 窗口数 / 创建时间)。

用于确认 sim_bridge / ego-planner / agent_run / fake_prompt 等会话是否存在。

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 11 tools

    Disambiguation4/5

    Most tools target distinct layers: ROS topics, host processes, tmux sessions, log files, and remote hosts. Minor overlap exists between process_status and tmux_status for service verification, and tmux_capture/read_log both retrieve output, but their contexts are clearly described.

    Naming Consistency3/5

    There is a mix of patterns: tmux_status, tmux_capture, process_status, and ssh_hosts follow object/action style, while read_log, restart_service, and exec_cmd use action/object style. The prefixes help readability, but the inconsistency prevents a higher score.

    Tool Count5/5

    11 tools is well-scoped for a server covering ROS monitoring, process/log inspection, tmux interaction, command execution, and remote SSH access. Each tool has a distinct operational purpose and none feel redundant.

    Completeness4/5

    The server covers the main diagnostic and operational workflows: checking statuses, reading logs, restarting a service, sending tmux commands, and executing shell commands locally or remotely. It lacks a generic service control lifecycle and remote file operations, but exec_cmd and ssh_exec cover many edge cases.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI tools to interact with ROS2 robotics systems through natural language commands. Supports topic publishing/subscribing, service calls, message analysis, and auto-discovery of ROS2 interfaces for debugging and controlling robots.
      Mozilla Public 2.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to inspect and control a robotic VLA system via MCP, offering read-only tools for ROS topics, processes, tmux, and logs, as well as write tools for publishing prompts, issuing tmux commands, restarting services, and running shell commands inside containers.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables LLM coding agents to inspect, control, and verify remote ROS2 robotics applications without a local ROS2 installation, supporting topics, services, actions, parameters, TF transforms, and automated test suites.
      16
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables agents to spawn, monitor, and control CLI coding agents running in isolated tmux sessions, with verified input injection, redacted pane capture, fleet and per-session state classification, lineage tracking, blocking exec with exit codes, cross-agent messaging, waste analytics, and log/ledger reading. Ownership checks, policy controls, and audit events keep every control action safe by default.
      3 npm
      Apache 2.0