OPC-UA MCP Server
v1.0.0Read, write, browse, search, and subscribe to live data on an OPC-UA industrial automation server.
Values you need
| Variable | What it is | |
|---|---|---|
OPCUA_ENDPOINT | required | OPC-UA server endpoint to connect to, e.g. opc.tcp://your-plc-host:4840 Default: opc.tcp://localhost:4840 |
OPCUA_AUTH_MODE | optional | Authentication mode against the OPC-UA server Default: anonymous |
OPCUA_USERNAME | optional | Username, required if OPCUA_AUTH_MODE=username |
OPCUA_PASSWORD | optional secret | Password, required if OPCUA_AUTH_MODE=username |
OPCUA_SECURITY_POLICY | optional | OPC-UA transport security policy, e.g. Basic256Sha256 Default: None |
OPCUA_SECURITY_MODE | optional | OPC-UA transport security mode, e.g. SignAndEncrypt Default: None |
SERVER_TRANSPORT | optional | MCP transport: stdio (for local MCP clients) or http (for remote/hosted deployments) Default: stdio |
Docker discovery passed
Requires Docker
Run in a terminal
claude mcp add opcua-mcp -e OPCUA_ENDPOINT=opc.tcp://localhost:4840 -- docker run -i --rm -e OPCUA_ENDPOINT ghcr.io/mwieczorkiewicz/opcua-mcp:main-29734c4Add to
claude_desktop_config.json{
"mcpServers": {
"opcua-mcp": {
"args": [
"run",
"-i",
"--rm",
"-e",
"OPCUA_ENDPOINT",
"ghcr.io/mwieczorkiewicz/opcua-mcp:main-29734c4"
],
"command": "docker",
"env": {
"OPCUA_ENDPOINT": "opc.tcp://localhost:4840"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"opcua-mcp": {
"args": [
"run",
"-i",
"--rm",
"-e",
"OPCUA_ENDPOINT",
"ghcr.io/mwieczorkiewicz/opcua-mcp:main-29734c4"
],
"command": "docker",
"env": {
"OPCUA_ENDPOINT": "opc.tcp://localhost:4840"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "OPCUA_ENDPOINT",
"id": "opcua-endpoint",
"password": true,
"type": "promptString"
}
],
"servers": {
"opcua-mcp": {
"args": [
"run",
"-i",
"--rm",
"-e",
"OPCUA_ENDPOINT",
"ghcr.io/mwieczorkiewicz/opcua-mcp:main-29734c4"
],
"command": "docker",
"env": {
"OPCUA_ENDPOINT": "${input:opcua-endpoint}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.opcua-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "OPCUA_ENDPOINT", "ghcr.io/mwieczorkiewicz/opcua-mcp:main-29734c4"]
env = { "OPCUA_ENDPOINT" = "opc.tcp://localhost:4840" }For AI agents
- Ask the user for: OPCUA_ENDPOINT. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: opcua_browse, opcua_browse_nodes, opcua_connect, opcua_debug_search, opcua_disconnect, opcua_discovery_stats, opcua_ensure_server_nodes, opcua_find_similar_nodes, ….
- If it fails, check that the required runtime is installed (Docker) and that the values above are set.
Machine-readable: install.md · manifest.json