MCP.so
Sign In

OPC UA MCP Server

@midhunxavier

Basic information

Category

Other

Transports

stdio

Author

midhunxavier

About OPC UA MCP Server

Model Context Protocol (MCP) server for OPC UA operations. This server provides a set of tools to interact with OPC UA servers, including reading/writing variables, browsing nodes, calling methods, and performing batch operations.

OPC UA MCP Server config

Add this server to your MCP-compatible client using the configuration below.

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

OPC UA MCP Server tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

Fetch the live tool list by running this server in a temporary sandbox using the button above.

Overview

What is OPC UA MCP Server?

The OPC UA MCP Server provides tools for reading, writing, browsing, and monitoring OPC UA nodes through the Model Context Protocol (MCP). It is available in Python (using FastMCP) and TypeScript/Node.js (using @modelcontextprotocol/sdk) implementations, both offering the same core functionality. It is intended for users who want to query or control industrial automation equipment via natural language interactions with AI assistants like Claude.

How to use OPC UA MCP Server?

Choose either the Python version (opcua-mcp-server, requires Python 3.13+) or the NPX version (opcua-mcp-npx-server, run via npx). Configure the OPC UA server endpoint via the OPCUA_SERVER_URL environment variable (default opc.tcp://localhost:4840). Then set the server in your MCP client configuration (e.g., Claude Desktop) using the provided JSON examples for Python or NPX.

Key features of OPC UA MCP Server

  • Read single or multiple OPC UA nodes with automatic type detection
  • Write single or multiple OPC UA nodes with automatic type conversion
  • Browse children of an OPC UA node
  • Call methods on OPC UA objects
  • Discover all variables in the server address space
  • Automatic connection management and error handling

Use cases of OPC UA MCP Server

  • Read current temperature, pressure, flow rate, or other sensor values from industrial equipment
  • Control equipment by writing to nodes (e.g., start/stop motors, set pump speed, open valves)
  • Execute production operations such as starting a production line or initializing a batch recipe
  • Monitor system state by retrieving alarms, sensor inventories, and energy consumption data

Frequently asked questions

1

What runtime does each version require?

The Python version requires Python 3.13+ and the `opcua` library. The NPX version requires Node.js and uses the `node-opcua` library.

2

How does the server connect to the OPC UA server?

Both versions connect via STDIO transport and use the environment variable `OPCUA_SERVER_URL` (default `opc.tcp://localhost:4840`) to locate the OPC UA server.

3

Is the connection secure?

Currently both versions connect with `SecurityPolicy.None` and `MessageSecurityMode.None`. The README recommends implementing certificate-based authentication, encrypted communication, and user authentication for production use.

4

What tools are provided?

Seven tools: `read_opcua_node`, `write_opcua_node`, `browse_opcua_node_children`, `read_multiple_opcua_nodes`, `write_multiple_opcua_nodes`, `call_opcua_method`, and `get_all_variables`. Parameters and return types are documented for each.

5

Where does the data live?

The server does not store data; it connects to an external OPC UA server to read and write values in real time. No local persistence is mentioned.

Comments

More Other MCP servers