@node-i3x/mcp 0.0.0-stage → 0.11.2
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 +123 -2
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +836 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +225 -0
- package/dist/index.js +932 -0
- package/dist/index.js.map +1 -0
- package/package.json +65 -4
package/README.md
CHANGED
|
@@ -1,3 +1,124 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @node-i3x/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Model Context Protocol (MCP) server for industrial automation — connect Claude, Gemini, Cursor, and Agentic AI workflows to any i3X 1.0 & OPC UA system.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@node-i3x/mcp)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://sterfive.com)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## What is `@node-i3x/mcp`?
|
|
12
|
+
|
|
13
|
+
**`@node-i3x/mcp`** is an open-source MCP server that gives AI agents (Anthropic Claude, Google Gemini, OpenAI Codex, Cursor IDE) native, structured tools to explore, diagnose, and monitor industrial machinery and factory networks.
|
|
14
|
+
|
|
15
|
+
Traditional APIs flood LLM context windows with thousands of raw nodes and require 10–20 sequential HTTP round-trips to understand a single asset. **`@node-i3x/mcp`** solves this with **5 high-value composite tools** designed for single-turn intelligence:
|
|
16
|
+
|
|
17
|
+
- 🚀 **1-Turn Complete Diagnostics**: Fetch identity, ISA-95 parent/child topology, OPC UA ObjectType schema, and live telemetry in a single call.
|
|
18
|
+
- 📉 **80%+ Token Reduction**: Returns structured, dense JSON summaries instead of raw, unparsed address space dumps.
|
|
19
|
+
- 🛡️ **Self-Correcting Address Space Traversal**: Built-in fuzzy matching automatically suggests real asset IDs if an agent mistypes an element ID.
|
|
20
|
+
- 🌐 **Universal Compatibility**: Connects to **ANY** standard CESMII i3X 1.0 REST Gateway server (Node.js, C#, Python, Cloud), or runs embedded in-process via `node-i3x` stack.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Quickstart
|
|
25
|
+
|
|
26
|
+
### 1. Run with `npx` (No installation needed)
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx -y @node-i3x/mcp
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
By default, it connects to an i3X gateway at `http://localhost:3000`. You can configure the target server and authentication via environment variables:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
I3X_SERVER_URL=https://my-plant-gateway.corp.local:8000 \
|
|
36
|
+
I3X_AUTH_TOKEN=secret-bearer-token \
|
|
37
|
+
npx -y @node-i3x/mcp
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### 2. Connect Claude Desktop
|
|
43
|
+
|
|
44
|
+
Add the server to your `claude_desktop_config.json`:
|
|
45
|
+
|
|
46
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
47
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"node-i3x": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["-y", "@node-i3x/mcp"],
|
|
55
|
+
"env": {
|
|
56
|
+
"I3X_SERVER_URL": "http://127.0.0.1:8000",
|
|
57
|
+
"I3X_AUTH_TOKEN": "your-optional-token"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Restart Claude Desktop, and you can immediately ask:
|
|
65
|
+
> *"Inspect Boiler_101. Is the current temperature normal according to its schema definition?"*
|
|
66
|
+
> *"Explore the plant topology from root assets down 2 levels and give me a summary of any assets reporting Bad quality."*
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### 3. Connect Cursor IDE
|
|
71
|
+
|
|
72
|
+
In Cursor Settings > Features > MCP:
|
|
73
|
+
1. Click **+ Add New MCP Server**
|
|
74
|
+
2. Name: `node-i3x`
|
|
75
|
+
3. Type: `command`
|
|
76
|
+
4. Command: `npx -y @node-i3x/mcp`
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## High-Value MCP Tools
|
|
81
|
+
|
|
82
|
+
| Tool | Purpose | Typical Agent Prompt |
|
|
83
|
+
|------|---------|----------------------|
|
|
84
|
+
| `i3x_connect` | **Dynamic Gateway Switching**.<br/>Connects or switches to a target i3X endpoint URL and Bearer token at runtime with connection verification. | *"Connect to the Chicago plant sandbox at https://i3x-portal.sterfive.io/instance/xyz with token abc."* |
|
|
85
|
+
| `i3x_inspect_asset` | **Single-Turn Complete Asset Diagnostic**.<br/>Returns asset identity, ObjectType schema, sub-components, and live VQT telemetry in 1 call. Includes fuzzy suggestions on missing IDs. | *"Diagnose Pump_101. What is its current operational state and are all sub-components healthy?"* |
|
|
86
|
+
| `i3x_explore_plant_hierarchy` | **ISA-95 Plant Topology Traversal**.<br/>Traverses plant hierarchy from roots down to components up to `maxDepth` with cycle protection. | *"What machines and lines are configured in this factory?"* |
|
|
87
|
+
| `i3x_query_telemetry` | **Telemetry & Trend Analysis**.<br/>Queries current VQT or time-series history with pre-computed statistics (`min`, `max`, `mean`, `badQualityCount`). | *"Show me temperature trends for Boiler_101 over the last 2 hours. Did it exceed 85°C?"* |
|
|
88
|
+
| `i3x_discover_types_and_schemas` | **Type & Schema Explorer**.<br/>Searches registered ObjectTypes, RelationshipTypes, and JSON Schema field validation rules. | *"What properties and telemetry variables are required for a CNC_MillingMachine type?"* |
|
|
89
|
+
| `i3x_monitor_asset_events` | **Event & Alert Monitoring Stream**.<br/>Sets up subscription snapshot and alert condition filters. | *"Monitor temperature and pressure on line 4 and alert me if temperature > 80°C."* |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## MCP Resources
|
|
94
|
+
|
|
95
|
+
The server exposes read-only MCP resources for fast server inspection:
|
|
96
|
+
|
|
97
|
+
- `i3x://info`: Server specifications, vendor details, and supported features.
|
|
98
|
+
- `i3x://namespaces`: List of registered OPC UA / i3X namespace URIs and index mappings.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Programmatic Usage (TypeScript / Node.js)
|
|
103
|
+
|
|
104
|
+
You can also embed `@node-i3x/mcp` directly into your custom AI agent orchestrator (LangChain, LlamaIndex, Mastra, AutoGen):
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
import { NodeI3xMcpServer, RestClientBinding } from "@node-i3x/mcp";
|
|
108
|
+
|
|
109
|
+
// 1. Create binding (REST Gateway or In-Process Stack)
|
|
110
|
+
const binding = new RestClientBinding("http://127.0.0.1:8000", "optional-auth-token");
|
|
111
|
+
|
|
112
|
+
// 2. Instantiate MCP Server
|
|
113
|
+
const server = new NodeI3xMcpServer(binding);
|
|
114
|
+
|
|
115
|
+
// 3. Connect via Stdio transport
|
|
116
|
+
await server.startStdio();
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
Dual-licensed under **AGPL-3.0** and **Commercial License**.
|
|
124
|
+
For commercial licensing, enterprise support, and custom OPC UA/i3X integrations, visit [Sterfive.com](https://sterfive.com).
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|