About OPCUA4MCP
OPCUA4MCP is an MCP server published by mikakaraila in the Developer Tools category: oPC UA tools for MCP Server. Python based implementation based on asyncua and FastMCP.
The repository has 4 stars and 0 forks, with the last commit 9 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/mikakaraila/OPCUA4MCPThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about OPCUA4MCP
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
OPCUA protocol tools for MCP Server
Python based implementation based on asyncua and FastMCP.
Features
Prerequisites
- Python 3.10 or higher
- UV (for UV method - optional but recommended)
- Git (clone Repository)
Installation & Usage
Virtual environment:
uv venv
Activate it:
.venv\Scripts\activate
Install Python packages:
uv pip install fastmcp uv pip install asyncua
Run server first in test mode
uv run server.py test
NOTE: You need to download Prosys OPC UA Simulation server to run tests! Download it from https://prosysopc.com/products/opc-ua-simulation-server/ Run Simulation server before you start test.
Run basic tests
uv run test.py
Integration with Claude Desktop
Look menu: File -> Settings Developer
Add following JSON snippet into your local MCP servers. OPCUA4MCP server.py into claude_desktop_config.json file, example:
"opcua4mcp": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"--with",
"asyncua",
"fastmcp",
"run",
"D:\\YourFilePathToClonedRepo\\server.py:app" ],
"env": {
"USERNAME": "test",
"PASSWORD": "test"
},
"transport": "stdio",
"type": null,
"cwd": null,
"timeout": null,
"description": null,
"icon": null,
"authentication": null
},
Available Tools
The MCP server provides the following comprehensive tools for using OPC UA Server:
🔧 Implemented tools:
connect_opcua_server- Connect to OPC UA Server (Anonymous)connect_opcua_server_username_and_password- NOT WORKINGconnect_opcua_server_secure- NOT WORKINGdisconnect_opcua_serverdiscover_opcua_servers- NOT TESTEDbrowse_opcua_nodesread_node_valueget_node_inforead_multiple_opcua_nodeswrite_opcua_valuecopy_opcua_value_from_node_to_noderead_history_rawread_history_at_times
Example prompts
connect to opc.tcp://localhost:53530/OPCUA/SimulationServer
read node ns=5;s=Double
write value 2.2 to node ns=5;s=Double data type is Double
Connect to opc.tcp://localhost:53530/OPCUA/SimulationServer
Read history from node ns=3;i=1002 for the last 2 hours
read 1 minute average
visualize data
📬 Contact
Name: Mika Karaila
Email: mika.karaila@valmet.com
License
This project is licensed under the MIT License - see the LICENSE file for details.
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.