Codesys Mcp Toolkit

MCP server that lets Claude read, write, compile and simulate Structured Text in CODESYS V3.5 projects

LLM Mart 1 views 60 listing impressions

Let Claude, or any MCP client, read, write, compile and simulate Structured Text in your CODESYS V3.5 projects.

English | 简体中文

License: MIT npm CODESYS V3.5 Node.js 20 or later Platform: Windows Model Context Protocol

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.

Claude builds a tank level controller in CODESYS: the live panel in the chat, the code compiled with 0 errors and five simulation tests passed, and the same function block in the CODESYS-style workspace, ready to review

Highlights

  • Edits your real project. POUs, methods, properties, interfaces, DUTs and GVLs, as Structured Text.
  • Compiles with the real compiler. Errors come back with object, line and code, including in code that no task calls yet.
  • Tests in simulation. Run, step exact cycles, read, write and force values in CODESYS's own simulation, with nothing else to install.
  • Understands the project. Outlines, I/O lists, the device tree and library interfaces, without reading every object.
  • Shows its work. A live panel with the project tree, the code as it is written, compile results, and Accept or Revert for each change.
  • Designs operator screens. Claude builds a live HMI for your program, with tanks, pumps, valves, a library of process symbols (or your own SVG), gauges, trends and alarms, looks at it, and polishes it. You operate it in the browser against the simulation, and it exports as a native CODESYS visualization with real CODESYS alarms.
  • Ready for handover. A project report with a commissioning checklist built from the project, and a plain-text export of every object for git.
  • Never touches a real controller. The only online connection is to CODESYS's own simulation, and every online call checks for it first.

Quick start

Requirements

  • Windows with CODESYS V3.5 and its Scripting add-on. Tested with SP21 and SP22 on Scripting 4.2, and SP21 on 4.1. SP16 and later should work.
  • Node.js 20 or later.

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.

Install

npm install -g @codesys/mcp-toolkit

Coming from version 1? The tools have changed: see Migrating from v1.

Connect it to Claude Desktop

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.

Try it

From the project's README.

Related servers

Read and write RAGE Package Format archives

23 views

See how ChatGPT, Claude, Gemini and Perplexity read any website. Scored out of 100.

19 views

MCP server for Geargrafx PC Engine / TurboGrafx-16 emulator

19 views

Read-only on-chain intel for AI agents on Base: balances, tokens, gas, tx status. No API keys.

15 views