Skip to main content
Glama

opcua-mcp

OPC UA MCP 服务器

连接到支持 OPC UA 的工业系统的 MCP 服务器,允许 AI 代理实时监控、分析和控制操作数据。

该项目非常适合希望将人工智能驱动的工作流程与工业自动化系统相结合的开发人员和工程师。

GitHub 许可证Python 版本地位

特征

  • 读取 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 写入节点。

安装

先决条件

  • 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文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

连接到支持 OPC UA 的工业自动化系统的 MCP 服务器。

  1. 特征
    1. 工具
    2. 示例提示
  2. 安装
    1. 先决条件
    2. 安装依赖项
    3. MCP 客户端配置
  3. 执照

    Related MCP Servers

    • A
      security
      A
      license
      A
      quality
      An MCP server to run commands.
      Last updated -
      2
      265
      150
      TypeScript
      MIT License
      • Apple
    • -
      security
      A
      license
      -
      quality
      An MCP server that integrates Arduino-based robotics (ESP32 or Arduino Nano) with AI, allowing control of hardware components like LEDs, motors, servos, and sensors through AI assistants.
      Last updated -
      31
      MIT License
    • -
      security
      F
      license
      -
      quality
      A simple demonstration project for the Model Control Protocol (MCP) server that provides tools for AI assistants to fetch news articles, perform calculations, retrieve weather data, and generate personalized greetings.
      Last updated -
      Python
    • -
      security
      A
      license
      -
      quality
      A FastMCP server that provides network automation tools by exposing Nornir and NAPALM operations as MCP tools, allowing users to manage and interact with network devices through compatible MCP clients.
      Last updated -
      Python
      MIT License

    View all related MCP servers

    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/kukapay/opcua-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server