TIA-Portal MCP-Server
Enables connection to Siemens TIA Portal instances to browse project structures, export PLC software blocks and types, and perform project operations such as compilation directly through the MCP interface.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
TIA Portal MCP-Server

A Visual Studio Code extension to connect to Siemens TIA Portal and interact with TIA Portal projects directly from VS Code with GitHub Copilot.
Requirements
Siemens TIA Portal V21 installed and running on your machine
Siemens.Openness installed
net Framework 4.8 installed
Visual Studio Code installed
GitHub Copilot in Visual Studio Code installed and configured (check:
Chat > Mcp: Enabled)
Related MCP server: Genius Automation MCP Server
Chat
The chat allows you to interact with TIA Portal using natural language commands. You can instruct it to perform tasks such as connecting to a project, exporting PLC programs, modifying files, and importing changes back into TIA Portal. The chat works in conjunction with the tia porcelain commands for streamlined workflows.
Chat Examples using natural language
Do the following steps:
- Connect to tia portal
- export plc program
- ... modify files ...
- Give me preview which modified files would be imported to plc program
- Get project tree and save output to project-tree.txt
- Get software tree and save output to software-tree.txt
- Import plc program changes
- Close the project
- Disconnect from tia portalDo the following steps:
- Connect to tia portal
- Give me the structure of the project and save output to project-structure.txt
- Give me the software structure and save output to software-structure.txt
- Close the project
- Disconnect from tia portalDo the following steps:
- Connect to tia portal
- Compile plc software
- Close the project
- Disconnect from tia portaltia porcelain commands: connect, pull and push
Short tools for the chat that work like the git commands they are named after. They sit on top of the tools above:
connect attaches to TIA Portal and opens the project, pull brings TIA Portal into the export folder, push
brings the changed files of that folder into TIA Portal.
Type the command in the chat, e.g. tia pull blocks ".+HMI", or pick the tool or the prompt of the same name.
You say | Tool | Same as |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TiaConnectconnects to the running TIA Portal (or starts one), opens the.apXXproject or.alsXXsession and returns the PLC software paths to use assoftwarePath.pathtakes the preset of--project-path; passportalIdwhen several instances run. It closes the project that is open first, unless it is the one asked for.The pull tools write the tree of
ExportPlcProgram, each object in the format of<exportPath>/tia.json, so a pull of blocks and a pull of the whole program land in the same folders.TiaPullTagTableswrites one XML file per tag table below<exportPath>/<softwarePath>/PLC tags/<groups>/,TiaPullWatchTablesone per watch table below the watch and force tables folder; both have one format only.The optional regular expression (
regexName) selects objects by name, e.g..+HMI.TiaPullBlockswrites no types andTiaPullTypesno blocks.The push tools are the import tools under another name and need
--allow-write.TiaPushshows the same confirmation dialog ("Yes, import") andTiaPushPreviewimports nothing. They read only the files git reports as changed, and not the tag or watch tables; there is no tool that imports tag tables.softwarePathandexportPathtake the presets from--software-pathand--export-path.
Prompts using the tia commands (see "tia porcelain commands" above; with the presets from the json config
file softwarePath and exportPath can be left out):
'tia connect'
'tia pull'
'tia pull blocks'
'tia pull blocks ".+HMI_.+"'
'tia pull types'
'tia pull tagtables'
'tia pull watchtables'
'tia pull block Group1/Subgroup/FB_Motor'
'tia pull type Group1/Udt_Drive'
'tia pull tagtable TagGroup1/Table1'
'tia pull watchtable WatchGroup1/WatchTable_1'
'tia pull forcetable ForceTable'
'tia push preview'
'tia push'
'save project'
MCP-Server
Refer to tiaportal-mcp
Features
Connect to a TIA Portal instance
Browse and interact with TIA Portal projects
Perform basic project operations from within VS Code
Requirements
.net Framework 4.8 installed
Siemens TIA Portal V20 installed and running on your machine
Check if under
Environment Variables/User variable for user <name>the variableTiaPortalLocationis set toC:\Program Files\Siemens\Automation\Portal V20. Details on nuget.org - Siemens.Collaboration.Net.TiaPortal.Openness.ResolverUser must be in Windows User Group
Siemens TIA Openness. Details on TIA Portal Openness - Adding Users to the Siemens TIA Openness User Group
Usage
Project configuration
The extension only writes project-scoped files in the first workspace folder. User-level files (for example the VS Code user mcp.json or claude_desktop_config.json) are never touched.
Client | File in the workspace folder | Format and key |
GitHub Copilot |
| JSON, |
Anthropic Claude (Claude Code) |
| JSON, |
Cursor |
| JSON, |
OpenAI Codex |
| TOML, |
These are the clients that run in VS Code or a VS Code fork, where this extension can be installed: GitHub Copilot, the Claude Code extension, Cursor and the Codex IDE extension. Cursor installs extensions from Open VSX, so this extension has to be installed there from the .vsix file unless it is published on Open VSX.
Notes on single clients:
Only GitHub Copilot expands
${workspaceFolder}. For GitHub Copilot the export path is written exactly as you enter it. For Anthropic Claude, Cursor and OpenAI Codex${workspaceFolder}is replaced by the absolute path of the workspace folder, because these clients pass it to the server unchanged. Relative and absolute paths are written as entered for all clients; prefer an absolute path, since a relative one depends on the working directory the client starts the server in.When you run the command again, the arguments of the first existing entry are offered as defaults. If that is a non-Copilot file, the export path is already absolute.
Claude Code asks for approval the first time it sees a project-scoped server. Codex only loads
.codex\config.tomlfor trusted projects.
Add server
After installation restart VS Code.
Run the command
TIA Portal: Add MCP Server Configurationand tick the clients (checkboxes) you want to configure, then pressEnter. The questions are asked once and the files of all ticked clients are written.Before the list is shown, the extension looks at the config files of all clients. Clients that already contain the server entry are ticked and marked
(already configured)(inRemoveas well), and the arguments of the first entry found are the default answers of the questions, even if you tick a different client. A file that cannot be parsed is ignored at this point and reported when you select its client.Arguments the existing entry does not have are taken from the
argssection (project,software-path,export-path) of<export path>/tia.json, if that file exists (tia initof the server writes it). It is looked up in the export path of the existing entry, otherwise in${workspaceFolder}\Project. A value of the existing entry always wins, and a file that is missing or invalid is ignored.Answer the prompts (press
Escto cancel, nothing is written then). Values from an existing entry, or else fromtia.json, are offered as defaults:TIA Portal major version (
--tia-major-version)Project or session file (
--project-path)PLC software path (
--software-path), e.g.PC-System_1/Software PLC_1Export path (
--export-path), default${workspaceFolder}\Project(kept for GitHub Copilot, resolved to the absolute folder for the other clients)Preserve path structure (
--preserve-path)Allow write access to the project (
--allow-write), defaultNo. The flag is only written if you answerYes.
Check the written file (GitHub Copilot example below). Other servers and settings in the file are kept.
<user>: Your Windows username<version>: The version of the extension you have installed.
{ "servers": { "vscode-tiaportal-mcp": { "type": "stdio", "command": "c:\\Users\\<user>\\.vscode\\extensions\\jheilingbrunner.vscode-tiaportal-mcp-<version>\\srv\\net48\\TiaMcpServer.exe", "args": [ "--tia-major-version", "21", "--project-path", "D:\\Siemens\\Projects\\MyProject\\MyProject.ap21", "--software-path", "PC-System_1/Software PLC_1", "--export-path", "${workspaceFolder}\\Project", "--preserve-path", "--allow-write" ], "env": {} } } }The Anthropic Claude and Cursor entries look the same under
"mcpServers"(Cursor has no"type"field), but with an absolute--export-pathsuch as"E:\\Work\\MyWorkspace\\Project".Comments and trailing commas in the JSON files, and comments in
config.toml, are allowed and are kept when the entry is added, updated or removed. If a file is not valid JSON or TOML the command stops with an error instead of overwriting it.
Use the server
GitHub Copilot: open GitHub Copilot, switch to
Agentmode, check the tools bySelect Toolsand start to chat with TIA Portal.Anthropic Claude: start Claude Code in the workspace folder and approve the project-scoped server
vscode-tiaportal-mcpwhen asked (check with/mcp).Other clients: open the workspace folder in the tool; see its own MCP documentation for listing and enabling servers.
Remove server
Run the command
TIA Portal: Remove MCP Server Configurationand tick the clients (checkboxes) to remove the mcp server entry from their config files. The files of clients that are not ticked are not touched.
tia.json: the export formats of TIA Portal
TIA Portal exports each kind of object in the format set under Options > Settings > Version control interface >
Export formats: SIMATIC SD documents (.s7dcl, .s7res), SimaticML (.xml) or a source file. Openness cannot
read that setting (the settings tree it offers has no export formats), so the server keeps the formats in a plain,
visible file at the root of the export folder:
<exportPath>/tia.jsonIt is one file for all PLCs below <exportPath>, because the setting is global. It is meant to be kept and committed
together with the export, so everyone who works with the folder uses the same formats.
You normally do not write it. The first time a tool needs it and it does not exist, the server creates it with the defaults TIA Portal offers for a new workspace:
{
"version control interface": {
"code blocks-LAD": "SIMATIC SD(.s7dcl, .s7res)",
"code blocks-FBD": "SIMATIC SD(.s7dcl, .s7res)",
"code blocks-SCL": "SIMATIC SD(.s7dcl, .s7res)",
"code blocks-STL": ".awl",
"data blocks": "SIMATIC SD(.s7dcl, .s7res)",
"safety data blocks (F-DBs)": "SIMATIC SD(.s7dcl, .s7res)",
"PLC data types": "SIMATIC SD(.s7dcl, .s7res)",
"F-compliant PLC data types (UDT)": "SIMATIC SD(.s7dcl, .s7res)"
}
}Available file formats per object type; the first one listed is the default of a new file:
Key | Available formats |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceMCP server that connects AI assistants to Siemens TIA Portal via the Openness API. AI-assisted PLC programming, project management, hardware configuration, cross-reference analysis, and deployment. 19 tools, 230 actions.55-
- AlicenseNot gradedqualityDmaintenanceAn MCP server for controlling Siemens TIA Portal, enabling AI agents to connect, read PLC tags, list blocks, inspect project structure, and compile projects. This community edition provides 5 read-only tools under the MIT license.MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP bridge for Siemens TIA Portal that enables AI assistants to inspect PLC projects, import/export programs, and compile with read-only defaults and opt-in writes.-
- AlicenseNot gradedqualityAmaintenanceIt lets any MCP-capable AI agent operate a real Siemens TIA Portal project — configuring hardware and networks, creating blocks, writing SCL, compiling, simulating via PLCSIM Advanced, and reading results back for verification. It runs locally alongside TIA Portal through Openness, so agents work with live projects rather than code snippets.273 npm3MIT