Free: a TIA Portal MCP server — V17 through V21
We use AI agents on the bench every day. The piece that turns one from a chat window into something that actually touches the PLC project is an MCP server — a small bridge that exposes TIA Portal’s Openness API as tools the agent can call.
So here it is, free. A per-version build of a TIA Portal MCP server for V17, V18, V19, V20 and V21, ready to register with any MCP-capable client.
Download the zip → · MIT licensed · ~3.6 MB
Updated. This build now includes more WinCC Unified tooling for V20/V21 — including
ExportPlcTagsand export/import of HMI text lists (ExportHmiTextLists/ImportHmiTextLists) — on top of the screen-authoring tools (CreateScreen, CreateScreenItem, GetScreenInfo, DeleteScreen, SetScreenItemAttribute). Same zip URL as before.
This is a fork of the open-source heilingbrunner/tiaportal-mcp (MIT), extended so each TIA major version gets its own correctly-bound build.
It speaks the Model Context Protocol over stdio, so it works with any MCP client — Claude Code, Claude Desktop, VS Code, Cursor, or your own agent built on an MCP SDK.
What it lets an agent do
Once connected to a running TIA Portal, the agent gets tools to:
- Connect / Disconnect — attach to a running TIA Portal instance
- Open / Save / Close a project
- Browse the project tree — devices, software, blocks and types
- Export / Import blocks and PLC types (and SIMATIC SD “Documents” on V20+)
- Compile PLC software
In practice that means you can ask your agent to “list every FB in this PLC”, “export these blocks to XML”, or “compile the software and tell me what failed” — and it does it against the real project.
What you need first
- .NET Framework 4.8 (already on most engineering PCs)
- Siemens TIA Portal — the version you want to drive (V17–V21)
- Your Windows user must be in the
Siemens TIA Opennessuser group - An MCP-capable client (Claude Code/Desktop, VS Code, Cursor, or your own)
The download contains source code and a build script only. It does not include the Siemens Openness assemblies — those are Siemens’ property and aren’t ours to redistribute. You build the server against your own TIA install, which takes one command.
Build the version you need
Unzip, then from the project root run the build script for your TIA version:
.\build-tia-mcp.ps1 -Version 21 # → build\v21\TiaMcpServer.exe
.\build-tia-mcp.ps1 -Version 19 # → build\v19\
.\build-tia-mcp.ps1 -Version 18 # → build\v18\
.\build-tia-mcp.ps1 -Version 17 # → build\v17\
V20 uses the stock binary that ships with the upstream VS Code extension; V17, V18, V19 and V21 are rebuilt against the matching Openness NuGet package. The script resolves the Siemens assemblies from your TIA install at build time — no DLLs are copied next to the exe (doing so actually breaks Openness).
Register it with your MCP client
Point your client at the built exe, passing the TIA major version as a startup argument. The server is a standard stdio MCP server, so any client works — the config is just a command and its args.
For Claude Code, from bash (the -- separator matters — PowerShell eats the
flag):
claude mcp add tia-portal-v21 -- "C:\path\to\build\v21\TiaMcpServer.exe" --tia-major-version 21
For a client that uses a JSON config (Claude Desktop, VS Code, Cursor and most others), add a server entry:
{
"mcpServers": {
"tia-portal-v21": {
"command": "C:\\path\\to\\build\\v21\\TiaMcpServer.exe",
"args": ["--tia-major-version", "21"]
}
}
}
Repeat per version (tia-portal-v19, --tia-major-version 19, etc.), restart the
client, and the TIA tools should appear.
Use it
- Open TIA Portal (the version matching the build) with your project.
- Ask your agent to Connect, then GetProjectTree — it attaches to the running instance and reads the structure.
- From there: browse blocks, export/import, compile — in plain language.
A couple of things worth knowing:
Connectattaches to any running TIA Portal it finds first. If you have a different version open, close it — otherwise it attaches to the wrong one.- Older versions lost some APIs, so the source compiles different feature sets per version: V17 has no block namespaces, V17/V18 have no WinCC Unified, and the “Documents” export/import is V20+ only. The build handles this for you.
License
MIT — original work © J.Heilingbrunner, multi-version build support
© Sean Shen. The LICENSE file is inside the zip. Use it, ship it, build on it.
If you want this kind of automation wired into your own workflow — custom tools, your house export format, hooked into a commissioning checklist — that’s the sort of thing we build for clients.