Skip to main content

otgate — OT policy gateway

io.github.alikup-ai/otgate-opcua

v0.1.1Updated Nov 7, 2026stdio · PyPI

Gates an LLM agent's writes to an OPC UA server on ranges, rate of change and live interlocks.

Install

Nothing to fill in: copy and run.

Run in your terminal

claude mcp add otgate-opcua -e OTGATE_BACKEND=fake -e OTGATE_POLICY=examples/reactor_policy.yaml -e OTGATE_AUDIT=audit.jsonl -- uvx otgate==0.1.1

Configuration

6 settings.

  • OTGATE_BACKEND
    Env var· optional
    Backend to gate: 'fake' for the bundled in-memory reactor simulator, 'asyncua' for a real OPC UA server. Start with 'fake' — it needs no plant and no extra dependency.Default: fake
  • OTGATE_POLICY
    Env var· optional
    Path to the policy YAML. Any tag not listed in it is denied by default.Default: examples/reactor_policy.yaml
  • OTGATE_AUDIT
    Env var· optional
    Path to the append-only JSONL audit log. Every call, allowed or not, produces exactly one line.Default: audit.jsonl
  • OTGATE_SHADOW
    Env var· optional
    Set to 1 to run in shadow mode: allowed writes are recorded as 'WOULD execute' and never reach the backend. Use this to watch an agent for a while before letting it touch anything.
  • OTGATE_RATE_HISTORY
    Env var· optional
    Path to a JSONL file that keeps the rate-of-change time base across restarts. Without it a restart loses the time base, and rate limits fall back to a one-interval allowance.
  • OTGATE_OPCUA_ENDPOINT
    Env var· optional
    OPC UA endpoint, e.g. opc.tcp://localhost:4840. Required when OTGATE_BACKEND=asyncua.

Listed in the official MCP Registry since Nov 7, 2026. Mirrored daily; last checked Nov 26, 2026.