gx3-mcp-server
This server provides read-only analysis tools for GX Works3 PLC projects, enabling engineers and AI agents to inspect project structure and logic without modifying source files. Key capabilities include:
List allowed commands (
gx3_list_commands): Show all available read-only GX3 CLI commands.Trace device logic (
gx3_trace_device): Trace a device's ON/OFF/hold conditions from ladder topology, including master-control zones and warnings for multi-coil or conditional jump issues.Interlock check (
gx3_interlock_check): Statically determine if two coils' enable conditions can be simultaneously true, returning a witness assignment or mutual exclusion.Cross-reference lookup (
gx3_xref_where_used): Find writers and readers of a device with POU name and step number (requires pre-built xref database).Static linting (
gx3_lint): Run checks for duplicate coils, multi-writers, alarm quality, unused devices, comment issues, and math/type errors, outputting CSV reports.Dead logic detection (
gx3_dead_logic): Identify constant-OFF contacts, always-on NC contacts, unread coils/words, and SET-without-RST latches (requires xref database).Device map (
gx3_device_map): Show device usage ranges, density, and free gaps from the SQLite index.Alarm map (
gx3_alarm_map): Inventory alarms/faults with trigger, hold type, timer setpoint, and reset condition (requires xref database).Semantic diff (
gx3_semantic_diff): Perform rung-level comparison between two projects using stable block GUIDs.Network map (
gx3_network_map): Aggregate IP, CC-Link, SCON, and safety relationships.Ladder print (
gx3_ladder_print): Render programs in GX Works3 print-text layout, with filtering by section, device, or position range.Run arbitrary command (
gx3_run_command): Execute any MCP-allowed, read-only CLI command, rejecting mutating or demo-generation commands.
All tools operate locally and never modify the project, making them safe for AI-driven analysis.
Provides read-only analysis tools for Mitsubishi Electric GX Works3 (.gx3) PLC projects, enabling inspection of project structure, device usage, cross references, ladder conditions, communication boundaries, and static quality signals.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gx3-mcp-servertrace device M100 in the demo project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gx3-cli-mcp
Local GX Works3 project analysis for engineers and AI agents.
gx3-cli-mcp provides a Windows-first CLI and stdio MCP server for inspecting
GX Works3 (.gx3) projects on your own machine. It helps you search devices,
comments, cross references, ladder conditions, communication boundaries, and
static review signals without modifying the source project.
日本語: GX Works3 (.gx3) プロジェクトをローカルで読み取り解析し、AI
エージェントからも使える CLI / MCP サーバーです。プロジェクトを書き換えず、
デバイス、コメント、xref、ラダー根拠、通信境界を確認するための道具です。
This is an unofficial, independent tool. It is not endorsed by Mitsubishi Electric.
What You Can Do
Find where a device is used and whether it is read, written, or referenced.
Search device comments such as start, stop, alarm, cycle, step, or manual operation keywords.
Trace upstream conditions for a coil and print nearby ladder evidence.
Build xref and SQLite indexes so AI agents can answer from structured facts.
Review static risks such as duplicate coils, multi-writers, dead logic, and interlock possibilities.
Inspect external inputs, HMI/communication boundaries, IP maps, link maps, timing candidates, and project-wide summaries.
Related MCP server: TwinCAT Validator MCP Server
What It Does Not Do
It does not include real customer or production PLC projects.
It does not send project data to an online service by itself.
It does not provide a GUI in this release.
It does not require a license token or paid-plan token.
The MCP server does not expose project-mutating commands.
Install
python -m pip install git+https://github.com/purinzan/gx3-cli-mcp.git
gx3-cli --version
gx3-mcp-server --versionFor local source checkout:
python -m pip install -e .First Analysis
Run these three commands first for a real project:
gx3-cli doctor --root C:\path\to\project.gx3
gx3-cli index-lite build --root C:\path\to\project.gx3
gx3-cli xref build --root C:\path\to\project.gx3Then inspect a device:
gx3-cli query-device M100 --root C:\path\to\project.gx3
gx3-cli xref where-used M100 --root C:\path\to\project.gx3
gx3-cli trace-device M100 --root C:\path\to\project.gx3 --strict-logic --compactWhen you pass a .gx3 file, the tool extracts it into
.gx3_cache\<sha256>\ and analyzes that local cache.
Common Tasks
Goal | Command |
Check project readiness |
|
Build the search index |
|
Build cross references |
|
Look up one device |
|
Search by comment text |
|
Show external/HMI/communication boundary devices |
|
Find cycle, step, or state candidates |
|
Show used/free device ranges |
|
Show writers/readers |
|
Trace coil conditions |
|
Print ladder evidence |
|
Check static interlock possibility |
|
Run static review checks |
|
Create a support summary |
|
Use the indexed commands above for normal lookup and discovery. Avoid starting AI workflows with raw text search over extracted GX3 files; GX Works3 projects contain binary/database files, and the CLI preserves device, comment, POU, role, and step context.
Use With MCP
The MCP server is intended for AI clients that support stdio MCP servers.
{
"mcpServers": {
"gx3": {
"command": "python",
"args": ["-m", "gx3cli.gx3_mcp_server"]
}
}
}If your client can resolve console scripts from PATH:
{
"mcpServers": {
"gx3": {
"command": "gx3-mcp-server"
}
}
}The MCP server exposes read-only analysis tools and a restricted command runner. Synthetic demo generation is local CLI-only.
Demo Project
Use a synthetic project for screenshots, tutorials, and first-time tests.
gx3-cli synthetic-project demo.gx3 --overwrite
gx3-cli doctor --root demo.gx3
gx3-cli trace-device M100 --root demo.gx3 --strict-logic --compactData And Safety
Project files stay on your machine unless you pass outputs to another tool.
Some commands create local files such as SQLite indexes, CSV reports, ZIP support bundles, or Markdown summaries.
Analysis output is advisory. Verify findings in GX Works3 and through your own safety/quality process before changing real equipment.
The tool is not a substitute for PLC validation, machine safety review, or official engineering software.
Documentation
Recommended reading:
User manual (JA): Japanese install and usage guide.
Agent usage guide (JA): how AI agents should use the indexed tools.
Security note (JA): local data handling and read-only MCP policy.
Validation matrix (JA): verified scope and limitations.
File usage guide (JA): repository file map for agents and contributors.
MCP configuration examples:
MCP client config: robust
python -m gx3cli.gx3_mcp_serverlaunch.MCP client config, console script: direct
gx3-mcp-serverlaunch when PATH is reliable.
Distribution terms are defined in LICENSE.txt.
For Contributors
Before changing or publishing this project, run the same checks used by CI:
python run_tests.py
python scripts\release_gate.py .
python -m build --wheel
python scripts\release_gate.py dist\gx3_cli_mcp-*.whlMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceA Model Context Protocol server that enables seamless interaction between MCP clients (like Claude Desktop) and CODESYS V3 programming environments, allowing automation of project management, POU creation, code editing, and compilation tasks.Last updated220107MIT
- AlicenseBqualityFmaintenanceAn MCP server for validating, auto-fixing, and scaffolding TwinCAT 3 XML files using deterministic code quality tools and IEC 61131-3 OOP checks. It enables AI assistants to perform structural validation, apply safe fixes, and generate canonical code skeletons for industrial automation projects.Last updated1629MIT
- Alicense-qualityDmaintenanceIndustrial-grade MCP server for Siemens TIA Portal (V17–V21). 120+ tools for PLC programming: create blocks (FB/FC/OB/DB), manage tags, compile, download, and simulate with PLCSim Advanced. On-premise, sovereign-AI compatible.Last updated12MIT
- Flicense-qualityBmaintenanceMCP server that connects AI assistants to Siemens TIA Portal via the Openness API. AI-assisted PLC programming, project management, hardware configuration, cross-reference analysis, and deployment. 16 tools, 166 actions.Last updated20
Related MCP Connectors
Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.
Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/purinzan/gx3-cli-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server