Connecting Claude Code to B&R Automation Studio — a build tools plugin via MCP

Hi all,

Like many of you, I’ve been experimenting with AI coding assistants in my day-to-day work. What I kept running into was a frustrating gap: Claude Code could help me write and review Structured Text and ANSI C, but it had no way to actually build the project, check whether the code compiled, or parse what went wrong.

So I built a small bridge for that.

BnRClaudePlugin is a Claude Code plugin that exposes B&R Automation Studio’s build toolchain as MCP tools. Once installed, Claude Code can trigger a build, scan directories for .apj project files, read project metadata, and parse build output into structured errors and warnings — all from within the conversation.

The five tools it provides are:

  • build_project — Build, Rebuild, BuildAndTransfer, or BuildAndCreateCompactFlash

  • list_projects — Recursively scan directories for .apj files

  • get_project_info — Read project name and available configurations

  • parse_build_log — Turn raw build output into structured errors and warnings

  • get_config — Show current server configuration

Installation is straightforward via the Claude Code plugin system:

/plugin marketplace add googoles/BnRClaudePlugin
/plugin install br-build@br-automation

The server auto-detects standard AS6 installation paths, but you can override via environment variables if your setup is different.

I want to be upfront: this is a personal project, not a polished production tool. It works well for my own workflow, and I figured someone else might find it useful — but please treat it accordingly. The repository is on GitHub:

github.com/googoles/BnRClaudePlugin

Everything is under the MIT license, so feel free to use, fork, or adapt it. I’ll do my best to respond to issues, but I can’t promise a fast turnaround.

Curious whether anyone else has been exploring AI tooling in their B&R workflow — happy to discuss what’s worked and what hasn’t.

Best regards!

8 Likes

If it works correctly, you should see “build project” like the screenshot above.