opc.tcp
opc.tcp:// is the URL scheme of OPC UA's native transport, profile uatcp-uasc-uabinary: UA Binary messages inside a UA Secure Conversation channel on a raw TCP socket, default port 4840. It supports all three security modes, it is the fastest mapping, and it is the only one every OPC UA product implements.
What the protocol looks like
The client sends HEL with its buffer sizes, maximum message size and maximum chunk count; the server answers ACK with the values it will accept - the lower of each. Then OPN opens the secure channel, MSG carries service calls, CLO closes it. Messages larger than the negotiated buffer are split into chunks, and exceeding the agreed limits produces BadTcpMessageTooLarge, BadEncodingLimitsExceeded or BadResponseTooLarge.
Why it beats the HTTP-based mappings
One long-lived socket, binary encoding, and a UA Secure Conversation channel that provides signing and encryption independently of TLS. The JSON and OpenAPI profiles have no UA secure channel at all and are advertised with MessageSecurityMode None, relying entirely on TLS. For machine-to-machine industrial traffic opc.tcp is both the more efficient and the more securable option, and the one to standardise on.
URL anatomy
opc.tcp://host:port/path - and the path is part of endpoint identity, not decoration. Omitting a path the server expects returns BadTcpEndpointUrlInvalid, which is a string mismatch masquerading as a network error. The port defaults to 4840 when omitted, but few clients rely on that; write it explicitly so log lines and firewall rules stay unambiguous.
Example
URL anatomy and the TCP message types
opc.tcp://plc01.plant.local:4840/UA/Server
| | | |
scheme host port path - part of endpoint identity
HEL / ACK buffer sizes, max message size, max chunk count
OPN open or renew the secure channel
MSG service requests and responses, chunked if large
CLO close the channel
ERR / RHE protocol error / reverse hello
Defined in: Part 6 - Mappings, the OPC UA TCP protocol and the uatcp-uasc-uabinary transport profile.
Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.