Skip to content
AddisonTechPublic

About

OPC-UA bridge and MCP server for AI agent access to industrial plant-floor data

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Hermes

OPC-UA bridge and MCP server for AI agent access to industrial plant-floor data.

Hermes has two components:

  • Rust CLI — fast OPC-UA bridge with poll, serve, log, and browse commands
  • Python MCP server — exposes OPC-UA nodes as tools so AI agents can read and write plant-floor data directly

Rust CLI

Install

cargo build --release
# binary at target/release/hermes

Commands

Poll — live terminal display of node values

hermes poll --endpoint opc.tcp://localhost:4840 "ns=2;s=Temperature" "ns=2;s=Pressure"

Serve — REST API backed by live OPC-UA polling

hermes serve --endpoint opc.tcp://localhost:4840 --port 4000 "ns=2;s=Temperature"
# GET http://localhost:4000/nodes
# GET http://localhost:4000/nodes/ns=2;s=Temperature

Log — write node values to CSV at a fixed interval

hermes log --endpoint opc.tcp://localhost:4840 --interval 5 --output data.csv "ns=2;s=Temperature"

Clio forwarding — serve and log accept --clio <url> (or env HERMES_CLIO_URL) to also push every poll cycle to a Clio historian (tag = node ID, source = hermes, override with --source). A Clio outage never interrupts polling or logging.

hermes log --endpoint opc.tcp://localhost:4840 --output data.csv --clio http://localhost:8010 "ns=2;s=Temperature"

Browse — explore the OPC-UA namespace

hermes browse --endpoint opc.tcp://localhost:4840 --depth 3
hermes browse --endpoint opc.tcp://localhost:4840 --node "ns=2;s=MyFolder" --depth 2

MCP Server

Exposes OPC-UA data as tools for AI agents.

Install

uv sync
cp config.example.toml config.toml

Configure

Set your endpoint via environment variable or .env file:

HERMES_ENDPOINT=opc.tcp://localhost:4840
HERMES_USERNAME=admin
HERMES_PASSWORD=password

Start

python -m hermes_mcp.server

Tools

Tool Description
read_node(node_id) Read current value of a single node
read_nodes(node_ids) Read multiple nodes in one call
write_node(node_id, value) Write a value to a node
browse_nodes(parent_node_id, depth) Explore the OPC-UA namespace
get_server_status() Server build info and state
get_node_attributes(node_id) Display name, data type, access level

Node ID format

ns=2;s=MyStringTag      # namespace 2, string identifier
ns=2;i=1234             # namespace 2, integer identifier
i=2258                  # namespace 0 (standard OPC-UA nodes)

REST API

When running hermes serve, the following endpoints are available:

Endpoint Description
GET /nodes All node values with last-updated timestamp
GET /nodes/:node_id Single node value
GET /health Server health check

Configuration

Copy config.example.toml to config.toml and adjust as needed.

[server]
endpoint = "opc.tcp://localhost:4840"
security_policy = "None"
security_mode = "None"

[auth]
method = "anonymous"  # anonymous | username | certificate

[polling]
interval_secs = 1.0

Related Projects

About

OPC-UA bridge and MCP server for AI agent access to industrial plant-floor data

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages