codesys-mcp-persistent
MCP serverCommunity
Keeps the CODESYS IDE open while an agent edits code, downloads to the PLC and reads or forces live variables. By luke-harriman.
96 starsUpdated 5 months agoGitHub data from 5 Nov 2026
At a glance
- Type
- MCP server
- Works with
- CODESYS
- How it connects
- Drives a running copy of the tool
- Access
- Can modify models
- Tool versions
- CODESYS V3.5 SP19 or SP20 for persistent mode; SP21 and later in headless mode only
- Operating systems
- Windows
- Needs a CODESYS licence
- Not stated in its documentation
- Transport
- Local (stdio)
- AI clients documented
- Claude Code
- Licence
- MIT
- Language
- Python
What it can do
- 41 tools run through a watcher script inside one visible CODESYS instance, so changes appear in the IDE as they happen.
- Creates POUs, DUTs, GVLs, methods and properties, searches code and renames symbols with a dry-run plan.
- Logs in to the PLC runtime, downloads (online change or full), starts and stops the application, and reads, writes or monitors variables.
Limitations
- Persistent mode works only on SP19 and SP20; newer versions spawn a headless CODESYS per call.
- write_variable forces the value until it is unforced or the runtime restarts.
- A developer tool, eval_python, runs arbitrary IronPython against the scripting engine.
Install
git clone <repository-url>
cd Codesys-MCP
npm install
npm run build
npm link{
"mcpServers": {
"codesys": {
"command": "codesys-mcp-persistent",
"args": [
"--codesys-path", "C:\\Program Files\\CODESYS 3.5.20.0\\CODESYS\\Common\\CODESYS.exe",
"--codesys-profile", "CODESYS V3.5 SP20",
"--mode", "persistent"
]
}
}
}MCP servers and skills run code on your computer. Review the source before installing.
AI-generated models, drawings and results must be checked by a qualified engineer before use.