0
0
Fork 0
Codesys-MCP-SP21-plus/src
Karstein Phobic Nyvold Kvistad 1f23cb0498 feat: add install_library_file MCP tool for system-wide library installs
Adds a new tool that installs a .library file into the CODESYS Library
Repository via the scriptengine API, independent of any open project.
Useful for automating library bring-up on a fresh machine when the
CODESYS Store auto-download is broken (the immediate motivation: WAGO
libraries 404 against store.codesys.com / store-archive.codesys.com).

  - src/scripts/install_library_file.py:
      Single LIBRARY_FILE_PATH parameter. Defensive multi-pattern API
      probe -- libraries can be reached via either script_engine.libraries
      or script_engine.system.libraries depending on SP19/SP21/SP22, and
      the install method may be install_library / install / add_library /
      add with either (path,) or (path, overwrite) signatures. Picks the
      first writable (non-system) repository it finds. Reports installed
      name + version + repository on success.

  - src/server.ts:
      Wires the script as MCP tool 'install_library_file' immediately
      after add_library. Does NOT use the ensure_project_open helper,
      because repository installs work without a project loaded.

ASCII-only source (per the IronPython 2.7 lesson from 0.4.1).
Verification pending -- needs a real .library file to install.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 15:52:04 +02:00
..
scripts feat: add install_library_file MCP tool for system-wide library installs 2026-04-25 15:52:04 +02:00
bin.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
headless.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
ipc.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
launcher.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
logger.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
script-manager.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
server.ts feat: add install_library_file MCP tool for system-wide library installs 2026-04-25 15:52:04 +02:00
types.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00