# mjguard

> mjguard is an open-source MCP server for robotics tooling. MCP server that lets AI agents drive MuJoCo robot arms, checking every motion. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Windows
- **Repository:** https://github.com/samko88927/mjguard
- **MCP Registry name:** io.github.SamKo88927/mjguard
- **Categories:** [robotics tooling](https://ai-powered.com/categories/robotics-tooling)
- **Listing updated:** 2026-11-27

## About

mjguard sits between a language model and a robot arm. When an agent asks for a pose or a move, the server plans joint-space waypoints and tests each one against the arm's own MuJoCo model for joint limits, self and scene collisions, floor and table clearance, obstacles and reachability. Only motions that pass are executed; otherwise the model receives a structured refusal with a nearby safe point it can try instead.

The guard also runs during motion. A monitor compares the measured arm against the same hard limits and halts the motion if it crosses one or touches something. Thirteen arms from MuJoCo Menagerie are built in, including UR, Franka, KUKA, Kinova and several hobby arms, and a TOML file can describe a custom robot with its own obstacles and workspace box.

It suits robotics researchers and developers who want to test LLM-controlled manipulation in simulation before touching hardware. Optional preview-then-confirm, pause and resume, and a server-sent event stream let a web console or phone app sit on top of it. The project notes that it is not an authorization layer and that dynamics such as speed and torque are not checked.

## Features

- **Per-waypoint safety checks:** Every planned waypoint is tested for joint range, collisions, clearance and reachability before any motion starts.
- **Structured refusals:** Refused moves return a reason code, a message and a nearby checked-safe point that a model can follow.
- **Runtime envelope monitor:** The measured arm is watched during and after motion and halted if it breaches a hard limit.
- **Thirteen built-in arms:** Presets for common arms from MuJoCo Menagerie download on first use, and a TOML file adds custom robots.
- **Preview and confirm:** Motion tools can return a plan with a path preview that runs only after a separate execute call.

## Good for

- Testing whether an LLM agent can safely command a robot arm in simulation
- Adding a safety layer between a language model and a manipulator
- Previewing planned arm motions with a ghost path before a person approves them
- Configuring a custom robot arm with obstacles and a workspace limit for MCP control

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mjguard -- uvx mjguard
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mjguard -- uvx mjguard
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mjguard]
command = "uvx"
args = ["mjguard"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user mjguard uvx -- mjguard

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mjguard": {
      "command": "uvx",
      "args": [
        "mjguard"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 16 tools deletes data and 4 change data; 8 names don't say. From the server's own tool labels and tool names; not verified by us.

- `get_state` (name suggests: reads): Returns the current arm state.
- `get_limits` (name suggests: reads): Returns the configured joint and envelope limits.
- `move_to` (name suggests: changes): Plans and moves the tool point to an xyz target in millimetres, with optional preview.
- `move_joints` (name suggests: changes): Moves named joints to given values.
- `gripper`: Sets the gripper opening when a gripper is configured.
- `rest`: Returns the arm to its rest pose.
- `stop` (name suggests: changes): Stops the current motion.
- `jog`: Moves the tool point a short straight-line distance.
- `jog_joint`: Moves one joint by a small delta.
- `execute` (name suggests: changes): Runs a previously previewed plan by plan id.
- `pause`: Pauses the current motion at the next waypoint.
- `resume`: Resumes a paused motion after rechecking the path.
- `save_pose`: Saves the current arm pose under a name.
- `go_to_pose`: Plans and moves to a saved named pose.
- `list_poses` (name suggests: reads): Lists saved named poses.
- `delete_pose` (name suggests: deletes): Deletes a saved named pose.

## FAQ

### Which robot arms are included?

Thirteen arms from MuJoCo Menagerie are built in, including UR5e and UR10e, Franka Panda and FR3, KUKA iiwa14, Kinova Gen3, UFACTORY xArm7, and several hobby and research arms such as SO-ARM100 and Unitree Z1.

### How do I install and run mjguard?

Run uvx mjguard serve panda for MCP over stdio, or pass a robot.toml file for a custom arm. The first run downloads MuJoCo Menagerie models, which takes about a minute.

### Does mjguard check speed or torque?

No. The project states that dynamics such as speed, torque and payload are not checked, and the envelope is geometric only.

### Does mjguard work with real hardware?

It drives a transport interface. The package ships a MuJoCo simulator transport, and a real arm needs its own transport for the driver.

### Is mjguard free?

Yes. mjguard is open source, so you can use and self-host it for free.

### How do I add mjguard to Claude Code?

Run this command in your terminal: claude mcp add mjguard -- uvx mjguard

### What are the best alternatives to mjguard?

The closest alternatives to mjguard are RoArm-M3, Embodify, Ugs MCP, Urml and Spingi.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [RoArm-M3](https://ai-powered.com/mcp/roarm-m3): RoArm-M3 is an open-source MCP server for robotics tooling.
- [Embodify](https://ai-powered.com/mcp/embodify): Embodify is an open-source MCP server for robotics tooling.
- [Ugs MCP](https://ai-powered.com/mcp/ugs-mcp): Ugs MCP is an open-source MCP server for robotics tooling.
- [Urml](https://ai-powered.com/mcp/urml): Urml is an open-source MCP server for robotics tooling.
- [Spingi](https://ai-powered.com/mcp/spingi): Spingi is an open-source MCP server for robotics tooling.
- [Gearotons M17 Servomotor](https://ai-powered.com/mcp/gearotons-m17-servomotor): Gearotons M17 Servomotor is an open-source MCP server for robotics tooling.

---
Source: https://ai-powered.com/mcp/mjguard
