Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

zackpeters93/ugs-mcp MCP server](https://glama.ai/mcp/servers/zackpeters93/ugs-mcp/badges/score.svg)](https://glama.ai/mcp/servers/zackpeters93/ugs-mcp) 🐍 πŸ“Ÿ 🏠 🍎 - CNC machine control via Universal G-code Sender (GRBL).

README.md

ugs-mcp

![PyPI version](https://pypi.org/project/ugs-mcp/) ![CI](https://github.com/zackpeters93/ugs-mcp/actions/workflows/ci.yml) ![License: MIT](LICENSE) ![Python 3.11+](https://www.python.org/downloads/) ![ugs-mcp MCP server](https://glama.ai/mcp/servers/zackpeters93/ugs-mcp)

MCP server for controlling CNC machines via Universal GCode Sender.

Lets Claude (or any MCP-compatible AI assistant) connect to a CNC machine, inspect G-code, and issue motion commands β€” all through the UGS Pendant REST API.

---

⚠️ STOP. READ THIS FIRST.

This software controls machines that can damage equipment, destroy parts, and injure or kill people.

CNC machines move fast and don't know where your hands are. Before you use this:

If you skim the safety docs and something goes wrong, that's on you. We warned you.

---

What it does

  • Connection tools β€” Connect/disconnect UGS to your CNC, troubleshoot serial port issues
  • Status tools β€” Read machine state, position, feed rate, spindle speed
  • Motion tools (token-protected) β€” Jog axes, home, return to work zero, run G-code files and macros
  • G-code inspector β€” Translate G-code to English, safety check, cycle time estimate, tool list

Every motion command uses a two-step token protocol: Claude generates a token, shows it to you, and the machine only moves when you read the token back. Claude cannot bypass this β€” tokens are generated and validated server-side.

---

Requirements

  • Universal GCode Sender 2.x (winder.github.io/ugs_website)
  • UGS Pendant plugin installed and active (Tools β†’ Plugins β†’ Installed)
  • Pendant running at http://localhost:8080 (default)
  • Python 3.11+

---

Installation

Via pip

pip install ugs-mcp

From source

git clone https://github.com/zackpeters93/ugs-mcp.git
cd ugs-mcp
pip install -e .

---

Claude Code setup

claude mcp add ugs-cnc ugs-mcp

Or from source (without pip install):

claude mcp add ugs-cnc /path/to/ugs-mcp/ugs_mcp/run_server.sh

---

Claude Desktop setup

In ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "ugs-cnc": {
      "command": "ugs-mcp"
    }
  }
}

Or from source:

{
  "mcpServers": {
    "ugs-cnc": {
      "command": "/opt/homebrew/opt/python@3.11/libexec/bin/python3",
      "args": ["-m", "ugs_mcp.server"],
      "cwd": "/path/to/ugs-mcp"
    }
  }
}

---

Configuration

Environment variables (all optional):

| Variable | Default | Description | |---|---|---| | UGS_HOST | localhost | UGS Pendant host | | UGS_PORT | 8080 | UGS Pendant port | | MACROS_DIR | ugs_mcp/macros/ | Directory for saved G-code macros | | RAPID_SPEED_MM_MIN | 5000 | Rapid speed used in return-to-zero |

Copy .env.example to .env to customize.

---

The token system

Every motion tool uses a mandatory two-step confirmation:

Step 1 β€” Call the tool without a token. Claude shows you a preview (axis, distance, resulting position, safety warnings) and a token like [A3F8B2C1].

Step 2 β€” Read the preview. If you agree, tell Claude the token. Claude calls the tool again with confirmation_token="A3F8B2C1". The machine moves.

Tokens are generated server-side via uuid4(), expire in 2 minutes, and are single-use. Claude cannot predict, fabricate, or reuse them. The only way movement happens is if you type the token back.

---

Tools

See USER_GUIDE.md for the full tool reference with parameters, examples, and typical workflows.

| Category | Tools | |---|---| | Connection | ugs_connect, ugs_disconnect, ugs_troubleshoot_connection | | Status | ugs_get_status, ugs_get_job_status | | Job | ugs_run_file, ugs_pause_job, ugs_cancel_job | | Motion | ugs_jog, ugs_home, ugs_return_to_zero, ugs_set_work_zero | | G-code | gcode_safety_check, gcode_estimate_time, gcode_translate, gcode_list_tools, gcode_save_macro, gcode_list_macros, gcode_run_macro |

---

Tested with

  • SainSmart Genmitsu 3018 Pro (GRBL)
  • UGS 2.x with Pendant plugin
  • macOS / Python 3.11

Likely works with any GRBL-based machine. TinyG/FluidNC/Smoothieware untested.

---

License

MIT β€” see LICENSE.

No warranty. No liability. Read SAFETY.md.

<!-- mcp-name: io.github.zackpeters93/ugs-mcp -->

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.