VELMA
MCP server for controlling a simulated robot arm with vision-based pick-and-place, driven by LLM or manual control.
README
VELMA
Vision-Enabled LLM Manipulation Arm. VELMA is a tabletop SO-101 arm in MuJoCo that runs a full pick-and-place from vision. A fixed side camera locates the object to within a centimetre or so, and the wrist camera orbits that seed over five views and triangulates it to about 1 mm. The arm grasps and places from those coordinates, and can be driven by an LLM over MCP, or by hand from a terminal control panel.
What's here
so101-Models/
main.py entry point: loads config.yaml, starts the MCP server (or hardware backend)
config.yaml runtime config (backend, viewer on/off, port, LLM provider)
requirements.txt robot venv deps
server/ the MCP server — 15 tools (see below)
perception/ find_object (coarse) + wrist triangulation + the sidecar client
requirements.txt perception sidecar venv deps (torch CPU + ultralytics + transformers)
percept_venv/ torch/SAM/Depth-Anything sidecar interpreter (CPU)
wrist_refine.py wrist-camera hover/state helpers used by perception/wrist_triangulate.py
robot/, kinematics/, models/ backend, IK, MuJoCo scenes
control_panel.py terminal UI to drive the arm by hand through the MCP server
agent.py thin MCP client that connects any LLM (Ollama/OpenAI-compatible) to the arm
SKILL.md system-prompt guide for an LLM driving the arm (fed in by agent.py)
.mcp.json MCP server entry for CLI tools (Claude Code, Codex CLI, ...)
venv/ robot interpreter (MuJoCo, no torch)
Install
The two virtual environments are the only heavy pieces. Recreate them from the pinned deps
(run from inside so101-Models/):
# robot venv (renders MuJoCo, runs the MCP server — no torch)
python3 -m venv venv && ./venv/bin/pip install -r requirements.txt
# perception sidecar venv (torch CPU + ultralytics + transformers; needs Python 3.11/3.12)
python3.11 -m venv percept_venv && ./percept_venv/bin/pip install -r perception/requirements.txt
Then, optionally, run the setup wizard to write config.yaml (backend, LLM connection, server
port) — it's a config helper, not part of the install:
./venv/bin/python setup.py
A committed config.yaml with sane defaults already ships in this repo, so setup.py is only
needed to change something (e.g. switch to the hardware backend, or add an API key).
Run the server (headless — required for perception)
Perception needs offscreen rendering, so run the server without the viewer:
SO101_VIEWER=0 MUJOCO_GL=egl ./venv/bin/python main.py
SO101_SCENE=models/so101/<scene>.xml overrides the scene (default pick_and_place_scene.xml).
Set SO101_VIEWER=1 to watch the arm instead — but perception is then disabled by design (the
offscreen and on-screen renderers cannot coexist on this box).
Drive it by hand
In a second terminal:
./venv/bin/python control_panel.py
It connects to the running server, lists the 15 tools with their live schemas, and lets you call
any of them with guided input. Any MCP client must set a long read timeout (the panel uses
read_timeout_seconds=300) — grasp/place/stop_recording take several seconds, and a client
that times out mid-call takes the server down with it.
Connect an LLM
With the headless server running (above), pick one of two paths:
A CLI tool that speaks MCP (Claude Code, Codex CLI, Gemini CLI, Cursor, ...): this repo's
.mcp.json already points at http://localhost:3001/mcp — just run the CLI tool from inside
so101-Models/ (e.g. claude). If you changed config.yaml's server.port, re-run
./venv/bin/python setup.py (Server settings) to regenerate .mcp.json to match.
Any Ollama / OpenAI-compatible model, via the bundled thin agent:
./venv/bin/python agent.py --model gemma3:4b --task "pick up the red cube and place it in the container"
agent.py feeds the model SKILL.md as a system prompt plus the live tool schemas from the
server (never hard-coded, so it can't drift from what the server actually exposes), and relays
tool calls both ways — it doesn't inject a procedure or second-guess the model. See agent.py --help for endpoint/model flags (LLM_BASE_URL, LLM_API_KEY, --mode auto|native|text).
The pick-and-place path (what an LLM calls)
The object's position is measured, never given:
find_object("the red cube")— coarse(x, y)from the fixed side camera (~cm, enough to aim).triangulate("the red cube", x, y)— refine to a grasp-ready 3D point with the wrist camera (~1 mm). Ifconfidence < 0.6the views disagree — re-runfind_objector decline.grasp(x, y, z, trust_coords=true, grip_width_mm=width_mm+10)— gentle, never-bat top grasp.find_object("the container")— the container's position is measured too, not assumed.place(container_x, container_y, 0.05)— put it down; checkcube_in_container.
The 15 tools
Perception: find_object, triangulate. State: get_robot_state, capture_cameras,
get_initial_instructions. Manipulation: grasp, place. Motion: move_to_position,
set_joint_angles. Gripper: set_gripper, open_gripper, close_gripper. Harness:
reset_scene, start_recording, stop_recording.
Honesty note
The perception path (find_object → triangulate) is measurement-only — nothing in it reads
ground truth. get_robot_state and every tool's returned state deliberately omit the cube's
and container's true positions, so an LLM cannot shortcut perception by reading the answer out of
state (a benchmark harness that needs ground truth for scoring can opt back in by starting the
server with SO101_EXPOSE_TRUTH=1 — never set this when an LLM is connected).
Two internal reads of ground truth remain inside grasp itself (object shape for the never-bat
decline, and a position drift-abort guard) and are pending removal. Full audit, exact locations,
and severity: research/HONESTY_REVIEW.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。