Skip to content

feat: add EVA-MHS robot agent control preview - #14

Draft
Noietch wants to merge 2 commits into
mainfrom
dev/mcp_preview
Draft

feat: add EVA-MHS robot agent control preview#14
Noietch wants to merge 2 commits into
mainfrom
dev/mcp_preview

Conversation

@Noietch

@Noietch Noietch commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Overview

This PR implements the EVA-MHS Preview through a native MCP server that lets
coding agents inspect EVA runtime state, call an optional policy model, or
directly command robot motion. Direct control remains available when the policy
model is offline. The implementation is unit- and protocol-tested, but real
robot mutation has not been exercised. The public preview announcement is
already present on main in commit 2c5ebd7; this PR contains the implementation.

Field Value
Review decision Approve the EVA-MHS MCP contract, direct-control arbitration, and IK-plus-interpolation execution path
Base / head main <- dev/mcp_preview
Status Draft pending GitHub reviewer mapping
Reviewers Configured MIS: lvqi10, chenfengjiao02; GitHub usernames unresolved
Validation 271 passed, 1 skipped; Ruff, Pyright, and wheel build passed
Main risk EEF motion is not collision-aware and has not been tested on a real robot

Problem And Scope

EVA Client previously had no agent-facing interface that preserved both policy
execution and direct robot control. This prevented a coding agent from acting
when the policy model was unavailable and forced callers to reconstruct runtime
control outside the process that owns robot state.

In scope:

  • Native eva-mcp stdio server for the EVA-MHS Preview using MCP v2.
  • Robot state and camera reads, IK, EEF and joint motion, gripper control, stop,
    policy start, and policy stop.
  • Operation IDs and polling for direct motion.
  • Arbitration with policy rollout and operator teleoperation.

Out of scope:

  • Collision-aware motion planning and obstacle avoidance.
  • Remote network exposure; the control channel remains disabled by default and
    binds to loopback when enabled.
  • Real robot, gripper, or camera mutation during validation.

What Changes

Area / contract Before After Why
Agent interface No native MCP entry point eva-mcp --eva-endpoint ... Give coding agents a typed interface
Direct control No agent-owned motion path IK, EEF, joint, gripper, and stop tools Preserve control when the model is offline
Policy control App-only rollout lifecycle policy_run and policy_stop tools Let the agent delegate to the model when available
Dependencies Pydantic 2.11.7, no MCP runtime Pydantic 2.13.5 and mcp==2.0.0 Support the MCP v2 server contract
Coding Agent -> MCP stdio -> EVA ZMQ control channel -> typed operation queue
             -> EVA main loop -> FK/IK -> joint interpolation -> action publish

EEF motion reads current qpos, computes FK, replaces only the requested arm
target, solves IK from current qpos, preserves other actuator groups, builds a
linear joint trajectory, and reuses the existing action publisher. Direct and
policy execution are peer capabilities; direct commands may take over from a
policy rollout, while armed or active operator teleoperation rejects agent
motion.

The MCP tools are eva_status, robot_get_state, camera_capture,
robot_solve_ik, robot_move_eef, robot_move_joints,
robot_set_gripper, robot_get_operation, robot_stop, policy_run, and
policy_stop.

Compatibility And Migration

Existing control behavior remains the default because the agent control channel
is opt-in and loopback-bound. Installing the updated project adds MCP v2 and
updates Pydantic to 2.13.5. No schema, dataset, or checkpoint migration is
required.

Validation

Check Scope and result Level Verdict
Focused pytest suite Config, teleop handler, agent control, control channel, IK action processing, and MCP protocol: 271 passed, 1 skipped Unit / protocol PASS
Ruff lint and format All changed Python files Static PASS
Pyright 0 errors, 0 warnings Static PASS
Wheel build Built package; verified tools/mcp, core/app/agent_control.py, eva, and eva-mcp entry points Packaging PASS
Clean dependency install Installed native dependencies with MCP v2 and Pydantic 2.13.5 in a temporary environment Integration PASS
Real robot mutation Robot, gripper, and camera mutations were not run Mutating live SKIPPED

Two stale rollout-intervention assertions were synchronized with the merged
teleop contract: activation does not require a neutral snapshot and relies on
the per-arm grip latch.

Risk, Rollout, And Rollback

  • EEF motion uses IK plus joint interpolation, not collision-aware planning.
  • Non-finite feedback, targets, IK output, and invalid timing values are rejected
    before action publication.
  • robot_stop cancels direct motion and halts policy execution.
  • Roll out first with the control channel disabled, then perform a bounded robot
    smoke test in a cleared workspace before enabling agent motion operationally.
  • Roll back by reverting d6f40c0 and ad29dc8, then syncing project
    dependencies.

Reviewer Guide

Review in this order:

  1. tools/mcp/server.py: MCP surface, argument validation, and tool semantics.
  2. src/core/app/agent_control.py: operation lifecycle, arbitration, IK, and
    trajectory publication.
  3. src/core/app/control_channel.py and src/core/app/run.py: process boundary
    and main-loop integration.
  4. tests/app/test_agent_control.py and tests/tools/test_mcp.py: safety and
    protocol evidence.

Pay particular attention to teleoperation priority, direct-policy takeover, and
the absence of collision-aware planning.

@Noietch Noietch changed the title feat: expose EVA robot control and policy through MCP feat: add EVA-MHS robot agent control preview Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant