Skip to main content
Glama
xici001

digital-twin-mcp

by xici001

digital-twin-mcp

デジタルツインシナリオのデバイスデータ機能をMCPツールとしてパッケージ化——あらゆるMCPクライアント(WorkBuddy、Claude Desktop、Cursorなど)から、デバイス状態の照会、リアルタイム指標の読み取り、時系列データの取得、アラートの確認が直接行えます。

デジタルパイプラインの設計者 · 2つ目の積み木:デバイス監視パイプライン 1つ目の積み木:https://github.com/xici001/workflow-templates(AI 自動化ワークフローテンプレート)

できること

ツール

説明

list_devices

シナリオ内の全デバイスを一覧表示(タイプ / 位置)

get_device_metrics

デバイスのリアルタイム指標を読み取り(PLCポーリングをシミュレート)

get_metric_history

特定指標の直近時系列データを取得(トレンドグラフ / 3D可視化用)

set_device_value

デバイスパラメータを書き込み(PLC書き込み / 障害注入テストをシミュレート)

check_alerts

閾値アラートチェック(warning / critical の段階分け)

リソース

説明

device://{id}/profile

デバイス台帳:メタデータ + 指標のレンジとアラート閾値

scene://layout

3Dシーンレイアウト:デバイスのワールド座標(Three.js / Unity に直接オーバーレイ)

プロンプト

説明

device_health_report

指定デバイスのヘルスレポートを生成

Related MCP server: MCP PLC Core

アーキテクチャ

MCP 客户端(WorkBuddy / Claude Desktop / ...)
        │  stdio 或 streamable-http
┌───────▼───────────────┐
│  server.py (FastMCP)  │  ← 工具 / 资源 / 提示词定义
└───────┬───────────────┘
        │
┌───────▼───────────────┐
│  alerts.py             │  告警规则引擎(阈值分级)
│  device_registry.py    │  设备台账 + 指标配置 + 3D 坐标
│  simulator.py          │  PLC 数据驱动(BasePLCDriver 接口)
└───────────────────────┘
  • v0 のデータソースはシミュレートPLCドライバ(固定乱数シード、再現可能。射出成形機の温度は意図的に閾値付近まで上昇させ、アラートのエスカレーションをデモしやすくしています)。

  • 実デバイスに接続する場合は BasePLCDriver を継承して read_metrics / write_value を実装するだけ(OPC-UA / Modbus / ゲートウェイAPIいずれも可)。Server層は変更不要です。

クイックスタート

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

エンドツーエンドテスト(serverサブプロセスを起動し、stdioプロトコルで呼び出し):

python examples/client_test.py

WorkBuddyへの接続

examples/workbuddy_mcp.json の内容を C:\Users\33033\.workbuddy\mcp.jsonmcpServers にマージし、コネクタ管理ページ右上のカスタムコネクタ入口で digital-twin-mcp を「信頼」をクリックして有効化します。

workflow-templates との関係

同じ「デジタルパイプライン」ブランドの2つの積み木:

  • workflow-templates頭脳労働(財務分析など)をワークフローとしてパッケージ化

  • digital-twin-mcpデバイスデータ機能(デジタルツイン / PLC)をMCPツールとしてパッケージ化

両者は将来組み合わせ可能:ワークフローテンプレートの「デバイスヘルスレポート」などのテンプレートは、このMCPのツールを直接呼び出して実データを取得できます。

ロードマップ

  • v0.1:シミュレートPLC + 5ツール + 2リソース + 1プロンプト(現在)

  • v0.2:OPC-UA実接続、時系列データのDB保存(SQLite/InfluxDB)、WebSocketプッシュ

  • v0.3:3Dシーン連携(シーンレイアウトリソースをThree.jsレンダリングに接続)、マルチファクトリーインスタンス

ライセンス

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