MCP Directory

How to add OPC UA MCP Server to Cursor

Connect AI agents to OPC UA industrial systems to monitor, analyze, and control operational data in real time. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 27 · stdio · no auth

Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the OPC UA MCP Server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of OPC UA MCP Server's tools to confirm it's connected.

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 Cursor

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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.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 Cursor?

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