Skip to main content
Glama
openplc-engineering-mcp

openplc-engineering-mcp

by allanmarum

openplc-engineering-mcp

Небольшой MCP-сервер на Python, предоставляющий предметно-ориентированные инженерные операции для OpenPLC в режиме только для чтения.

Проект находится на ранней экспериментальной стадии. Его текущая цель — установить минимальную, тестируемую границу интеграции между MCP-совместимыми агентами и проектами OpenPLC Editor.

Архитектура

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

Сервер использует официальный SDK Model Context Protocol для Python и stdio-транспорт. Он не изменяет OpenPLC и не предоставляет универсальные инструменты для работы с файловой системой или shell.

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

В тестах используется внутрипроцессный интерфейс Client(mcp) из официального SDK, а не прямой вызов функций инструментов.

Текущие инструменты

  • get_server_info — сообщает о текущих возможностях сервера.

  • get_project_structure — возвращает актуальную структуру проекта OpenPLC Editor.

  • list_pous — выводит списки программ, функциональных блоков и функций, используя текущую структуру проекта OpenPLC Editor.

Проверка проекта OpenPLC выполняется в соответствии с текущей структурой Editor: project.json в корне проекта, POU ниже pous/programs, pous/function-blocks и pous/functions, а также соответствующие расположения устройств и типов данных, используемые Editor.

Область применения

Эта версия намеренно является экспериментальной и работает только на чтение. Она не включает изменение проекта, компиляцию, развертывание, управление во время выполнения, форсирование переменных, аутентификацию, HTTP-транспорт или неограниченный доступ к shell и файловой системе. Эти возможности следует добавлять только тогда, когда для них появятся конкретные требования.

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
      -