# purinzan/gx3-cli-mcp [Health: Active]

**Category:** 🏭 Industrial & IoT  
**Repository:** https://github.com/purinzan/gx3-cli-mcp  
**GitHub Stars:** 8  
**Views:** 8  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/purinzan-gx3-cli-mcp

## Description
Read-only analysis of Mitsubishi Electric MELSEC PLC projects saved by GX Works3 (.gx3): trace why a coil never turns on through the ladder logic, find where a device is written and read, search by device comment, and separate conditions that arrive from physical inputs, HMI or network communication. Runs entirely locally and never modifies the project; no project-mutating command is exposed. Unofficial, not affiliated with Mitsubishi Electric.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "gx3-cli-mcp": {
    "command": "uvx",
    "args": ["gx3-cli-mcp"],
    "env": {
      "GX3_7Z": ""
    }
  }
}
```

**Requires environment variables:** `GX3_7Z` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What purinzan/gx3-cli-mcp MCP server does

The purinzan/gx3-cli-mcp MCP server reads local GX Works3 `.gx3` projects and turns ladder data into queryable analysis results. It is intended for investigating existing Mitsubishi Electric MELSEC programs, especially when you need to understand why a coil does not turn on, where a device is used, or which conditions originate outside the PLC.

The analysis is read-only. It does not write changes to a project, connect to a PLC to modify values, or replace GX Works3. Results are advisory, so findings should be checked in GX Works3 and against the applicable equipment-safety process before changes are made to a real system.

## How it works

The package installs both `gx3-cli` and `gx3-mcp-server`. The CLI can inspect a project directly, while the MCP process provides the same general analysis surface to an AI agent over stdio. A client can start it with the `gx3-mcp-server` command, or invoke `python -m gx3cli.gx3_mcp_server` when the console script is not available on `PATH`.

Projects can be prepared with `doctor`, then indexed with the lightweight index and cross-reference commands. The `guide` command examines the project and suggests which analysis commands to run next. Commands support JSON output for scripting and can write results to a file instead of standard output. When a `.gx3` archive is supplied, the tool extracts it into a cache identified by its SHA-256 value and analyzes that copy.

## Setup and configuration

Install Python 3.10 or newer, then run:

```text
pip install gx3-cli-mcp
```

A basic MCP configuration is:

```json
{
  "mcpServers": {
    "gx3": { "command": "gx3-mcp-server" }
  }
}
```

For 7-Zip-style project containers, install 7-Zip or set `GX3_7Z` to the executable path. Encrypted containers are not decrypted; the documented alternative is to export the project folder from GX Works3. No environment variable is required for the normal installation.

## Tools and capabilities

The purinzan/gx3-cli-mcp MCP server covers several project-review tasks:

- Trace device logic and inspect interlocks to investigate coils that remain off.
- Find where a device is written or read with cross-reference commands.
- Render ladder content as rung text or a layout image, and calculate project metrics.
- Search ladder comments instead of relying on an unknown device number.
- Identify inputs arriving from physical signals, HMI activity, or network communication.
- Detect dead logic and lint issues such as duplicate coils, multiple writers, operand-width problems, and type problems.
- Compare project versions with regular or semantic diffs.
- Check whether a project was read correctly with `roundtrip`.

The CLI also includes synthetic-project generation for trying the workflow without an existing project. A restricted command runner is exposed alongside the read-only analysis tools.

## Limitations and notes

Coverage is limited to ladder data in local `.gx3` projects. The software is unofficial and is not affiliated with Mitsubishi Electric. Live device values can be read with `live-read` over MC Protocol/SLMP, but this is CLI-only and requires explicit connection parameters; the stated MCP workflow remains project analysis rather than PLC control.

The tool does not decrypt encrypted project containers. If parsing fails, `doctor` is the first troubleshooting step. A failure-corpus command can capture a local regression sample without sending it elsewhere. The repository describes its licensing as source-available rather than open source: internal evaluation and company use are allowed, while redistribution, SaaS hosting, and inclusion in a paid product require written permission.

_Full upstream README: https://allmcps.com/mcp/purinzan-gx3-cli-mcp/readme_

