node-opcua-modeler-mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +204 -0
- package/catalog/catalog.json +54782 -0
- package/dist/catalog.d.ts +76 -0
- package/dist/catalog.js +134 -0
- package/dist/catalog.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +43 -0
- package/dist/server.js +161 -0
- package/dist/server.js.map +1 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# node-opcua-modeler-mcp-server
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/node-opcua-modeler-mcp-server)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://modelcontextprotocol.io)
|
|
6
|
+
|
|
7
|
+
An [MCP server](https://modelcontextprotocol.io) that gives AI agents access to the **OPC UA companion specification type system** — 589 types across 22 industrial namespaces, plus 1,533 engineering units.
|
|
8
|
+
|
|
9
|
+
Built on [node-opcua](https://github.com/node-opcua/node-opcua), the most widely used OPC UA stack for Node.js.
|
|
10
|
+
|
|
11
|
+
## Why?
|
|
12
|
+
|
|
13
|
+
When an AI agent needs to build an OPC UA information model, it must know:
|
|
14
|
+
- What **companion spec types** exist (DI, Machinery, Robotics, Machine Tools…)
|
|
15
|
+
- What **components, properties, and methods** each type has
|
|
16
|
+
- What **namespace dependencies** are required
|
|
17
|
+
- What **engineering unit symbols** are valid (UNECE Rec. 20)
|
|
18
|
+
|
|
19
|
+
This MCP server answers all of those questions — **offline, for free, in milliseconds**.
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
### With Claude Desktop
|
|
24
|
+
|
|
25
|
+
Add to your `claude_desktop_config.json`:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"opcua-modeler": {
|
|
31
|
+
"command": "npx",
|
|
32
|
+
"args": ["-y", "node-opcua-modeler-mcp-server"]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### With any MCP client
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx node-opcua-modeler-mcp-server
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The server communicates over **stdio** using the [Model Context Protocol](https://modelcontextprotocol.io).
|
|
45
|
+
|
|
46
|
+
## Tools
|
|
47
|
+
|
|
48
|
+
### `list_namespaces`
|
|
49
|
+
|
|
50
|
+
List all 25 OPC UA companion spec namespaces with aliases, URIs, and dependencies.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
→ list_namespaces()
|
|
54
|
+
← [
|
|
55
|
+
{ "alias": "di", "name": "OPC UA for Devices", "uri": "http://opcfoundation.org/UA/DI/", "dependencies": [] },
|
|
56
|
+
{ "alias": "robotics", "name": "OPC UA for Robotics", "uri": "http://opcfoundation.org/UA/Robotics/", "dependencies": ["di", "ia"] },
|
|
57
|
+
...
|
|
58
|
+
]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### `resolve_dependencies`
|
|
62
|
+
|
|
63
|
+
Resolve the full dependency chain for companion spec aliases. Returns a topologically sorted list for the YAML `namespaces:` block.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
→ resolve_dependencies({ aliases: ["machineTool"] })
|
|
67
|
+
← ["di", "ia", "machinery", "isa95JobControl", "machineryJobs", "machineTool"]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### `list_types`
|
|
71
|
+
|
|
72
|
+
List all ObjectTypes and VariableTypes defined in a companion spec namespace.
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
→ list_types({ alias: "robotics" })
|
|
76
|
+
← [
|
|
77
|
+
{ "browseName": "MotionDeviceType", "kind": "ObjectType", "subtypeOf": "di:ComponentType", ... },
|
|
78
|
+
{ "browseName": "AxisType", "kind": "ObjectType", "subtypeOf": "di:ComponentType", ... },
|
|
79
|
+
...
|
|
80
|
+
] // 25 types
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### `get_type_details`
|
|
84
|
+
|
|
85
|
+
Get the full structure of a type — components, properties, methods, interfaces, including inherited members.
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
→ get_type_details({ alias: "robotics", browseName: "MotionDeviceType" })
|
|
89
|
+
← {
|
|
90
|
+
"browseName": "MotionDeviceType",
|
|
91
|
+
"kind": "ObjectType",
|
|
92
|
+
"subtypeOf": "di:ComponentType",
|
|
93
|
+
"interfaces": ["di:IVendorNameplateType", "di:ITagNameplateType"],
|
|
94
|
+
"components": [
|
|
95
|
+
{ "browseName": "robotics:Axes", "nodeClass": "Object", "typeDefinition": "FolderType", "modellingRule": "Mandatory" },
|
|
96
|
+
{ "browseName": "robotics:PowerTrains", "nodeClass": "Object", "typeDefinition": "FolderType", "modellingRule": "Mandatory" },
|
|
97
|
+
...
|
|
98
|
+
],
|
|
99
|
+
"properties": [
|
|
100
|
+
{ "browseName": "di:Manufacturer", "dataType": "LocalizedText", "modellingRule": "Mandatory" },
|
|
101
|
+
{ "browseName": "robotics:MotionDeviceCategory", "dataType": "MotionDeviceCategoryEnumeration", "modellingRule": "Mandatory" },
|
|
102
|
+
...
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### `search_types`
|
|
108
|
+
|
|
109
|
+
Search for types across **all** companion specs by keyword.
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
→ search_types({ query: "temperature" })
|
|
113
|
+
← [
|
|
114
|
+
{ "alias": "glass", "browseName": "MotorTemperatureTooHighEventType", ... },
|
|
115
|
+
{ "alias": "padim", "browseName": "TemperatureMeasurementVariableType", ... },
|
|
116
|
+
{ "alias": "amb", "browseName": "OverTemperatureConditionClassType", ... }
|
|
117
|
+
]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### `find_engineering_unit`
|
|
121
|
+
|
|
122
|
+
Find the official UNECE Rec. 20 engineering unit symbol. Supports fuzzy matching and natural language aliases.
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
→ find_engineering_unit({ query: "celsius" })
|
|
126
|
+
← { "symbol": "°C", "matchType": "alias", "confidence": 1 }
|
|
127
|
+
|
|
128
|
+
→ find_engineering_unit({ query: "revolutions per minute" })
|
|
129
|
+
← { "symbol": "rpm", "matchType": "alias", "confidence": 1 }
|
|
130
|
+
|
|
131
|
+
→ find_engineering_unit({ query: "bar" })
|
|
132
|
+
← { "symbol": "bar", "matchType": "exact", "confidence": 1 }
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Coverage
|
|
136
|
+
|
|
137
|
+
### Companion Specifications (25)
|
|
138
|
+
|
|
139
|
+
| Alias | Specification | Types |
|
|
140
|
+
|-------|--------------|-------|
|
|
141
|
+
| `padim` | OPC UA for PA-DIM | 101 |
|
|
142
|
+
| `ijtBase` | OPC UA for IJT Base | 65 |
|
|
143
|
+
| `machineTool` | OPC UA for Machine Tools | 63 |
|
|
144
|
+
| `di` | OPC UA for Devices | 44 |
|
|
145
|
+
| `glass` | OPC UA for Glass Manufacturing | 36 |
|
|
146
|
+
| `machineVision` | OPC UA for Machine Vision | 36 |
|
|
147
|
+
| `adi` | OPC UA for Analyzer Devices | 35 |
|
|
148
|
+
| `commercialKitchenEquipment` | OPC UA for Commercial Kitchen Equipment | 35 |
|
|
149
|
+
| `robotics` | OPC UA for Robotics | 25 |
|
|
150
|
+
| `ia` | OPC UA for Industrial Automation | 20 |
|
|
151
|
+
| `amb` | OPC UA for AMB | 18 |
|
|
152
|
+
| `autoId` | OPC UA for AutoID | 18 |
|
|
153
|
+
| `metalForming` | OPC UA for Metal Forming | 16 |
|
|
154
|
+
| `machinery` | OPC UA for Machinery | 15 |
|
|
155
|
+
| `gds` | OPC UA GDS | 14 |
|
|
156
|
+
| `woodworking` | OPC UA for Woodworking | 13 |
|
|
157
|
+
| `cnc` | OPC UA for CNC Systems | 12 |
|
|
158
|
+
| | *…and 5 more* | |
|
|
159
|
+
| **Total** | **22 namespaces** | **589 types** |
|
|
160
|
+
|
|
161
|
+
### Engineering Units
|
|
162
|
+
|
|
163
|
+
1,533 official UNECE Rec. 20 symbols plus 134 natural language aliases (e.g., "celsius" → °C, "revolutions per minute" → rpm).
|
|
164
|
+
|
|
165
|
+
## How It Works
|
|
166
|
+
|
|
167
|
+
The server ships with a pre-generated `catalog.json` containing all type information extracted from OPC Foundation's official NodeSet2.xml files via [node-opcua](https://github.com/node-opcua/node-opcua). All queries are answered from this static catalog — **no network required, no API key needed**.
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
┌─────────────────────────────────────────┐
|
|
171
|
+
│ node-opcua-modeler-mcp-server │
|
|
172
|
+
│ │
|
|
173
|
+
│ ┌─────────────────────────────────┐ │
|
|
174
|
+
│ │ catalog.json (1.7 MB) │ │
|
|
175
|
+
│ │ • 25 companion spec registries │ │
|
|
176
|
+
│ │ • 589 type summaries + details │ │
|
|
177
|
+
│ │ • 1,533 engineering units │ │
|
|
178
|
+
│ └─────────────────────────────────┘ │
|
|
179
|
+
│ │
|
|
180
|
+
│ 6 MCP tools → query the catalog │
|
|
181
|
+
│ stdio transport (JSON-RPC) │
|
|
182
|
+
└─────────────────────────────────────────┘
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Use Cases
|
|
186
|
+
|
|
187
|
+
- **AI-assisted OPC UA modeling** — agents can discover types, resolve dependencies, and validate unit symbols before generating YAML/XML models
|
|
188
|
+
- **Copilot integration** — add OPC UA awareness to coding assistants
|
|
189
|
+
- **Industrial digital twin design** — explore companion spec type hierarchies interactively
|
|
190
|
+
- **Learning OPC UA** — ask an AI to explain types and their relationships
|
|
191
|
+
|
|
192
|
+
## Requirements
|
|
193
|
+
|
|
194
|
+
- Node.js ≥ 18
|
|
195
|
+
|
|
196
|
+
## Related
|
|
197
|
+
|
|
198
|
+
- [node-opcua](https://github.com/node-opcua/node-opcua) — Full OPC UA stack for Node.js
|
|
199
|
+
- [OPC UA Modeler](https://opcua-modeler.sterfive.com) — Create, validate, and generate OPC UA information models
|
|
200
|
+
- [Model Context Protocol](https://modelcontextprotocol.io) — Open protocol for AI tool integration
|
|
201
|
+
|
|
202
|
+
## License
|
|
203
|
+
|
|
204
|
+
MIT © [Sterfive](https://www.sterfive.com)
|