NAC Tools & Protocols

Digital Twin API for Northampton County
MCP MQTT OPC-UA MQMCP

Architecture

ISA-95 Levels MQMCP Server L4 Enterprise ----+ +---------------------------+ L3 Operations ----+------> | MQTT | MCP | OPC-UA | L2 Control ----+ | Broker | Tools | Server | L1 Sensing ----+ +---------------------------+ L0 Physical ----+ | +---------+---------+ | | | Claude SCADA Web Apps
L4
Enterprise
L3
Operations
L2
Control
L1
Sensing
L0
Physical

MCP Tools

Loading tools...
Live Security Scanner

Loading MCP tools from JSON...

Communication Protocols

MQ MQTT - Pub/Sub Messaging

Real-time messaging across ISA-95 levels using topic-based pub/sub.

nac/ L4/ enterprise/status # County-wide status site/+/status # Per-office status L3/ workflow/+/+/state # Workflow states workorder/+ # Work orders L2/ unit/+/status # Production unit status unit/+/oee # OEE metrics L1/ event/+ # System events L0/ equipment/+/status # Equipment status
import { NACMQTTClient } from './comm/mqtt'; const client = new NACMQTTClient(); await client.connect(); // Subscribe to OEE updates client.subscribe('L2/unit/+/oee', (msg) => { console.log('OEE:', msg.value); }); // Publish workflow state client.publish('L3/workflow/prothonotary/civil/state', { state: 'Execute' });

UA OPC-UA - Industrial Communication

Standard industrial protocol exposing NAC data as an OPC-UA address space with 108 nodes.

import { NACOPCUAServer } from './comm/opcua'; const server = new NACOPCUAServer({ port: 4840 }); await server.start(); // Browse address space server.browse('NAC'); // -> L4_Enterprise, L3_Operations, L2_Control, L1_Sensing, L0_Physical // Read OEE value server.readValue('L2_Control/ProductionUnits/Prothonotary/OEE'); // -> { value: 0.85, dataType: 'Double', statusCode: 'Good' } // Write value server.writeValue('L2_Control/ProductionUnits/Prothonotary/OEE', 0.92);

MQ+ MQMCP - Combined Protocol

Merges MQTT pub/sub with MCP tool-calling. Call tools via MQTT topics, get responses via subscriptions.

import { MQMCPServer } from './comm/mqmcp'; const server = new MQMCPServer(); await server.start(); const client = server.createClient(); // Call MCP tools via MQTT const officers = await client.callTool('get_officers', {}); const oee = await client.callTool('get_oee_benchmark', { office: 'prothonotary' }); // Use OPC-UA tools const browse = await client.callTool('opcua_browse', { path: 'NAC' }); const read = await client.callTool('opcua_read', { path: 'L2_Control/ProductionUnits/Prothonotary/OEE' }); // List all available tools const tools = await client.listTools(); // -> 13 tools: get_officers, get_municipality, opcua_browse, mqtt_publish, ...

Quick Start

1
Run MQMCP Server

Starts MQTT broker, OPC-UA server, and registers all tools

node src/comm/mqmcp/server.js
2
Or use MCP with Claude Code

Add to your Claude Code MCP settings

{ "nac": { "command": "node", "args": ["src/mcp/server.js"] } }
3
Run Tests

Verify all protocols are working

node src/comm/test.js