Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

opcua-mcp

MCP.Pizza Chef: kukapay

opcua-mcp is an MCP server that interfaces with OPC UA-enabled industrial systems, enabling AI agents to monitor, analyze, and control operational data in real time. It supports reading and writing OPC UA nodes, facilitating seamless integration of AI-driven workflows with industrial automation. Ideal for developers and engineers, it bridges AI models with industrial device data for enhanced automation and decision-making.

Use This MCP server To

Monitor real-time sensor data from industrial OPC UA devices Control industrial equipment by writing commands to OPC UA nodes Integrate AI agents with industrial automation systems Enable natural language queries on industrial operational data Automate industrial process monitoring and alerts Bridge AI workflows with factory floor device data Analyze machine status and performance via OPC UA data Trigger automated responses based on OPC UA node changes

README

OPC UA MCP Server

An MCP server that connects to OPC UA-enabled industrial systems, allowing AI agents to monitor, analyze, and control operational data in real time.

This project is ideal for developers and engineers looking to bridge AI-driven workflows with industrial automation systems.

GitHub License Python Version Status

Features

  • Read OPC UA Nodes: Retrieve real-time values from industrial devices.
  • Write to OPC UA Nodes: Control devices by writing values to specified nodes.
  • Seamless Integration: Works with MCP clients like Claude Desktop for natural language interaction.

Tools

The server exposes two tools:

  • read_opcua_node:

    • Description: Read the value of a specific OPC UA node.
    • Parameters:
      • node_id (str): OPC UA node ID (e.g., ns=2;i=2).
    • Returns: A string with the node ID and its value (e.g., "Node ns=2;i=2 value: 42").
  • write_opcua_node:

    • Description: Write a value to a specific OPC UA node.
    • Parameters:
      • node_id (str): OPC UA node ID (e.g., ns=2;i=3).
      • value (str): Value to write (converted based on node type).
    • Returns: A success or error message (e.g., "Successfully wrote 100 to node ns=2;i=3").

Example Prompts

  • "What’s the value of node ns=2;i=2?" → Returns the current value.
  • "Set node ns=2;i=3 to 100." → Writes 100 to the node.

Installation

Prerequisites

  • Python 3.10 or higher
  • An OPC UA server (e.g., a simulator or real industrial device)

Install Dependencies

Clone the repository and install the required Python packages:

git clone https://github.com/kukapay/opcua-mcp.git
cd opcua-mcp
pip install asyncua mcp[cli]

MCP Client Configuration

{
 "mcpServers": {
   "opcua-mcp": {
     "command": "python",
     "args": ["path/to/opcua_mcp/main.py"],
     "env": {
        "OPCUA_SERVER_URL": "your-opc-ua-server-url"
     }
   }
 }
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

opcua-mcp FAQ

How do I connect opcua-mcp to my OPC UA server?
Configure the opcua-mcp server with your OPC UA endpoint URL and credentials to establish a secure connection.
Can opcua-mcp write data to OPC UA nodes?
Yes, opcua-mcp supports writing values to specified OPC UA nodes to control devices.
Is opcua-mcp compatible with multiple MCP clients?
Yes, it integrates seamlessly with MCP clients like Claude Desktop and others supporting MCP protocol.
What programming languages is opcua-mcp built with?
opcua-mcp is implemented in Python 3.10+, ensuring compatibility with modern Python environments.
How does opcua-mcp handle real-time data updates?
It continuously reads OPC UA node values and exposes them to AI agents for real-time monitoring and analysis.
Is opcua-mcp suitable for industrial automation workflows?
Absolutely, it is designed specifically to bridge AI with industrial automation via OPC UA standards.
What security measures does opcua-mcp support?
opcua-mcp supports secure OPC UA connections including authentication and encrypted communication.
Can I extend opcua-mcp with custom tools?
Yes, developers can add custom MCP tools to extend functionality based on specific industrial needs.