OPC UA MCP Server logo

OPC UA MCP Server

Read, write, browse, search, and subscribe to live OPC-UA data through MCP over stdio or HTTP.

Install OPC UA MCP Server

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
https://xyz.trycloudflare.com/mcp

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Overview

OPC-UA MCP Server MCP server connects AI clients to an OPC-UA industrial automation server for reading, writing, browsing, searching, and monitoring live node data. It exposes MCP tools and resources over stdio or HTTP, with explicit connection management in stdio mode and eager connection at HTTP startup. Persistent bbolt storage supports cached reads, browse results, type information, and subscriptions, while Bleve indexes the address space for name-based and fuzzy searches. Reach for it when an agent needs controlled access to OPC-UA nodes, metadata, subscriptions, or address-space discovery.

Use cases

  • Read live values from OPC-UA nodes
  • Write validated values to industrial devices
  • Browse an OPC-UA address space by hierarchy
  • Search nodes by browse name
  • Monitor nodes with persistent subscriptions

Key features

  • OPC-UA reads and type-checked writes
  • Hierarchical and recursive node browsing
  • Fuzzy browse-name search with Bleve
  • Persistent caching with bbolt
  • Reconnectable live subscriptions
  • stdio and HTTP MCP transports

Tools16

What OPC UA MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~336 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Tools exposed16Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How OPC UA MCP Server works

What OPC-UA MCP Server MCP server does

OPC-UA MCP Server MCP server gives an MCP client access to an OPC-UA server's address space and live values. Agents can read one or more nodes, write values after type validation, inspect node metadata, browse child nodes, and recursively explore the hierarchy. Name-based lookup and fuzzy matching are available through a background discovery process and its search index.

The server also supports push subscriptions. An agent can subscribe to one or more nodes at a selected interval, list active subscriptions, or cancel them by subscription ID or node. Subscriptions are persisted and re-established after reconnects. MCP resources expose individual nodes through opcua://node/{node_id} and expose server information through opcua://server.

How it works

The process communicates with MCP clients through stdio by default or through HTTP when SERVER_TRANSPORT=http is selected. In stdio mode, the OPC-UA connection is opened when the client invokes opcua_connect; HTTP mode connects during startup. opcua_disconnect provides explicit connection control where needed.

Read-through caching stores read results, browse results, and type information on disk using bbolt. Cached values can reduce repeated device requests, and writes invalidate affected cache entries. Subscribed values are served from the live cache. Discovery periodically crawls the configured address-space root, then stores browse names in a Bleve index for partial and fuzzy searches.

Setup and configuration

Build the executable with Go 1.26 or newer:

bash
go build -o opcua-mcp ./cmd/opcua-mcp.go
./opcua-mcp

Set OPCUA_ENDPOINT to point at an OPC-UA server; the default is opc.tcp://localhost:4840. For HTTP transport, set SERVER_TRANSPORT=http; the default HTTP port is 8080 and the MCP path is /mcp. Docker is optional and can be used with the repository's bundled test-server deployment.

Configuration may come from an optional YAML, TOML, JSON, or other Viper-supported file. Environment variables take precedence. Authentication supports anonymous access, username and password, or a client certificate. Security policy, security mode, request and session timeouts, retry behavior, discovery depth, search limits, cache settings, and the bbolt database path are configurable.

Tools and capabilities

Core tools include opcua_read, opcua_write, opcua_get_value, opcua_get_value_by_name, opcua_browse, opcua_browse_nodes, and opcua_node_info. Search and discovery tools include opcua_find_similar_nodes, opcua_discovery_stats, and opcua_force_discovery. Subscription tools manage updates with opcua_subscribe, opcua_unsubscribe, and opcua_list_subscriptions.

opcua_server_info reports server metadata. opcua_debug_search and opcua_ensure_server_nodes help investigate discovery and search issues. The OPC-UA MCP Server MCP server validates write types before sending values to the device.

Limitations and notes

The server depends on the target OPC-UA endpoint and its configured authentication and security settings. Discovery and search depend on the configured crawl root, depth, node limits, and enabled flags. The on-disk store must be writable when caching and subscription persistence are needed.

If the bbolt store cannot open, the server continues with caching disabled, while subscription tools return errors; other tools remain available. In stdio mode, logs are forced to stderr when the configured output would otherwise use stdout, because stdout carries the MCP protocol stream.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about OPC UA MCP Server

OPC-UA MCP Server is an MCP server that connects AI clients to OPC-UA industrial automation servers. Its main tools read and write node values, browse and search the address space, inspect metadata, manage live subscriptions, and retrieve server information over stdio or HTTP.

Build it with Go 1.26 or newer using `go build -o opcua-mcp ./cmd/opcua-mcp.go`. Docker is optional for the bundled test server and containerized deployment. Configuration can be supplied with environment variables or an optional Viper-supported configuration file.

Set `OPCUA_ENDPOINT` to the target endpoint, such as `opc.tcp://localhost:4840`. Anonymous, username/password, and certificate authentication are supported. In stdio mode, call `opcua_connect`; with HTTP transport, the server connects at startup.

The repository example uses a public HTTPS tunnel and the server's `/mcp` endpoint.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOPC UA MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/opc-ua-mcp-server?style=directory)](https://allmcps.com/mcp/opc-ua-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/opc-ua-mcp-server"><img src="https://allmcps.com/api/badge/opc-ua-mcp-server?style=directory" alt="OPC UA MCP Server on AllMCPs" /></a>