CODESYS MCP Toolkit
Open-source MCP server that reads, writes, compiles, and simulates Structured Text in a CODESYS V3.5 project.
Caveats and limits
Independent MIT-licensed MCP server, not the CODESYS Development System MCP add-on. The README opened 3 December 2026 says one tool, codesys, reads and writes Structured Text, compiles, and simulates. Its highlights say: "Never touches a real controller. The only online connection is to CODESYS's own simulation, and every online call checks for it first." Requirements named there are Windows, CODESYS V3.5 with the Scripting add-on, and Node.js 20 or later. The README says it was tested with SP21 and SP22 on Scripting 4.2, and SP21 on 4.1, and that SP16 and later should work. That is the author's statement. The two newest releases are v2.15.1 (03 Dec 10:23 UTC) and v2.15.0 (02 Dec 13:34 UTC). v2.15.0 adds batch rename_symbol, dry_run: true, which changes nothing, and check: true, which rolls the call back when the build has new errors. This index did not install it.
What the README says it is
The README opened 3 December 2026 calls this an MCP server that keeps one CODESYS session open and gives Claude, or any MCP client, access to it. The opening line says it lets a client read, write, compile and simulate Structured Text in CODESYS V3.5 projects. The same page says the project is independent. The license section says: "This project is independent and isn't affiliated with or endorsed by CODESYS GmbH." CODESYS is named there as a trademark of CODESYS GmbH. A price: Not stated.
The install command in that README is npm install -g @codesys/mcp-toolkit. The Claude Desktop example runs the command codesys-mcp-tool. --codesys-path and --codesys-profile are optional. The README says that without them the server uses the newest CODESYS install under Program Files and its newest profile. It also shows OpenCode, Cursor, and Cline as other clients. The README says it was tested on 13 November 2026 with OpenCode 1.19.5 and CODESYS V3.5 SP22.
What one tool exposes
The README says everything goes through one MCP tool, codesys, with an action for each operation. The table groups those actions as projects, read code, change code, build, libraries, navigate code, tasks and I/O, change tracking, simulation, trace, debug, HMI screens, alarms, handover, and helpers. The table names 80 actions across those 15 areas. Change-code actions named there include write_object, create_object, create_graphical, delete_object, and rename_object. The build action is compile. Simulation actions include codesys_sim_start, codesys_sim_stop, codesys_sim_read, codesys_sim_write, and codesys_sim_force. Navigate-code actions include find_references and rename_symbol. The README says batch runs up to 50 actions in one call.
The README says Claude writes Structured Text and can create ladder, FBD, CFC, and SFC programs and function blocks with create_graphical. It says reading an LD, FBD, CFC, or SFC POU returns the same description, so existing graphical code can be edited and sent back with replace: true. Some actions are marked experimental: get_signature, find_references, rename_symbol, trace_setup, trace_record, the debug actions, hmi_export_codesys, the alarm actions, and --show-window. The README says those were checked on CODESYS V3.5 SP21 and SP22 as noted in the changelog, and that on another version they may report that the feature is not available, or not work. That check is the author's.
Versions, simulation, and license
The Requirements section says Windows with CODESYS V3.5 and its Scripting add-on, and Node.js 20 or later. It says the toolkit was tested with SP21 and SP22 on Scripting 4.2, and SP21 on 4.1, and that SP16 and later should work. That "should work" is the README's statement, not a result from this index. The same section says Schneider EcoStruxure Machine Expert V2.3 (LogicBuilder.exe, Scripting 4.1) works too if you pass --codesys-path and leave out --codesys-profile, because Machine Expert has no profiles. A supported CODESYS 4 version: Not stated.
The highlights say: "Never touches a real controller. The only online connection is to CODESYS's own simulation, and every online call checks for it first." The README says changes can be undone with checkpoint and revert_object, and that the project is saved after every change unless --no-autosave is set. The Safety section says the toolkit does not log in or download to a controller, that it goes online only to CODESYS's own simulation, and that every online call first checks that simulation mode is on. It also says one approval covers every action, including actions that change or delete project code, and tells you to work on a copy or keep the project in version control. It says editing is refused while the simulation runs, and that the simulation setting on the device is never saved. The README does not describe a flag that leaves project edits or simulation writes off until armed. This index classifies the server as inside the IDE: it edits the open project and, on the README's own statement, does not open a session to a real controller. That label is not a safety case.
The LICENSE file opened the same day is the MIT License. Its copyright line is "Copyright (c) 2025 CODESYS MCP Server Contributors". The README points at that file.
Releases on 2 and 3 December 2026
On the releases page opened 3 December 2026, the two newest releases are v2.15.1, released 03 Dec 10:23 UTC, and v2.15.0, released 02 Dec 13:34 UTC. The same page also lists v2.14.1 from 2 December and v2.14.0 from 1 December. v2.15.0 adds rename_symbol in a batch: renames as a list of kind, owner, name, and newName in one call. The note says every rename is worked out on the unchanged project and checked, including names, owners, unclear uses, renames whose order would matter, and two names becoming one, before anything is written. It then says each object is written once and the project is saved once. It says dry_run: true lists what would change, per object with line and old -> new, plus the I/O channels, task events and HMI bindings, and changes nothing. It says check: true builds before and after and undoes everything the call changed, naming object texts, POU names, task events, I/O mappings, and the HMI spec, if the build has new errors. The same note says that on CODESYS V3.5 SP21, 7 renames took 8 s with a build check, against about 7 s per rename one call each. That timing is the release note's, not a measurement by this index.
v2.15.1, the later of the two, says it fixes rename_symbol in a batch when a channel is mapped through two renamed variables, an instance and a member of it. It says each I/O pair now also gets the new names of the renamed parts in front of it. It also says rename_symbol with check: true no longer undoes every rename of a name bound on a page that hmi_export_codesys made, because that page binds the old name until it is exported again. Errors in the pages listed under "Run hmi_export_codesys" no longer count. New errors anywhere else still undo the rename. The note thanks jblom-vt.
How this differs from the official add-on
CODESYS Development System MCP Server is a different catalog entry. That page, last verified 20 November 2026, describes a CODESYS add-on for the Development System V3.5 SP22 or later, licensed through the Professional Developer Edition. This toolkit is the independent MIT server above. The official entry cites LADX for a local stdio server and says nothing in the published tool list logs in, downloads, or writes a live value. Whether that add-on can run CODESYS simulation: Not stated on the pages cited for it. This README's online path is the simulation sentence quoted above. The two pages are not two names for one product.
FAQ
Does CODESYS MCP Toolkit connect to a real controller?
The README opened 3 December 2026 says it does not. The highlights say: "Never touches a real controller. The only online connection is to CODESYS's own simulation, and every online call checks for it first." The Safety section says it does not log in or download to a controller.
Which CODESYS versions does the README name?
The README says Windows with CODESYS V3.5 and the Scripting add-on. It says tests used SP21 and SP22 on Scripting 4.2, and SP21 on 4.1, and that SP16 and later should work. It also says Machine Expert V2.3 with Scripting 4.1 works. A CODESYS 4 version: Not stated. Those sentences are the README's.
Is this the official CODESYS MCP add-on?
No. The README says the project is independent and is not affiliated with or endorsed by CODESYS GmbH. The official add-on is the separate CODESYS Development System MCP Server page. That add-on is licensed through the Professional Developer Edition for V3.5 SP22 or later. This server is MIT-licensed.
Who it's for
An engineer attaching an MCP client to IEC 61131-3. Treat the write policy as the safety boundary: a gated write is still a write once you arm it.
Protocols it speaks
Sources
- READMEhttps://github.com/johannesPettersson80/codesys-mcp-toolkit/blob/main/README.md
- LICENSEhttps://github.com/johannesPettersson80/codesys-mcp-toolkit/blob/main/LICENSE
- Releaseshttps://github.com/johannesPettersson80/codesys-mcp-toolkit/releases
Cite this entry as https://otaihub.com/tools/codesys-mcp-toolkit, checked 2026-12-03.
More Industrial MCP servers
- CODESYS Development System MCP ServerOfficial CODESYS add-on that lets an MCP client read and write the open V3 project. CODESYS 4 AI code completion is a separate research project.
- IndustriConnect Modbus MCPOpen-source Modbus TCP, UDP, and RTU client for MCP hosts, with a mock device and writes off by default.
- IndustriConnect OPC UA MCPPython and Node OPC UA MCP servers with the same tools: browse, read, history, alarms, and gated writes.
- IndustriConnect MQTT / Sparkplug MCPMQTT client that publishes, subscribes, and decodes Sparkplug B instead of handing the model raw bytes.