Aller au contenu principal

OPC UA Modeler for AI assistants (MCP)

The OPC UA Modeler exposes its type catalog and model tooling over the Model Context Protocol (MCP), so an AI assistant can look up companion specification types, resolve namespace dependencies, find engineering units and validate a model — instead of guessing at them.

There are two ways to connect, and they expose the same twelve tools.

Option 1 — remote connector (no install)

Add this URL as a custom connector in an MCP client that supports remote servers (Claude.ai: Settings → Connectors → Add custom connector):

https://api.opcua-modeler.sterfive.io/mcp

Nothing to install. The catalog tools work immediately; see API keys for the ones that do not.

Option 2 — local, over stdio

Runs on your machine, and can be pointed at an on-premise backend so model content never leaves your network.

{
"mcpServers": {
"opcua-modeler": {
"command": "npx",
"args": ["-y", "node-opcua-modeler-mcp-server"],
"env": {
"OPCUA_MODELER_API_KEY": "stfv_your_key_here"
}
}
}
}

OPCUA_MODELER_API_KEY is optional — omit it and you still get every catalog tool plus opcua_model_validate.

Pointing at an on-premise backend

With a licensed CLI running opcua-modeler serve:

"env": { "OPCUA_MODELER_BACKEND": "local" }

The two backends are never mixed and there is no fallback between them: if the local server is down the call fails rather than quietly going to the cloud, because silently sending a model off-network would be a data-egress bug rather than a convenience.

Example prompts

Ask in plain language — the assistant picks the tools.

1. Discover the right base type before modelling

I need to model a weighing scale for a packaging line. Which OPC UA companion specification should I build on, what type should my device subtype, and what mandatory members will I have to provide?

Exercises list_namespaces, search_types, get_type_details.

2. Get the namespace block right

I'm writing a model that uses MachineTool and Robotics types. What exactly needs to go in the namespaces: section of my YAML, in the right order?

Exercises resolve_dependencies — the full transitive chain, which is easy to get wrong by hand and fails at generation time when you do.

3. Avoid reinventing a standard block

My device needs a serial number, manufacturer and software revision. Is there a standard OPC UA interface or AddIn that already provides those, rather than me declaring them inline?

Exercises find_reusable_block.

4. Check units, then validate

The sensor reports rotational speed in revolutions per minute and temperature in celsius. Give me the correct UNECE unit symbols, then validate this model:

namespaceUri: http://example.com/sensor/

Exercises find_engineering_unit and opcua_model_validate.

API keys

Most tools need no key. These three do, because they run the modelling engine:

ToolNeeds a key
resolve_dependencies, list_namespaces, list_types, get_type_details, search_types, find_reusable_block, find_engineering_unitno
get_dsl_reference, opcua_model_validateno
opcua_model_generate, opcua_model_reverse, opcua_model_createyes

To get one: register at opcua-modeler.sterfive.io, then create a key under Settings → API. Set it as OPCUA_MODELER_API_KEY in the MCP server's configuration (see Option 2 above).

Remote connector limitation

The hosted connector at /mcp cannot supply your key, so those three tools report "Authentication required" there. Use the local stdio configuration if you need them. Everything else works over the remote connector.

Rate limits

CallerLimit
Anonymous (no key)50 calls/day per IP
Free tier key25 calls/day
Paid planssee pricing

If you hit a limit the tool reports how long to wait. Current plan details and quotas live in your account under Settings → API — the tools themselves deliberately do not carry pricing or upgrade messaging.

Troubleshooting

"Authentication required" — the tool needs a key. Check OPCUA_MODELER_API_KEY is set in the MCP server's config, not just in your shell: MCP clients start the server with their own environment.

"Cannot reach the OPC UA Modeler API" — network or DNS. Check the API health endpoint.

Key expired — beta keys carry a fixed window. Rotate at Settings → API ("Rotate & extend"), then update the value in your config.

On-premise: "no server running" — start opcua-modeler serve. The token is read from the server's discovery file, so if the server restarted, retry to pick up the new one.

Source

The MCP server is open source and published to npm as node-opcua-modeler-mcp-servergithub.com/node-opcua/node-opcua-modeler-mcp-server.