opcua-twin-gateway
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@opcua-twin-gatewayRead the current temperature of injection molding machine IM-01"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
opcua-twin-gateway
数字管道的建筑师 · 第六块积木:把标准 OPC UA 工业协议接入 MCP 生态 前五块:workflow-templates / digital-twin-mcp / factory-twin-viz / workflow-mcp / pdf2voice
OPC UA(IEC 62541)是工业 4.0 的事实标准协议。本项目用真实 OPC UA 协议(asyncua)搭了一条完整的"模拟 PLC → 标准协议 → MCP 工具"数据管道:
[OPC UA 模拟服务器] ──OPC UA 协议──▶ [opcua-twin-gateway MCP] ──MCP──▶ [WorkBuddy / Claude Desktop / Cursor]为什么真实协议:digital-twin-mcp 用的是"模拟 PLC 接口",而本项目直接走 OPC UA 标准—— 换掉
ots_server.py指向任何真实 OPC UA 服务器(西门子/倍福/OPC UA 网关),网关零改动。
组件
文件 | 作用 |
| OPC UA 工厂模拟服务器:6 台设备、随机游走漂移、节点可写 |
| MCP Server:asyncua Client 通过标准协议读写节点 |
| 直连演示:不经过 MCP,用原生 OPC UA 协议读数据 |
Related MCP server: OPC UA MCP Server
MCP 工具
工具 | 说明 |
| 列出全部设备节点(设备/指标/node_id/是否可写) |
| 读单个节点实时值 |
| 读全量快照(类比 digital-twin-mcp 的 get_scene_snapshot) |
| 写入控制值(仅可写节点,为控制闭环铺路) |
快速开始
pip install -r requirements.txt # asyncua + fastmcp
# 终端 1:启动 OPC UA 模拟服务器
python ots_server.py
# 终端 2:原生 OPC UA 直连演示(不经过 MCP)
python demo_client.py
python demo_client.py im-01 temperature
python demo_client.py --write im-01 temperature 300
# 终端 2:MCP 自检(进程内)
python examples/check_gateway.py
# MCP Server(stdio,供 WorkBuddy 等客户端接入)
python gateway.py与 digital-twin-mcp 的衔接
digital-twin-mcp 的 BasePLCDriver 是模拟驱动;本项目的 gateway.py 是真实 OPC UA 驱动的实现示例。
把网关的 read_all() 输出映射到 digital-twin-mcp 的 get_scene_snapshot 格式,
factory-twin-viz 就能直接渲染真实协议数据——模拟与真实协议平滑切换。
接入 WorkBuddy
合并 examples/workbuddy_mcp.json 到 ~/.workbuddy/mcp.json,在连接器管理页「信任」后,
对话中可直接说"读一下注塑机温度"。
许可
MIT License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
One connector URL giving any MCP client live access to 21 services and 51 tools.
An MCP server that provides access to Testiny projects, test cases and test runs
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects to OPC UA-enabled industrial automation systems.28MIT
- AlicenseNot gradedqualityDmaintenanceConnects to any OPC UA server and exposes its node tree and data via MCP, with tools to read values and search nodes.5MIT
- AlicenseNot gradedqualityDmaintenanceAn open-source MCP server that bridges AI models with industrial equipment, supporting multiple protocols like Modbus, OPC UA, and MQTT for reading data and controlling machines.2Apache 2.0
- FlicenseBqualityBmaintenanceUniversal MCP server for industrial PLC communication, enabling AI agents to read sensors, alarms, status, setpoints, and write setpoints via adapters for Modbus, S7, or custom PLCs.6
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xici001/opcua-twin-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server