Listed from the MCP registry; nobody on Odel publishes it.
PLC ladder logic for AI agents: edit over MCP, check on a scan simulator (MELSEC, IEC).
Runs on your machine from its package; the steps are below.

At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Distributed as an MCP bundle (`https://github.com/Piyoone3939/rungkit/releases/download/v0.4.1/rungkit-mcp-darwin-amd64.mcpb`) — download it and import the bundle in your MCP client.
Distributed as an MCP bundle (`https://github.com/Piyoone3939/rungkit/releases/download/v0.4.1/rungkit-mcp-darwin-arm64.mcpb`) — download it and import the bundle in your MCP client.
Distributed as an MCP bundle (`https://github.com/Piyoone3939/rungkit/releases/download/v0.4.1/rungkit-mcp-linux-amd64.mcpb`) — download it and import the bundle in your MCP client.
Distributed as an MCP bundle (`https://github.com/Piyoone3939/rungkit/releases/download/v0.4.1/rungkit-mcp-linux-arm64.mcpb`) — download it and import the bundle in your MCP client.
Distributed as an MCP bundle (`https://github.com/Piyoone3939/rungkit/releases/download/v0.4.1/rungkit-mcp-windows-amd64.mcpb`) — download it and import the bundle in your MCP client.
Distributed as an MCP bundle (`https://github.com/Piyoone3939/rungkit/releases/download/v0.4.1/rungkit-mcp-windows-arm64.mcpb`) — download it and import the bundle in your MCP client.
English | 日本語
An AI-native toolkit for PLC ladder programs.
rungkit keeps a ladder diagram as a series-parallel tree, lets an AI agent edit it over MCP, and lets the agent check its own work on a scan simulator. It supports Mitsubishi (MELSEC iQ-R) and IEC 61131-3, and reads and writes ladder text (.ldt), JSON, the MELSEC instruction list, Structured Text and PLCopen XML.
Status: prototype (0.x). Editing commands, simulator, MCP server, PLCopen XML and a browser version are in place.

The browser version runs entirely in the page (Go compiled to WebAssembly): write .ldt on the left and see the ladder diagram and diagnostics as you type, click an element to jump to its line or edit it on the diagram (drag contacts, coils, timers and counters from the parts palette onto it, or use the ribbon buttons; Delete and Esc work too), run .ldtest scenarios with a trace, and export to every format. Dark and light themes. Nothing is sent anywhere; your input stays in the browser.
Open it at https://piyoone3939.github.io/rungkit/ (updated with each release by .github/workflows/pages.yml), or build it yourself:
sh web/build.sh # builds web/dist
python -m http.server -d web/dist 8000 # then open http://localhost:8000
go install github.com/Piyoone3939/rungkit/cmd/rungkit@latest
Or download a binary for Windows, macOS or Linux from GitHub Releases.
claude mcp add rungkit -- rungkit mcp
io.github.Piyoone3939/rungkitrungkit-mcp-<os>-<arch>.mcpb) that apps supporting MCPB, such as Claude Desktop, install by opening the filerungkit mcp FILE starts with FILE open-root DIR); standard input (-) is refusedTools:
| Tool | What it does |
|---|---|
open_program / new_program / save_program | open / start / save (files change only on save) |
read_program | show the program with rung IDs (// r1) and element IDs (X0@e3) |
edit_program | apply a list of edit commands; all or nothing; one undo step |
undo / redo | undo / redo |
check_program | errors and warnings with codes, rung and element IDs |
run_scenario | run scenarios on the simulator (text or a .ldtest path; trace records every scan) |
export_program | write melsec / gxw3 / st / plcopen / json / ldt / ascii / svg |
Edit commands (ops of edit_program):
| Command | What it does |
|---|---|
add_rung(text, after?, comment?, label?) | add a rung |
replace_rung(rung, text) / delete_rung(rung) / move_rung(rung, after) / set_rung(rung, comment?, label?) | replace, delete, move or comment a rung |
insert_series(target, position, text) | put conditions before or after an element |
insert_parallel(target, to?, text) | add a branch parallel to an element (or the series range target..to); on an output it adds an output branch |
replace_element(target, text) / delete_element(target) / set_operand(target, operand) | replace, delete or re-address an element |
set_symbol(name, type?, address?, comment?) / delete_symbol(name) | device comments and variable declarations |
Example: add an emergency stop after the stop button
{"ops": [
{"op": "insert_series", "target": "e3", "position": "after", "text": "!X3"},
{"op": "set_symbol", "name": "X3", "comment": "emergency stop"}
]}
Edits that would make a rung an invalid ladder (a contact right of an output, …) are refused with the reason. Device mistakes (writing an input, …) are not refused but returned as diagnostics, so the agent can fix them next.
profile melsec-iqr
sym X0 "start button"
sym X1 "stop button"
sym Y0 "conveyor motor"
rung "run, self-holding" {
(X0 | Y0) & !X1 -> OUT(Y0)
}
rung "lamp and arrival" {
Y0 -> {
OUT(Y1)
rise(X2) -> SET(M10)
}
}
| Syntax | Meaning |
|---|---|
A & B | series (AND); binds tighter than | |
A | B | parallel (OR) |
!X1 | normally closed contact |
rise(X0) / fall(X0) | rising / falling edge |
[D0 >= K100] | comparison (= <> < <= > >=) |
condition -> output | one output at the right end, or a { } block of branches |
OUT SET RST PLS PLF | coils |
TON(T0, K50) / CTU(C0, K10) | timer / counter |
MOV ADD SUB MUL DIV INC DEC (suffix P: once per rising edge) | instructions |
// ... | comment |
Example: examples/conveyor.ldt
rungkit check examples/conveyor.ldt # errors and warnings
rungkit fmt -w examples/conveyor.ldt # canonical form
rungkit export -to melsec examples/conveyor.ldt
rungkit export -to gxw3 -o conveyor.csv examples/conveyor.ldt # CSV for GX Works3 (Edit > Import File)
rungkit export -to st examples/conveyor.ldt
rungkit export -to json examples/conveyor.ldt
rungkit export -to ascii examples/conveyor.ldt # the ladder drawn as text (svg for a picture)
check gives every problem a code (E_READ_ONLY, …) and a line and column, so an agent can fix them one by one.
Messages are available in English and Japanese, chosen by -lang en|ja, then RUNGKIT_LANG, then the system language.
Reads and writes PLCopen XML (TC6 v2.01) Ladder Diagram, to exchange programs with Beremiz, OpenPLC Editor, CODESYS and others.
rungkit export -to plcopen -name Conveyor examples/conveyor.ldt > conveyor.xml
rungkit check conveyor.xml # .xml opens directly (fmt / test / mcp too)
E_NON_SERIES_PARALLELK10 → 10, H1F → 16#1F, timer K50 → T#5000ms) and the profile is kept in addData to restore MELSEC spellings on importINC/DEC become ADD/SUB (same behavior), RST of a word becomes MOV(K0, …), independent circuits in one rung become separate rungsRST of timers and counters, MELSEC timers with a word device as presetRuns the program scan by scan on virtual time and checks it against scenarios.
scan 10ms
test "counts a part 5 s after it arrives" {
set X0 on
run 1 // one scan
set X0 off
set X2 on
run 4s // 4 s of virtual time
expect T0 off
wait T0 on within 2s
expect D0 1
}
| Command | Meaning |
|---|---|
set OP value | set an input or other device (on off 123 K123 H1F 5s) |
force OP value / unforce OP | pin a value (program writes are ignored) / release |
run N / run 5s | run N scans / a span of time |
expect OP value | check the value now |
wait OP value within 6s | run until the value appears; fail after the time |
watch OP... | record after every scan |
// ... or # ... | comment |
T0.ET (timer elapsed time) and C0.CV (counter value) can be read too. Every test starts from a fresh state.
rungkit test examples/conveyor.ldt examples/conveyor.ldtest
rungkit test -trace examples/conveyor.ldt examples/conveyor.ldtest # table of scans where values changed
rungkit test -json examples/conveyor.ldt examples/conveyor.ldtest # for agents
The simulator follows ladder semantics:
T adds ticks of a free-running 100 ms clock each time it runs, as the CPU does, so it may turn on up to 100 ms before "preset + 1 scan"; counters stop at the set value (a set value of 0 counts as 1); MUL writes the high word to D(n+1), DIV the remainder to D(n+1), words wrap at 16 bitsSM400 (always ON), SM401 (always OFF), SM402 (ON for the first scan)| Name | |
|---|---|
melsec-iqr | Mitsubishi iQ-R: X/Y/B/W in hexadecimal, D0.3 bit of word, K/H constants, timers in 100 ms |
melsec-fx5 | Mitsubishi FX5: like melsec-iqr, but X/Y in octal (X0-X7, X10, …) |
iec | IEC 61131-3: declare with sym name : type @ address, %IX0.0, T#5s |
Dependencies point inward only; internal/architecture_test.go enforces it.
| Layer | Package | Role |
|---|---|---|
| Domain | ladder | rung tree, normalization, shape rules, IDs |
| profile | vendor devices and instructions | |
| check | errors and warnings | |
| sim | scan simulator | |
| Application | editing | edit commands, undo and redo |
| scenario | running scenarios | |
| workspace | open, save, check, edit, export, scenarios (what CLI and MCP call); declares the interfaces it needs | |
| Infrastructure | ldt | .ldt text |
| ldtest | .ldtest scenarios | |
| jsoncodec | JSON | |
| export/melsec / export/st | MELSEC list / Structured Text | |
| plcopen | PLCopen XML | |
| filestore | files (outside the working folder refused for MCP) | |
| locale | system language | |
| render | ladder drawings as text (ascii) and SVG (svg) | |
| Presentation | cli / mcpserver / web | command line / MCP server / browser bindings |
| Shared | i18n | English and Japanese messages (used by every layer; standard library only) |
| Composition | cmd/rungkit / cmd/rungkit-web | wire the adapters and start (CLI and MCP / browser) |
check and scenarios before use. Build safety functions such as emergency stops in wiring and safety devices, not in software-to gxw3 writes the CSV GX Works3 imports, following the format in its operating manual, but importing it into GX Works3 has not been tried yet (how to check)See CONTRIBUTING.md. Issues and pull requests are welcome in English or Japanese.
Your choice of MIT or Apache-2.0.