Skip to main content
Glama
xici001

digital-twin-mcp

by xici001

digital-twin-mcp

Package the device data capabilities of digital twin scenarios into MCP tools—any MCP client (WorkBuddy, Claude Desktop, Cursor, etc.) can directly query device status, read real-time metrics, pull time-series data, and check alerts.

Architect of the Digital Pipeline · Second Building Block: Device Monitoring Pipeline First building block: https://github.com/xici001/workflow-templates (AI automation workflow templates)

What it can do

Tool

Description

list_devices

List all devices in the scene (type / location)

get_device_metrics

Read real-time device metrics (simulated PLC polling)

get_metric_history

Read recent time-series data for a metric (for trend charts / 3D visualization)

set_device_value

Write device parameters (simulated PLC write / fault injection testing)

check_alerts

Threshold alert check (warning / critical levels)

Resource

Description

device://{id}/profile

Device ledger: metadata + metric ranges and alert thresholds

scene://layout

3D scene layout: device world coordinates (directly overlayable in Three.js / Unity)

Prompt

Description

device_health_report

Generate a health report for the specified device

Related MCP server: MCP PLC Core

Architecture

MCP 客户端(WorkBuddy / Claude Desktop / ...)
        │  stdio 或 streamable-http
┌───────▼───────────────┐
│  server.py (FastMCP)  │  ← 工具 / 资源 / 提示词定义
└───────┬───────────────┘
        │
┌───────▼───────────────┐
│  alerts.py             │  告警规则引擎(阈值分级)
│  device_registry.py    │  设备台账 + 指标配置 + 3D 坐标
│  simulator.py          │  PLC 数据驱动(BasePLCDriver 接口)
└───────────────────────┘
  • The v0 data source is a simulated PLC driver (fixed random seed, reproducible; injection molding machine temperature is deliberately drifted close to the threshold to make alert escalation easy to demonstrate).

  • To connect real devices, inherit BasePLCDriver and implement read_metrics / write_value (OPC-UA / Modbus / gateway API all work), with zero changes to the Server layer.

Quick Start

pip install -e .
# 方式一:stdio 传输(MCP 客户端默认)
python -m digital_twin_mcp.server
# 方式二:streamable-http 传输
python -m digital_twin_mcp.server --transport streamable-http

End-to-end test (start the server subprocess and call it via the stdio protocol):

python examples/client_test.py

Integrate with WorkBuddy

Merge the contents of examples/workbuddy_mcp.json into the mcpServers key of C:\Users\33033\.workbuddy\mcp.json, then click "Trust" on digital-twin-mcp in the custom connector entry at the top right of the Connector Management page to enable it.

Relationship with workflow-templates

Two building blocks under the same "Digital Pipeline" brand:

  • workflow-templates: Package mental work (financial report analysis, etc.) into workflows

  • digital-twin-mcp: Package device data capabilities (digital twin / PLC) into MCP tools

The two can be combined in the future: templates such as "Device Health Report" in workflow templates can directly call this MCP's tools to fetch real data.

Roadmap

  • v0.1: Simulated PLC + 5 tools + 2 resources + 1 prompt (current)

  • v0.2: Real OPC-UA integration, time-series data persistence (SQLite/InfluxDB), WebSocket push

  • v0.3: 3D scene integration (scene layout resource connected to Three.js rendering), multi-factory instances

License

MIT License

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    MCP server for PTC ThingWorx, the IIoT platform, providing 8 tools for AI agents to read live state and trigger actions across the industrial asset graph with env-gated safety for writes and invocations.
    8
    MIT
  • F
    license
    B
    quality
    B
    maintenance
    Universal MCP server for industrial PLC communication, enabling AI agents to read sensors, alarms, status, setpoints, and write setpoints via adapters for Modbus, S7, or custom PLCs.
    6
  • A
    license
    B
    quality
    A
    maintenance
    Exposes a deterministic IoT edge runtime — Modbus/CAN/J1939 acquisition, local rules, alarms, and history — to AI assistants as typed, governed MCP tools. Reads are safe by default; device control stays deny-by-default, explicitly confirmed, and audited.
    23
    3
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Exposes live industrial IoT telemetry to any MCP client, streaming simulated sensor data from a fleet of machines and detecting anomalies, with the ability to inject faults on demand.
    4
    MIT

View all related MCP servers

Related MCP Connectors

  • Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.

  • Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.

  • Operator-as-agent MCP hub. 6 tools. First $5 free, then $0.001/call.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xici001/digital-twin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server