MCP Directory

How to add OPC UA MCP Server to Claude Desktop

Connect AI agents to OPC UA industrial systems to monitor, analyze, and control operational data in real time. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 27โ˜… ยท stdio ยท no auth

Claude Desktop config for OPC UA MCP Server

git clone https://github.com/kukapay/opcua-mcp.git && cd opcua-mcp && pip install mcp[cli] opcua cryptography
{
  "mcpServers": {
    "opc-ua-mcp-server": {
      "command": "python",
      "args": [
        "path/to/opcua_mcp/main.py"
      ],
      "env": {
        "OPCUA_SERVER_URL": "your-opc-ua-server-url"
      }
    }
  }
}

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the OPC UA MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm OPC UA MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • Python 3.13 or higher
  • An OPC UA server (a simulator or a real industrial device)
  • OPCUA_SERVER_URL environment variable pointing to the target OPC UA server

What OPC UA MCP Server can do in Claude Desktop

read_opcua_node

Read the value of a specific OPC UA node. Takes a node_id (e.g. ns=2;i=2) and returns a string with the node ID and its value (e.g. 'Node ns=2;i=2 value: 42').

write_opcua_node

Write a value to a specific OPC UA node. Takes a node_id (e.g. ns=2;i=3) and a value (converted based on node type), and returns a success or error message (e.g. 'Successfully wrote 100 to node ns=2;i=3').

browse_nodes

Browse the OPC UA address space, listing the available nodes on the connected server.

read_multiple_opcua_nodes

Retrieve real-time values from multiple OPC UA nodes in a single batch read.

write_multiple_opcua_nodes

Write values to multiple OPC UA nodes in a single batch operation to control several devices at once.

Security

The server can write values to OPC UA nodes, which controls live industrial devices. Restrict the OPCUA_SERVER_URL to trusted/isolated networks and review write operations carefully, as incorrect values can affect physical equipment. The README's example configuration connects without authentication or encryption; use OPC UA security (user credentials and certificates) for production deployments.

OPC UA MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the OPC UA MCP Server config there under the "mcpServers" key and restart the client.

Is OPC UA MCP Server safe to use with Claude Desktop?

The server can write values to OPC UA nodes, which controls live industrial devices. Restrict the OPCUA_SERVER_URL to trusted/isolated networks and review write operations carefully, as incorrect values can affect physical equipment. The README's example configuration connects without authentication or encryption; use OPC UA security (user credentials and certificates) for production deployments.

What is OPC UA?

OPC UA (Open Platform Communications Unified Architecture) is a standardized machine-to-machine communication protocol widely used in industrial automation to read and write data from PLCs, sensors, and other devices.

How do I point the server at my OPC UA system?

Set the OPCUA_SERVER_URL environment variable in the MCP client configuration to your OPC UA server's endpoint URL.

Can it control physical equipment?

Yes. The write tools send values to OPC UA nodes, which can change setpoints and control live industrial devices, so write operations should be reviewed carefully.

View repo Full OPC UA MCP Server page