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 using the l5x-mcp-server console command (installed by the step above):

Claude Code:

claude mcp add l5x-toolkit -- l5x-mcp-server

Claude Desktop: Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "l5x-toolkit": {
      "command": "l5x-mcp-server",
      "args": [],
      "env": {}
    }
  }
}

Verify the connection in Claude Code with the /mcp slash command — l5x-toolkit should appear as connected.

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
Component Libraries Configure library directories so Claude can import components by name
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.3.2.tar.gz (1.0 MB 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.3.2-py3-none-any.whl (713.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for l5x_toolkit-1.3.2.tar.gz
Algorithm Hash digest
SHA256 2b9d6af70b82a03cb1c6644e3312c53967dbb96b01a4c3261410ffedcab5eef3
MD5 fff7b3d488a3751c081001365ea92b20
BLAKE2b-256 8386a7bb59619e9761d9a941d1b1676aa40287df4668e67a798062e8a4ac6d66

See more details on using hashes here.

Provenance

The following attestation bundles were made for l5x_toolkit-1.3.2.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.3.2-py3-none-any.whl.

File metadata

  • Download URL: l5x_toolkit-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 713.3 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e1816f54bd7b01e7f7cad222ae4785af0560a05fe9d39724d08801895df4b68a
MD5 b83eb42e60aa18aa8525dfbd27b63415
BLAKE2b-256 30f8f4c96a5a1972aedb145a666b10d3d0decb1fa7effc0db84902c2b984a744

See more details on using hashes here.

Provenance

The following attestation bundles were made for l5x_toolkit-1.3.2-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