Skip to main content
Glama
openplc-engineering-mcp

openplc-engineering-mcp

by allanmarum

openplc-engineering-mcp

OpenPLC 向けに、ドメイン指向で読み取り専用のエンジニアリング操作を公開する小さな Python MCP サーバーです。

このプロジェクトは初期段階の実験的実装です。現在の目的は、MCP 互換エージェントと OpenPLC Editor プロジェクトの間に、最小限かつテスト可能な統合境界を確立することです。

アーキテクチャ

MCP Host / LLM Agent
        |
        | MCP
        v
OpenPLC Engineering MCP
        |
        v
OpenPLC

サーバーは公式の Model Context Protocol Python SDK と stdio トランスポートを使用します。OpenPLC を変更したり、汎用的なファイルシステムやシェルツールを公開したりすることはありません。

Related MCP server: gx3-mcp-server

要件

  • Python 3.12+

  • uv

  • Node.js/npm は MCP Inspector を使用する場合のみ必要です(mcp dev は npx を使用します)

インストール

git clone https://github.com/industrix-com-br/openplc-engineering-mcp.git
cd openplc-engineering-mcp
uv sync

実行

stdio MCP サーバーを起動します:

uv run openplc-engineering-mcp

MCP Inspector で開きます:

uv run mcp dev src/openplc_engineering_mcp/server.py --with-editable .

テスト

uv run pytest

テストは、ツール関数を直接呼び出すのではなく、公式 SDK のインメモリ Client(mcp) インターフェースを使用します。

現在のツール

  • get_server_info — サーバーの現在の機能を報告します。

  • get_project_structure — OpenPLC Editor プロジェクトの関連構造を返します。

  • list_pous — 現在の OpenPLC Editor プロジェクトレイアウトに従って、プログラム、ファンクションブロック、ファンクションを一覧表示します。

OpenPLC プロジェクトの検査は、現在の Editor レイアウトに従います:プロジェクトルートの project.json、pous/programs、pous/function-blocks、pous/functions の配下にある POU、および Editor が使用する関連デバイスとデータ型の場所です。

スコープ

このバージョンは意図的に読み取り専用かつ実験的です。このバージョンには、プロジェクトの変更、コンパイル、デプロイ、ランタイム制御、変数の強制、認証、HTTP トランスポート、無制限のシェル/ファイルシステムアクセスは含まれません。これらの機能は、具体的な要件がそれを正当化する場合にのみ追加されるべきです。

Available Tools

3 tools
get_project_structureB
Read-onlyIdempotent

Return the relevant file structure of an OpenPLC Editor project.

Inputs: project_path (required). Returns: name, path, type, files

get_server_infoA
Read-onlyIdempotent

Return basic information about this experimental OpenPLC MCP server.

Inputs: no named parameters. Returns: object

list_pousB
Read-onlyIdempotent

List the programs, function blocks, and functions in an OpenPLC project.

Inputs: project_path (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 3 tools

    Disambiguation4/5

    get_server_info is clearly distinct as server metadata. get_project_structure and list_pous overlap somewhat since a file structure could include POUs, but the descriptions separate file layout from logical POU listings.

    Naming Consistency4/5

    All tool names follow a verb_noun pattern with get_ and list_ prefixes. The mix of get and list is a minor style inconsistency, but the pattern is still predictable and readable.

    Tool Count4/5

    Three tools is a small but reasonable surface for an experimental read-only server. Each tool serves a distinct purpose, though the inclusion of a generic server_info tool makes the set feel slightly thin.

    Completeness2/5

    The server only provides inspection capabilities: server info, project structure, and POU listing. There are no operations for opening, editing, compiling, validating, or managing POU details, which are significant gaps for an engineering-focused server.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI agents to read and understand local Mendix project structure and logic by connecting directly to the .mpr file via MCP. Allows querying microflows, entities, attributes, and modules in read-only mode without requiring cloud access.
      4
      1
      ISC
    • F
      license
      A
      quality
      B
      maintenance
      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.
      15
      101 PyPI
      10
      -
    • F
      license
      D
      quality
      B
      maintenance
      Provides read-only, structured access to Yasin ecosystem information (project registry, documentation, GitHub state, diagnostics) through the MCP protocol, enabling AI agents to query without direct repository access.
      22
      3
      -