An MCP (Model Context Protocol) server that exposes OPC UA Part 4 service calls as MCP tools, enabling LLMs (Claude, Copilot, VS Code, etc.) to interact with OPC UA servers.
- Profile-based tool catalog covering all OPC UA Part 4 service sets (except session management), plus PKI, configuration, NodeSet export, PubSub, and OPC UA-aware packet capture. The default
fullprofile exposes every tool below; smaller profiles (core,services,administration,pubsub,diagnostics) expose a bounded subset — see Tool Profiles - Both stdio and Streamable HTTP transports (HTTP is exposed only at
/mcp;--transport sseis a deprecated alias for--transport http) - JSON representation of all OPC UA types for LLM-friendly interactions; scalar
Variantvalues preserve typedfalseand0values rather than treating default values asnull - Session management via Connect/Disconnect tools
The tables below list every tool available in the default full profile. Running with --profile core|services|administration|pubsub|diagnostics exposes only the tool classes relevant to that profile — see Tool Profiles for the mapping.
| Service Set | Tools | Description |
|---|---|---|
| Connection | GetEndpoints, Connect, Disconnect, GetConnectionStatus | Endpoint discovery and session lifecycle |
| Attribute | Read, Write, HistoryRead, HistoryUpdate | Read/write node attributes and historical data |
| View | Browse, BrowseNext, TranslateBrowsePaths, RegisterNodes, UnregisterNodes, QueryFirst, QueryNext | Navigate and query the address space |
| Node Management | AddNodes, AddReferences, DeleteNodes, DeleteReferences | Modify address space |
| Method | Call | Invoke methods |
| Subscription | CreateSubscription, ModifySubscription, SetPublishingMode, Publish, Republish, DeleteSubscriptions, TransferSubscriptions | Notification subscriptions |
| MonitoredItem | CreateMonitoredItems, ModifyMonitoredItems, SetMonitoringMode, SetTriggering, DeleteMonitoredItems | Data change monitoring |
| Discovery | FindServers, FindServersOnNetwork, RegisterServer, RegisterServer2 | Server discovery and registration |
| PKI Management | ListCertificates, TrustCertificate, RemoveCertificate, GetPkiStorePaths | Manage certificate trust lists |
| Configuration | GetConfiguration, SetTransportConfiguration, SetClientConfiguration, SetSecurityConfiguration, SetConfiguration | View/modify in-memory client settings; SetConfiguration is the full-profile compatibility tool |
| NodeSet Export | ExportNodeSet, ExportNodeSetPerNamespace | Export address space to NodeSet2 XML |
| Convenience | ReadValue, ReadValues, WriteValue, BrowseAll, CallMethod, ReadNode, Cancel | Simplified operations |
| Packet Capture | list_interfaces, start_capture, stop_capture, list_captures, get_capture, capture_now, list_active_channels, dump_keys, decode_pcap_with_keys, summarize_service_calls, replay_pcap, stop_replay, list_replays | OPC UA-aware packet capture, offline decode, service-call summaries, replay |
See the full documentation and NuGet readme.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"opcua": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/tools/Opc.Ua.Mcp/Opc.Ua.Mcp.csproj"]
}
}
}Add to .vscode/mcp.json:
{
"servers": {
"opcua": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/tools/Opc.Ua.Mcp/Opc.Ua.Mcp.csproj"]
}
}
}Tool: Connect
Arguments:
endpointUrl: "opc.tcp://localhost:62541/Quickstarts/ReferenceServer"
useSecurity: true
autoAcceptCerts: true
Tool: Browse
Arguments:
nodeId: "i=85"
Tool: ReadValue
Arguments:
nodeId: "i=2258"
Tool: WriteValue
Arguments:
nodeId: "ns=2;s=MyVariable"
value: "42"
dataType: "Int32"
Tool: CallMethod
Arguments:
objectId: "ns=2;s=MyObject"
methodId: "ns=2;s=MyMethod"
inputArguments: ["arg1", "arg2"]
The server uses McpServer.Config.xml for OPC UA client configuration, including:
- Application certificate settings
- Trust list management
- Transport quotas
- Operation limits
Certificates are stored under %LocalApplicationData%/OPC Foundation/pki/.