Version

TwinCAT coding agent for Beckhoff PLC development, with strict rules for Structured Text, naming conventions, PLC-aware tooling, syntax checks, and safe project validation workflows.

In Brief

TwinCAT-Agent provides:

  • a dedicated twincat agent
  • TwinCAT-specific skills and operating rules
  • a local MCP server for TwinCAT XAE engineering automation
  • a remote MCP server for Beckhoff InfoSys search and symbol lookup

In practice, it can automate TwinCAT XAE engineering actions on Windows (via a local MCP server), search Beckhoff InfoSys documentation and symbols (via a remote MCP server), and enforce a safer TwinCAT workflow than a generic assistant (naming conventions, PLC-aware operations, syntax checks, and a safe activation/login sequence).

Jump to: ✅ Requirements | 🧩 Install with Claude Code | 🧩 Install with GitHub Copilot CLI | 🚀 Quickstart

👷 Who This Is For

This repository is intended for developers and automation engineers working with:

  • Beckhoff TwinCAT 3
  • Structured Text and ExST
  • PLC project maintenance and refactoring
  • PLC-aware code generation, review, and troubleshooting

✅ Requirements

  • Windows x64
  • TwinCAT 3.1 Build 4026 or later
  • TwinCAT XAE Shell 64-bit
  • GitHub Copilot CLI or Claude Code

🧩 Install with Claude Code

Start Claude Code:

claude

Add this GitHub repo as a marketplace:

/plugin marketplace add TechIndustryX/twincat-agent

Install the TwinCAT plugin from that marketplace:

/plugin install twincat@twincat-plugins

If Claude prompts you to apply plugin changes without restarting:

/reload-plugins

Update the TwinCAT plugin:

/plugin update

Select the TwinCAT agent:

/agents
twincat

🧩 Install with GitHub Copilot CLI

Add this GitHub repo as a marketplace:

copilot plugin marketplace add TechIndustryX/twincat-agent

Install the plugin:

copilot plugin install TechIndustryX/twincat-agent

Start Copilot CLI:

copilot

Select the TwinCAT agent:

/agent
twincat

Enable unrestricted approvals (recommended to avoid repeated prompts):

/allow-all on

🚀 Quickstart

After the plugin is installed, the working flow is the same regardless of which supported assistant you use.

Open a terminal in the folder that contains the target .plcproj:

cd C:\Path\To\Your\TwinCAT\Project

Start your assistant:

copilot

or:

claude

Select a recent model (example: GPT-5.4 or Sonnet) using whatever model selection command or UI your assistant provides.

Select the twincat agent.

Copilot CLI:

/agent
twincat

Claude Code:

/agents
twincat

If you are using Copilot CLI, enable unrestricted approvals:

/allow-all on

Start with a concrete prompt:

Create a state machine in the example MAIN program.

From there, the twincat agent should resolve the project, initialize TwinCAT automation, inspect the PLC tree, and work through the change using the configured TwinCAT rules.

📚 Standalone Beckhoff InfoSys MCP

The Beckhoff InfoSys MCP server can also be used independently, without installing the rest of this repository.

Available tools include:

  • infosys_get_page: returns a documentation page rendered as clean Markdown
  • infosys_search: searches across indexed Beckhoff InfoSys documentation pages
  • infosys_search_symbols: searches IEC symbols such as function blocks, functions, structs, enums, and interfaces
  • infosys_search_code: searches Structured Text examples, variable names, and code fragments inside the documentation

License

This project is licensed under the PolyForm Noncommercial License 1.0.0.

You are free to use, modify, and distribute this software for personal, academic, and non-commercial purposes (e.g., hobby projects, personal study, testing, and open-source research). For commercial usage (e.g. consulting, integration into paid industrial projects, or enterprise environments), a commercial license is required. Please contact me directly to discuss commercial licensing options.