Skip to main content
Glama
openplc-engineering-mcp

openplc-engineering-mcp

by allanmarum

openplc-engineering-mcp

Ein kleiner Python-MCP-Server, der domänenorientierte, schreibgeschützte Engineering-Operationen für OpenPLC bereitstellt.

Das Projekt ist eine frühe experimentelle Implementierung. Sein aktueller Zweck ist es, eine minimale, testbare Integrationsgrenze zwischen MCP-kompatiblen Agenten und OpenPLC-Editor-Projekten zu etablieren.

Architektur

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

Der Server verwendet das offizielle Model Context Protocol Python SDK und den stdio-Transport. Er modifiziert OpenPLC nicht und stellt keine generischen Dateisystem- oder Shell-Tools bereit.

Related MCP server: gx3-mcp-server

Anforderungen

  • Python 3.12+

  • uv

  • Node.js/npm nur bei Verwendung von MCP Inspector (mcp dev verwendet npx)

Installation

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

Ausführen

Starten Sie den stdio-MCP-Server:

uv run openplc-engineering-mcp

Öffnen Sie ihn mit MCP Inspector:

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

Testen

uv run pytest

Die Tests verwenden die In-Memory-Schnittstelle Client(mcp) des offiziellen SDK, anstatt Tool-Funktionen direkt aufzurufen.

Aktuelle Tools

  • get_server_info — berichtet über die aktuellen Fähigkeiten des Servers.

  • get_project_structure — gibt die relevante Struktur eines OpenPLC-Editor-Projekts zurück.

  • list_pous — listet Programme, Funktionsbausteine und Funktionen anhand des aktuellen OpenPLC-Editor-Projektlayouts auf.

Die OpenPLC-Projektprüfung folgt dem aktuellen Editor-Layout: project.json im Projektstamm, POUs unter pous/programs, pous/function-blocks und pous/functions, sowie die zugehörigen Geräte- und Datentyp-Speicherorte, die der Editor verwendet.

Umfang

Diese Version ist bewusst schreibgeschützt und experimentell. Sie umfasst keine Projektänderung, Kompilierung, Bereitstellung, Laufzeitsteuerung, Variablen-Forcing, Authentifizierung, HTTP-Transport oder uneingeschränkten Shell-/Dateisystemzugriff. Diese Fähigkeiten sollten nur hinzugefügt werden, wenn konkrete Anforderungen sie rechtfertigen.

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
      -