Skip to main content
MCP server CX Codex

OPC UA MCP Server — Claude Code MCP server

This MCP server for Claude Code connects an AI agent to an OPC UA server. It exposes equipment nodes, live values and historical readings to the agent.

MIT ★ 36 updated 2026-11-15

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add opcua -e OPCUA_SERVER_URL=<OPCUA_SERVER_URL> -e OPCUA_CLIENT_KEY=<OPCUA_CLIENT_KEY> -e OPCUA_PASSWORD=<OPCUA_PASSWORD> -e OPCUA_USER_KEY=<OPCUA_USER_KEY> -e OPCUA_PROFILE=<OPCUA_PROFILE> -e OPCUA_AUDIT_CHAIN_KEY_FILE=<OPCUA_AUDIT_CHAIN_KEY_FILE> -- npx -y opcua-mcp-server
Open on GitHub

What OPC UA MCP Server does

The server relays agent requests to an OPC UA system and returns its data. Its tools cover node browsing, value and history reads, change subscriptions, events and alarms; writing values and calling methods are also supported.

The observe profile is read-only by default. Control actions require a separate profile and an authenticated OPC UA server, and each such call is audited. A process handles one OPC UA endpoint, so separate endpoints need separate processes.

The Node route requires Node.js 22.13+ with npm/npx. The Python route needs Python 3.10+ and uv. An accessible OPC UA server and its address in OPCUA_SERVER_URL are also required.

What it helps with

  • browse an OPC UA node tree
  • read current sensor values
  • retrieve value history and aggregates
  • track value changes through subscriptions
  • send writes or method calls under a control profile

Example prompts for the agent

  • Browse the OPC UA server and read the sensor values.
  • Get the history for the specified node.
  • Subscribe to changes and list the available events and alarms.

How to install OPC UA MCP Server

Platform CLI

claude mcp add opcua -e OPCUA_SERVER_URL=<OPCUA_SERVER_URL> -e OPCUA_CLIENT_KEY=<OPCUA_CLIENT_KEY> -e OPCUA_PASSWORD=<OPCUA_PASSWORD> -e OPCUA_USER_KEY=<OPCUA_USER_KEY> -e OPCUA_PROFILE=<OPCUA_PROFILE> -e OPCUA_AUDIT_CHAIN_KEY_FILE=<OPCUA_AUDIT_CHAIN_KEY_FILE> -- npx -y opcua-mcp-server

Replace <…> with your own values. 27 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about OPC UA MCP Server

How do I install OPC UA MCP Server in Claude Code?

Run `claude mcp add opcua -e OPCUA_SERVER_URL=<OPCUA_SERVER_URL> -e OPCUA_CLIENT_KEY=<OPCUA_CLIENT_KEY> -e OPCUA_PASSWORD=<OPCUA_PASSWORD> -e OPCUA_USER_KEY=<OPCUA_USER_KEY> -e OPCUA_PROFILE=<OPCUA_PROFILE> -e OPCUA_AUDIT_CHAIN_KEY_FILE=<OPCUA_AUDIT_CHAIN_KEY_FILE> -- npx -y opcua-mcp-server. Set OPCUA_SERVER_URL` to the server address.

What does OPC UA MCP Server do?

It connects an AI agent to an OPC UA server. The agent can browse nodes, read current and historical data, receive events, and use control operations when a control profile is configured.

What does OPC UA MCP Server need to run?

It needs an accessible OPC UA server and its address in OPCUA_SERVER_URL. The Node setup requires Node.js 22.13+ and npm/npx; the Python setup requires Python 3.10+ and uv.

Similar MCP servers

MCP servers catalog →
OPC-UA MCP Server mwieczorkiewicz Lets an agent read, write, and subscribe to live OPC-UA data. It connects over stdio or HTTP to industrial automation servers. CX Codex +1 ★ 7repo stars opc-architecture parcadei opc-architecture provides Claude Code with an architectural overview of Orchestrated Parallel Claude, detailing hooks, child processes, and PostgreSQL state sharing. CX Codex +1 ★ 3,951repo stars Context7 upstash Context7 brings current, version-aware library docs and code examples into an AI coding agent. Use it when generated answers rely on stale or invented APIs. CX Codex +1 5,563installs Search Google Flights punitarani The Search Google Flights MCP server looks up flights on a chosen date or scans a date range to find the cheapest days to fly. CX Codex +1 2,595installs Math-MCP EthanHenrickson Math-MCP provides arithmetic, statistical, and trigonometric operations for language models. Useful when you need reliable calculations without hallucinations. CX Codex +1 5,958installs pipeworx gateway pipeworx pipeworx gateway connects AI agents to 250+ live data sources without API keys, covering SEC filings, economic metrics, and weather. Includes cross-session memory. CX Codex +1 419,019installs SparkForge henry-ships SparkForge — an MCP server with tools for screenshots, page scraping, OCR and format conversion. It also generates images and looks up crypto data. CX Codex +1 219,896installs OpenWebSearch aas-ee The OpenWebSearch MCP server searches several engines and retrieves page content. It fits agent workflows that need current web data without API keys. CX Codex +1 494installs

Project sponsors

Companies that keep this analytics open