MCP server that lets Claude read, write, compile and simulate Structured Text in CODESYS V3.5 projects
# Add to your Claude Code skills
git clone https://github.com/johannesPettersson80/codesys-mcp-toolkitGuides for using mcp servers skills like codesys-mcp-toolkit.
codesys-mcp-toolkit is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by johannesPettersson80. MCP server that lets Claude read, write, compile and simulate Structured Text in CODESYS V3.5 projects. It has 155 GitHub stars.
codesys-mcp-toolkit's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/johannesPettersson80/codesys-mcp-toolkit" and add it to your Claude Code skills directory (see the Installation section above).
codesys-mcp-toolkit is primarily written in TypeScript. It is open-source under johannesPettersson80 on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh codesys-mcp-toolkit against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Let Claude, or any MCP client, read, write, compile and simulate Structured Text in your CODESYS V3.5 projects.
English | 简体中文
An MCP server that keeps one CODESYS session open in the background and gives Claude, or any MCP client, direct access to it. Claude works on your real project with the real CODESYS compiler, and you can watch the code change as it happens.

Schneider EcoStruxure Machine Expert V2.3 (LogicBuilder.exe, Scripting 4.1)
works too: pass --codesys-path and leave out --codesys-profile, since Machine
Expert has no profiles. See the Machine Expert notes.
npm install -g @codesys/mcp-toolkit
Coming from version 1? The tools have changed: see Migrating from v1.
Add the server to %APPDATA%\Claude\claude_desktop_config.json, then restart
Claude Desktop:
{
"mcpServers": {
"codesys": {
"command": "codesys-mcp-tool",
"args": [
"--codesys-path", "C:\\Program Files\\CODESYS 3.5.21.0\\CODESYS\\Common\\CODESYS.exe",
"--codesys-profile", "CODESYS V3.5 SP21",
"--workspace", "C:\\PLC\\Projects"
]
}
}
}
--codesys-path and --codesys-profile are optional. Without them the server
uses the newest CODESYS install under Program Files and its newest profile.
Using OpenCode, Cursor, Cline or another client, or a model such as DeepSeek or Qwen? See Other clients and models.
Create a project called
BlinkDemo.project. Add a function block that toggles an output once per second, call it fromPLC_PRG, compile it, and prove in simulation that the output toggles.
CODESYS starts in the background when the server launches. A cold start takes 1 to 3 minutes; later starts take about 10 seconds.
Claude Desktop asks for approval per tool. Choose Always allow the first
time it asks about codesys, and once more for open_sim_panel. After that it
doesn't ask again.
Everything goes through one MCP tool, codesys, with an action for each
operation. The reference describes each one.
| Area | Actions |
|---|---|
| Projects | open_project create_project save_project close_project codesys_status |
| Read code | get_project_tree read_objects search_code get_outline |
| Change code | write_object create_object create_graphical delete_object rename_object |
| Build | compile |
| Libraries | find_library list_libraries add_library pin_library remove_library get_library_api get_signature |
| Navigate code | find_references rename_symbol |
| Tasks and I/O | list_tasks configure_task get_io_list get_devices find_device add_device device_parameters configure_device |
| Change tracking | checkpoint get_changes revert_object |
| Simulation | codesys_sim_start codesys_sim_stop codesys_sim_status codesys_sim_control codesys_sim_cycle codesys_sim_read codesys_sim_write codesys_sim_force codesys_sim_unforce codesys_sim_test |
| Trace | trace_setup trace_record |
| Debug | breakpoint_set breakpoint_on_change breakpoint_clear debug_status debug_step debug_continue watch |
| HMI screens | hmi_save_screen hmi_template hmi_screenshot hmi_export_codesys hmi_list hmi_delete_screen open_hmi hmi_save_symbol hmi_symbols hmi_delete_symbol hmi_translate hmi_pid |
| Alarms | alarm_list alarm_status alarm_acknowledge alarm_history create_alarm_history |
| Handover | project_report export_sources compare_sources create_recipes |
| Helpers | batch wait help open_workspace show_in_codesys |
batch runs up to 50 actions in one call, which is much faster than separate
calls.
Some actions go beyond what CODESYS's scripting API documents and use CODESYS's
own services inside the IDE: get_signature, find_references,
rename_symbol, trace_setup, trace_record, the debug actions,
hmi_export_codesys (with its alarms and user groups), the alarm actions and
--show-window.
They are experimental: checked on CODESYS V3.5 SP21 and SP22 as noted in
the changelog. On another version they may report that the
feature isn't available, or not work. They don't depend on CODESYS's
language: the native HMI export was checked with a German and a Chinese user
interface too.
Claude writes Structured Text, and creates ladder (LD), FBD, CFC and SFC
programs and function blocks with create_graphical from a simple description
of rungs, networks or steps; CODESYS draws them. SFC charts can have alternative
and parallel branches and jumps. A CFC is described as boxes, inputs, outputs,
connection marks and comments joined by wires, with positions, and can be
page-oriented: pages with a left margin for inputs, a right margin for outputs,
and connection marks that carry a signal to another page. What has no position is
placed automatically, with inputs lined up at the right in front of their box.
Reading an LD, FBD, CFC or SFC POU gives the same description (a CFC with its
pages and positions), so Claude can change existing graphical code too: it edits
the description and sends it back with replace: true.
Right after opening or creating a project, Claude opens the panel as a card in the chat. It shows the status, the object Claude is working on and how many objects changed. Open workspace expands it into a CODESYS-style view with the project tree, editor tabs, compile problems and a review list.
From the panel you can Accept or Revert each change, compare it with the version you last reviewed, and Pause Claude while you look around.

The card needs a client that supports MCP Apps. In our testing Claude Desktop draws it in the Code tab but not in a normal chat (anthropics/claude-ai-mcp#1243). Ask Claude to open the workspace in your browser if you'd rather have it there; the browser never opens by itself.
Ask Claude for operator screens and it designs them for your program: an overview of the line's stations, process diagrams, values with their set-points, trends and alarms, all bound to your PLC variables. The look is a calm, flat design system (Siemens iX colours, high-performance HMI practice after ISA-101): colour means a state or something to act on, never decoration.
![The overview of a heat treatment line: the machine's state "Production" in the top bar's corner with a green line under the bar, the line as station tiles on a product path (feed tank, pump, filter, heating with steam joining from above, holding tank, pump, centrifuge, filling) each with its pictogram and key value, a play sign before the running pumps and the centrifuge, a hand on the steam valve in manual, and below them cards for the outlet temperature