opcua-mcp
OPC UA MCP 服务器
连接到支持 OPC UA 的工业系统的 MCP 服务器,允许 AI 代理实时监控、分析和控制操作数据。
该项目非常适合希望将人工智能驱动的工作流程与工业自动化系统相结合的开发人员和工程师。
特征
读取 OPC UA 节点:从工业设备检索实时值。
写入 OPC UA 节点:通过将值写入指定节点来控制设备。
无缝集成:与 Claude Desktop 等 MCP 客户端协作实现自然语言交互。
工具
该服务器公开了两个工具:
read_opcua_node:描述:读取特定 OPC UA 节点的值。
参数:
node_id(str):OPC UA 节点 ID(例如,ns=2;i=2)。
返回:包含节点 ID 及其值的字符串(例如,“Node ns=2;i=2 value: 42”)。
write_opcua_node:描述:将值写入特定的 OPC UA 节点。
参数:
node_id(str):OPC UA 节点 ID(例如,ns=2;i=3)。value(str):要写入的值(根据节点类型转换)。
返回:成功或错误消息(例如,“成功将 100 写入节点 ns=2;i=3”)。
示例提示
“节点 ns=2;i=2 的值是多少?” → 返回当前值。
“将节点 ns=2;i=3 设置为 100。”→ 将 100 写入节点。
Related MCP server: OPC UA MCP Server
安装
先决条件
Python 3.10 或更高版本
OPC UA 服务器(例如,模拟器或真实工业设备)
安装依赖项
克隆存储库并安装所需的 Python 包:
git clone https://github.com/kukapay/opcua-mcp.git
cd opcua-mcp
pip install asyncua mcp[cli]MCP 客户端配置
{
"mcpServers": {
"opcua-mcp": {
"command": "python",
"args": ["path/to/opcua_mcp/main.py"],
"env": {
"OPCUA_SERVER_URL": "your-opc-ua-server-url"
}
}
}
}执照
本项目遵循 MIT 许可证。详情请参阅LICENSE文件。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server giving access to Grafana dashboards, data and more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that standardizes and contextualizes industrial Modbus data.26MIT
- 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
- AlicenseAqualityNot gradedmaintenanceMCP server that unifies real-time telemetry from industrial systems into a single queryable interface, enabling production visibility, anomaly detection, and operational insights.56 npmMIT