gx3-mcp-server

gx3-mcp-server

Provides read-only analysis of Mitsubishi GX Works3 PLC projects via MCP, enabling device tracing, cross-referencing, ladder inspection, linting, and report generation without modifying source projects.

Category
访问服务器

README

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.

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 --version

For 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.gx3

Then 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 --compact

When 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 gx3-cli doctor --root project.gx3
Build the search index gx3-cli index-lite build --root project.gx3
Build cross references gx3-cli xref build --root project.gx3
Look up one device gx3-cli query-device M100 --root project.gx3
Search by comment text gx3-cli query-comment "起動" --root project.gx3
Show external/HMI/communication boundary devices gx3-cli query-external --root project.gx3
Find cycle, step, or state candidates gx3-cli query-cycle --root project.gx3
Show used/free device ranges gx3-cli device-map --root project.gx3 --types M,D,W --min-free 100
Show writers/readers gx3-cli xref where-used M100 --root project.gx3
Trace coil conditions gx3-cli trace-device M100 --root project.gx3 --strict-logic --compact
Print ladder evidence gx3-cli ladder-print <PROGRAM_OR_LDDB> --root project.gx3 --device M100
Check static interlock possibility gx3-cli interlock-check M100 M200 --root project.gx3
Run static review checks gx3-cli lint project.gx3
Create a support summary gx3-cli support-bundle --root project.gx3 -o support.zip

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 --compact

Data 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:

  1. User manual (JA): Japanese install and usage guide.
  2. Agent usage guide (JA): how AI agents should use the indexed tools.
  3. Security note (JA): local data handling and read-only MCP policy.
  4. Validation matrix (JA): verified scope and limitations.
  5. File usage guide (JA): repository file map for agents and contributors.

MCP configuration examples:

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-*.whl

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选