gangsterke/MCP-server-for-Tia-Portal
If you are the rightful owner of MCP-server-for-Tia-Portal and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This document provides a structured summary of a Model Context Protocol (MCP) server designed for Tia Portal, focusing on exporting OPC UA nodeset files using Openness.
MCP-server-for-Tia-Portal
Made a MCP server for Tia Portal. Was looking for a way to export OPC UA nodeset files using Tia Portal Openness.
Project Management: Open and close TIA Portal projects PLC Discovery: List all PLC devices in a project Block Operations: List, read, and export program blocks (OB, FC, FB, DB) Tag Management: Access and search PLC tag tables Hardware Configuration: Retrieve device topology and configuration OPC UA Support: Access and export OPC UA server interfaces Project Information: Get detailed project metadata
Available Actions
- Open Project. Opens a TIA Portal project file.
- Close Project. Closes the currently open project.
- List PLCs: Lists all PLC devices in the open project.
- List Blocks: Lists program blocks for a specific PLC.
- Get Block Code: Retrieves information about a specific block.
- Export Block: Exports a block to XML format.
- Get Tag Table: Retrieves the PLC tag table (global variables).
- Search Tag: Searches for tags by name across the project.
- Get Hardware Config:Retrieves hardware configuration and device topology.
- Get Project Info: Gets general information about the currently open project.
- Export OPC UA Interface: Exports the OPC UA server interface configuration to XML.
- Get OPC UA Interface Info: Gets information about the OPC UA server interface configuration.
Limitations
Only one project can be open at a time The server runs in "WithoutUserInterface" mode, so no TIA Portal GUI is shown Some operations may require specific TIA Portal versions or licenses OPC UA functionality requires the PLC to have OPC UA configured
Claude Desktop settings for MCP server
Security Considerations
This server provides full access to TIA Portal projects Ensure proper access controls are in place Do not expose this server to untrusted networks Validate all file paths to prevent directory traversal attacks Consider running in a sandboxed environment
Troubleshooting
"No project is open" error Make sure to call OpenProject before attempting other operations.
"PLC not found" error Verify the PLC name matches exactly (case-sensitive). Use ListPLCs to see available PLCs.
OPC UA errors Ensure OPC UA is configured in the TIA Portal project Check that the correct TIA Portal Openness assemblies are referenced Verify the PLC supports OPC UA functionality