LabscoMCP early access ↗
johannesPettersson80MCP SERVER

Codesys-mcp-toolkit

Open, edit and compile CODESYS V3 projects through the scripting engine, driven from your MCP client.

by johannesPettersson80 ↗IoT, Smart Home & Embedded HardwareCommunity

LABSCO SUMMARY

Launch the command directly, not through npx.

The README is unusually specific about one trap: launched via npx inside a host like Claude Desktop, the process inherits a PATH that breaks an internal CODESYS call and you get 'C:\Program' is not recognized the moment you connect. Configure "command": "codesys-mcp-tool" instead. The other rule that saves an afternoon: use forward slashes in the object paths you pass to tools.

What it is

An MCP server for CODESYS V3 industrial programming environments. It drives the CODESYS Scripting Engine, so project management, POU creation, code editing and compilation become tool calls from an assistant rather than clicks in the IDE.

What you get

  • Projects: open_project for an existing one, create_project from a standard template, save_project
  • POUs: create_pou for Programs, Function Blocks and Functions, and set_pou_code for declaration and implementation text
  • Function Block members: create_property and create_method
  • compile_project, so the assistant finds out whether its edit builds
  • Read-only resources: codesys://project/status for scripting state and the currently open project, codesys://project/{+project_path}/structure for the object tree, and codesys://project/{+project_path}/pou/{+pou_path}/code for a POU, method or property accessor's code

Requirements

A CODESYS V3 installation with the Scripting Engine component enabled at install time — the toolkit was tested against 3.5 SP21 — and Node.js 18.0.0 or later. Install globally with npm install -g @codesys/mcp-toolkit, then point your client at the codesys-mcp-tool command and pass --codesys-path to your CODESYS.exe and --codesys-profile to the exact profile name; --workspace sets the root for relative project paths. CODESYS uses Python 2.7 internally for scripting, but the toolkit handles that — you do not manage it.

Setup effort

One command — npm install -g @codesys/mcp-toolkit