IO

industriagents/opcua-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

36 stars 11 forks 质量 88 趋势 32MIT

通过MCP连接AI代理与OPC UA PLCs,SCADA和工业数据. Python + 节点,默认情况下只读,带有本地模拟器.

概览

——本库中模拟植物船. 正式的MCP登记簿 Glama 硬件MCP 以上每个工具调用和值都是被捆绑的模拟器的真实响应,通过只读观察配置图下的Python桥被记录;问答文字被脚本. 以脚本/readme demo.py来重建. 这个工程是一个AI代理和OPC UA服务器之间的桥梁. OPC UA是用于曝光工业设备及其数据的协议;MCP(模式上下文协议)允许代理调用工具与该数据相配合. 该桥运行在您的计算机上,并连接到现有的OPC UA服务器,或连接到本地模拟器进行第一次测试. 您的 MCP 客户端以本地进程启动桥: 它在标准输入和输出上交换 MCP 消息. 一个进程将一个客户端上下文连接到一个OPC UA端点. 每个终点使用单独的过程。 远程MCP和共享多客户操作通过身份和隔离RFC来入门.

概述(AI 翻译)

** 让Claude、Codex、双子座和任何其他MCP代理读取传感器,浏览工厂,并在允许的情况下,对任何OPC UA服务器进行控制设备。 **

试一试,不用硬件** ——这个寄存器中的模拟植物船

快速启动 ・ 连接您的代理 ・ 工具 ・ 生产 ・ Docs ・ 贡献

正式的MCP登记簿 Glama 硬件MCP

上面的每一个工具呼叫和值 是一个真正的反应 从捆绑模拟器, 在只读 [[T0] 配置图下通过 Python 桥录入; 问答文本为脚本。 重修时用 scripts/readme_demo.py.

这个工程是一个AI代理和OPC UA服务器之间的桥梁. OPC UA为 用于曝光工业设备及其数据的协议; MCP(上下文模型) 协议(Protocol)允许代理呼叫工具与这些数据合作. 桥开通了 您的计算机并连接到现有的 OPC UA 服务器或本地模拟器 第一次测试

您的 MCP 客户端启动桥作为本地的 stdio 进程: 它交换 MCP 超过标准输入和输出的信息。 一个进程连接一个客户端上下文 到一个OPC UA端点。 每个终点使用单独的过程。 远程MCP和

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

See it in action

https://github.com/user-attachments/assets/2e1e9898-d942-41f6-bcc2-88e1a7ef1936

In this 3-minute demo, Claude watches a conveyor running in the free Prosys OPC UA Simulation Server. It reads the live values, checks the conveyor every minute on its own, reports an overheat alarm with a suggested fix, and lowers the speed only after you approve it. When asked for more than the allowed limit, it refuses. Codex connects to the same server with one command.

What it does

📖 Read Browse the plant and read live values, history and events. Every value comes with its data type, quality, timestamps and unit (example).
👀 Monitor Subscribe to values and events. The agent collects every change since it last looked.
🚨 Alarms List active alarms and, when you allow it, acknowledge them.
🎛️ Control Write setpoints and call methods, but only on targets you allowlist, within the limits you set, with every call written to an audit log.
  • Any OPC UA server: PLC, SCADA gateway, historian or simulator. Nothing to install on the plant side.
  • Any MCP agent: Claude Code, Claude Desktop, Codex, Gemini CLI, Antigravity, Cursor, VS Code, Windsurf and more.
  • Node or Python: two runtimes with the same tools. Use whichever you have.
  • Read-only by default: control needs an explicit profile and a secured, verified connection.
flowchart LR
在 GitHub 查看完整 README

安装

uvx opcua-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "opcua": { "command": "npx", "args": ["-y", "opcua-mcp-server"], "env": { "OPCUA_SERVER_URL": "opc.tcp://localhost:4840/freeopcua/server/" } } } }