TiaLink › TIA Portal MCP Server · 中文

TiaLink · TIA Portal MCP gateway

Give your AI agent hands inside Siemens TIA Portal.

One MCP endpoint over Streamable HTTP. The agent reads the project, configures hardware and PROFINET, writes SCL and ladder, compiles, downloads to S7-PLCSIM Advanced and reads the result back — on your machine, with your project data never leaving the plant. Most people search for a TIA Portal AI tool; what matters is whether the agent can open the project, compile what it wrote, and prove the result in simulation — not how good the code looks in a chat window.

What a TIA Portal MCP server actually is

Ask an AI agent to write a PLC program and you get text. Ask it to add a CPU to the rack, compile that block, download it into S7-PLCSIM Advanced and read the tag back — and you get a result you can check. The difference is not the model. It is whether the agent has a tool that reaches Siemens TIA Portal.

MCP (Model Context Protocol) is the plumbing that lets a model call tools instead of only writing prose. TiaLink wraps Siemens TIA Portal Openness behind a single MCP endpoint, so those calls land on the same Openness operations a hand-written C# automation would use — which is why what you verify offline behaves the same when the engineer opens the project.

What the agent can do

GroupRepresentative operations
ReadProject tree, block source, tag tables, UDTs, cross-references, HMI screens, hardware configuration
UnderstandIndex the project into a project knowledge graph (the tialink_context_* tools): blocks and interfaces, who calls whom, which DB members a network reads or writes, dangling references, and the impact of a change
WriteCreate or rewrite SCL, import SimaticML (including LAD), edit block interfaces, compile one block or the whole PLC
Generate LADWrite ladder against the LadDoc contract TiaLink serves (tialink_lad_spec, tialink_lad_catalog, tialink_lad_examples); the separate LadDoc MCP at /lad/ validates it and renders the ladder block; then import and compile it here
ConfigureAdd a CPU, insert modules, create subnets, wire IO systems, assign IP addresses and PROFINET device names
Verify (unit)Unit-level — scenario suites, parameter sweeps, seed-based fuzzing, invariants on the cloud simulator → PASS/FAIL, CI-ready
Verify (machine)Machine-level — download to S7-PLCSIM Advanced, run a scenario, compare tag values against expected
ArchiveSave, export SimaticML, archive the project for versioning

The order matters more than the list: read the block → propose a change → dry-run → write → compile → simulate → read back → keep or roll back. Every step leaves evidence a reviewer can check.

Ladder generation and the project knowledge graph

Generate ladder, not just SCL

Ladder is the artifact Siemens engineers actually ship. TiaLink serves the LadDoc contract, the closed instruction catalogue and worked examples as MCP tools (tialink_lad_spec, tialink_lad_catalog, tialink_lad_examples), so the agent writes ladder against a schema instead of guessing at XML. The LadDoc MCP — a separate service at tia.hubwiz.com/lad with its own quota — validates the document and renders the ladder block; TiaLink then imports that XML into TIA Portal and compiles it.

Know the project before the first edit

One call indexes the open project into a project knowledge graph — the tialink_context_* tools — covering blocks and interfaces, who calls whom, which DB members each network reads or writes, and which references no file defines. The agent can search symbols, walk call chains, read a block digest and ask what a change would affect before a write, not after a failed compile. Indexing is read-only, never uploads the project, and can also run offline against an existing export directory.

Guardrails, because writing is the easy half

A dry run previews a write before it touches the project. Compile is a gate, not a formality: a block that does not compile does not get downloaded. Simulation in S7-PLCSIM Advanced runs the scenario and returns tag values as the pass/fail criterion. Changes are reversible at block level, so a bad edit is a diff, not an incident.

And the limit, stated plainly: safety stays in hardware. Emergency stop, hardwired interlocks and timing tuning are not verified in a simulator. What an agent verifies is the software part — logic, structure, interfaces, compile cleanliness, scan-cycle behaviour. Anything that could hurt a person belongs to a hardwired circuit and an engineer's sign-off.

Three ways people automate TIA Portal today

ApproachWhat it touchesWhere it breaks
GUI automation (click the TIA Portal window)The UIAny dialog change or language switch breaks the script, and almost nothing can be read back reliably
Openness scripts (C# or PowerShell, one per task)The APIPrecise, but someone writes a script per task and the agent cannot explore beyond it
MCP server (Openness exposed as tools)The API, via MCPThe agent picks the tool and reads the result — which is why write paths need guardrails

The first two are what most teams already have, and neither is wrong. An MCP server pays off when the same kinds of operations repeat — another motor, another interlock, another block to port.

Connect it in three lines

  1. Runs on the same Windows machine as TIA Portal (Openness only exists there). Clients can sit anywhere on the LAN.
  2. Point any MCP client at the endpoint over Streamable HTTP with a Bearer token.
  3. Read-only works without a licence. Writing requires one, bound to the machine code and usable offline.
# Claude Code
claude mcp add --transport http tialink http://192.168.1.110:8080/mcp \
  --header "Authorization: Bearer <token>"
claude mcp list

# Any client with a JSON config
{
  "mcpServers": {
    "tialink": { "url": "http://192.168.1.110:8080/mcp",
                 "headers": { "Authorization": "Bearer <token>" },
                 "timeout": 180 }
  }
}

# Clients that only speak stdio (MIT-licensed forwarder)
npx tialink-mcp --url http://192.168.1.110:8080/mcp --token <token>

Raise the client timeout: adding a CPU or importing an SCL block can take tens of seconds on a slower machine, and a 60-second default fails on the “normally slow” operations, which reads as a bug.

Requirements and limits, without the marketing

  • TIA Portal V19 / V20 / V21 on Windows (V21 requires TiaLink 1.5.0 or later).
  • The Windows account running the gateway must be in the Siemens TIA Openness user group.
  • A TiaLink licence is issued per machine (.lic) and runs offline. Without it the connection is read-only.
  • Commercial, closed-source software. The public repository holds documentation, examples and a MIT-licensed stdio transport adapter; the adapter cannot work without the gateway.
  • Third-party tool by Hubwiz — not a Siemens product, and not an alias for anything Siemens ships.
  • No cloud, no outbound connection required. Project data stays on the machine.

Common questions

What is a TIA Portal MCP server?

A TIA Portal MCP server exposes TIA Portal operations — reading blocks, configuring hardware, writing SCL, compiling, downloading to a simulator — as MCP tools, so an MCP-capable AI agent can call them directly instead of producing code for a human to paste.

Do I still need a TIA Portal installation and licence?

Yes. TiaLink drives a real TIA Portal through Siemens Openness, so TIA Portal must be installed and licensed on the same Windows machine. TiaLink adds a licence of its own on top; without it the connection is read-only.

Can an AI agent program a PLC unsupervised?

No. The verifiable part is the software: logic, interfaces, compile results and simulated behaviour. Safety functions, hardwired interlocks, wiring and commissioning remain engineering work with a human sign-off.

Does project data leave the machine?

No. The gateway and the graph run on the same Windows machine as TIA Portal; project data never goes to a server. The cloud simulator only receives the code you explicitly submit.

Is TiaLink an official Siemens product?

No. It is a third-party tool built by Hubwiz on top of Siemens TIA Portal Openness, and has no affiliation with Siemens.

Can the agent generate ladder (LAD), not just SCL?

Yes. TiaLink serves the LadDoc contract and the closed instruction catalogue, so the agent writes ladder against a schema. The LadDoc MCP is a separate service (https://tia.hubwiz.com/lad/, with its own quota) that validates the document and renders the ladder block; TiaLink imports that XML into TIA Portal and compiles it. TiaLink provides the contract and the import path — the logic is generated by the agent and checked by the pipeline.

What is the project knowledge graph (project context)?

The same thing: TiaLink indexes the project's SimaticML export into a queryable project knowledge graph — blocks, interfaces, calls, DB and tag reads and writes, unresolved references — exposed through the tialink_context_* MCP tools. The agent can search symbols, walk call chains, read a block digest and ask what a change would affect. Indexing is read-only, never uploads the project, and can also run offline against an existing export directory.

Which TIA Portal versions are supported?

TIA Portal V19, V20 and V21, built on Openness and running on a licensed Windows installation of TIA Portal. V21 requires TiaLink 1.5.0 or later and needs no extra prerequisites.

How much does TiaLink cost?

¥99/month (includes one month of license), or ¥999/year (includes twelve months of license — ten months' price, saves ¥189). Both are self-serve; per-seat, floating and offline deployments are quoted separately.

Can I try it before paying?

No self-serve trial. A license is bound to one machine; in read-only mode the agent can still read a project, but the project context graph is not built. Talk to support for an evaluation license.

How many machines can one license cover, and what happens when the license expires?

One license, one machine (machine-code → .lic, works offline); moving to another machine requires re-issuing. When the license expires it drops back to read-only: the agent can still connect, browse the project tree, read block sources and interfaces, and read the hardware configuration. Creating blocks, building the project context graph, modifying programs, configuring hardware, compiling and downloading are blocked; renewing restores them. Your project itself is never locked.

How do I know an AI change didn't break the project?

Verification happens before writing: dry-run, compile and collect the error list, run in S7-PLCSIM Advanced (or the cloud simulator), then read back variables and project model. All four must pass.

Why does ladder generation go through LadDoc instead of raw XML?

Because it is auditable: the LadDoc contract ships with TiaLink, so the agent writes a structured document instead of guessing at XML — the same LadDoc always produces the same ladder block, diffable and versionable — and it must pass D9 rule validation plus a TIA Portal compile before it enters your project.

Cloud simulator vs PLCSIM Advanced?

Unit-test style verification (scenario suites, parameter sweeps, seed-based fuzzing, invariants → PASS/FAIL report, no TIA Portal needed) runs on the cloud simulator; machine-level, communication and hardware behaviour still needs PLCSIM Advanced.

Is TiaLink a TIA Portal AI tool?

It is the execution layer such tools need. TiaLink exposes TIA Portal operations as MCP tools, so any MCP client — Claude Code, Codex, Cursor, your own agent — can read a project, change it, compile, download to S7-PLCSIM Advanced and read values back. The model still writes the code; TiaLink is what lets it act on the project and prove the result.

Product page (中文) Documentation & examples LadDoc (ladder generation) Install guide MCP listing

See it on your own project

TiaLink runs next to your TIA Portal, needs no cloud account, and the read path works before you buy a licence. Start with the product page for requirements, licensing and download.