Skip to main content
Glama
openplc-engineering-mcp

openplc-engineering-mcp

by allanmarum

openplc-engineering-mcp

Un pequeño servidor MCP en Python que expone operaciones de ingeniería orientadas a dominio y de solo lectura para OpenPLC.

El proyecto es una implementación experimental temprana. Su propósito actual es establecer un límite de integración mínimo y comprobable entre agentes compatibles con MCP y proyectos de OpenPLC Editor.

Arquitectura

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

El servidor utiliza el SDK oficial de Model Context Protocol para Python y transporte stdio. No modifica OpenPLC ni expone herramientas genéricas de sistema de archivos o shell.

Related MCP server: gx3-mcp-server

Requisitos

  • Python 3.12+

  • uv

  • Node.js/npm solo cuando se usa MCP Inspector (mcp dev usa npx)

Instalación

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

Ejecución

Inicie el servidor MCP stdio:

uv run openplc-engineering-mcp

Ábralo con MCP Inspector:

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

Pruebas

uv run pytest

Las pruebas usan la interfaz Client(mcp) en memoria del SDK oficial en lugar de llamar directamente a las funciones de herramienta.

Herramientas actuales

  • get_server_info — informa las capacidades actuales del servidor.

  • get_project_structure — devuelve la estructura relevante de un proyecto de OpenPLC Editor.

  • list_pous — lista programas, bloques de función y funciones usando el diseño actual del proyecto de OpenPLC Editor.

La inspección de proyectos de OpenPLC sigue el diseño actual del Editor: project.json en la raíz del proyecto, POUs debajo de pous/programs, pous/function-blocks y pous/functions, además de las ubicaciones relacionadas de dispositivos y tipos de datos utilizadas por el Editor.

Alcance

Esta versión es intencionalmente de solo lectura y experimental. No incluye modificación de proyectos, compilación, despliegue, control en tiempo de ejecución, forzado de variables, autenticación, transporte HTTP ni acceso sin restricciones a shell/sistema de archivos. Esas capacidades deberían agregarse solo cuando requisitos concretos lo justifiquen.

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
      -