Skip to main content

AI Agent Toolkit for Rockwell Automation L5X file manipulation

Project description

L5X Agent Toolkit

CI Python License: MIT

An MCP server that lets Claude safely read and modify Rockwell Studio 5000 L5X files — every operation produces structurally correct output; the agent never hand-edits XML.

You describe a PLC change in plain English; the toolkit translates it into byte-perfect L5X through validated functions that understand the schema, CDATA encoding, dual data-format synchronization, and Studio 5000's import rules.


Features

  • 21 tools covering tags, programs, rungs (RLL), ST lines, SFC charts, FBD sheets, alarms, I/O modules, AOIs, UDTs, axes, trends, and cross-reference analysis.
  • Native AOI/UDT editing — Add-On Instructions and User-Defined Types are edited in place, not round-tripped through an export shell.
  • Pre-flight validation — catch structural errors, missing references, and naming violations before you save.
  • Firmware v30–v38 — retarget projects across the supported range.
  • Plugin support — register custom tools via entry points (see PLUGINS.md).
  • Minimal dependencieslxml and the standard library, plus mcp[cli] for the server.

Quick Start

Install from PyPI:

pip install "l5x-toolkit[mcp]"

Or from source:

git clone https://github.com/Axiara/l5x-toolkit.git
cd l5x-toolkit
pip install -e ".[mcp]"

Either way this installs lxml and mcp[cli]. Requires Python 3.12+ (install 3.13 — see Getting Started). The import package is l5x_agent_toolkit.

Then register the MCP server:

Claude Code:

claude mcp add l5x-toolkit -- python -m l5x_agent_toolkit.mcp_server

Claude Desktop: Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "l5x-toolkit": {
      "command": "python",
      "args": ["-m", "l5x_agent_toolkit.mcp_server"],
      "env": {}
    }
  }
}

New to Python? See Getting Started for the full from-scratch setup (installing Python, PATH, and verifying the connection).

Example Conversation

You: Load my project at C:\Projects\Line4.L5X and tell me what is in it.

Claude: (calls load_project) Loaded: Line4_Controller (1756-L83E, FW 35.11). The project has 12 programs, 847 tags, 6 AOIs, 3 UDTs, and 24 modules.

You: Create a new program called PalletizerControl and schedule it under MainTask.

Claude: (calls manage_programs twice — once to create, once to schedule) Done. Created program 'PalletizerControl' with a MainRoutine and scheduled it under MainTask.

You: Add a DINT tag called PalletizerState, then add a rung that sets it to 1 when StartPB is pressed.

Claude: (calls manage_tags, then manage_rungs) Created the tag and added the rung: XIC(StartPB)MOV(1,PalletizerState);

You: Validate and save to C:\Projects\Line4_updated.L5X

Claude: (calls validate, then save_project) Validation passed with 0 errors. Saved to C:\Projects\Line4_updated.L5X.

Documentation

Document Description
Documentation index The docs hub — Using vs Contributing tracks
Getting Started Install Python, the toolkit, and the MCP server, from zero
Cookbook Task recipes — what to ask Claude, and which tools run
Tool Reference All 21 tools with parameters and behavior
Architecture The layered design and the 21-tool surface
Development & Roadmap Status, supported scope, known limitations, roadmap
Changelog Version history
Contributing Setup, tests, and how to contribute

Project Structure

The package is layered; lxml is isolated to core/. See Architecture for detail.

l5x_agent_toolkit/
  core/        XML tree, CDATA, reference scanner, config — the only layer that imports lxml
  model/       typed DTOs / view objects
  query/       read-only projections: inspect, inventory/list, references, resolver
  ops/         language & structural operation helpers
  validate/    typed Finding/Report checks (default + opt-in families)
  server/      MCP tool wrappers (envelope, reads, write/structural/lifecycle dispatch)
  mcp_server.py    registers the 21 tools over stdio

License

MIT License. See LICENSE for details.

Created by Megan Fox. Uses lxml for XML processing and the MCP Python SDK for the Model Context Protocol server.

Rockwell Automation, Studio 5000, Logix Designer, and RSLogix 5000 are trademarks of Rockwell Automation, Inc. This toolkit is not affiliated with or endorsed by Rockwell Automation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

l5x_toolkit-1.2.1.tar.gz (707.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

l5x_toolkit-1.2.1-py3-none-any.whl (611.8 kB view details)

Uploaded Python 3

File details

Details for the file l5x_toolkit-1.2.1.tar.gz.

File metadata

  • Download URL: l5x_toolkit-1.2.1.tar.gz
  • Upload date:
  • Size: 707.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for l5x_toolkit-1.2.1.tar.gz
Algorithm Hash digest
SHA256 25f2b4d0a8ef20d8481162890108f4f5735d3b99c79548c998b522ce5cc2c46a
MD5 6fc676f17a51e605b1fa4f9c99130a2c
BLAKE2b-256 76a56bcd728783033a09e2c2446927b013ff2f26612be78500eba45ad841de74

See more details on using hashes here.

Provenance

The following attestation bundles were made for l5x_toolkit-1.2.1.tar.gz:

Publisher: release.yml on Axiara/l5x-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file l5x_toolkit-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: l5x_toolkit-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 611.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for l5x_toolkit-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ceb221878bc827a31c707ce900906a7db599c254feda651b3d832bbd36afddb3
MD5 c0e876abba4d954475b5de60455311ee
BLAKE2b-256 761886b1d3371293943ff6a3c90ca496a19db7aefa91af6078b7e0325b9df44e

See more details on using hashes here.

Provenance

The following attestation bundles were made for l5x_toolkit-1.2.1-py3-none-any.whl:

Publisher: release.yml on Axiara/l5x-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page