Skip to main content
Glama

GhostBus

Old machines. New intelligence. Controlled access.

GhostBus is an agent-independent MCP-to-Modbus command firewall for one simulated centrifugal pump. It brings legacy Modbus TCP telemetry into MCP, checks proposed actions against deterministic policy, waits for operator approval when required, and independently verifies outcomes. TimeMachine reconstructs the incident and shows the simulated consequences of a different decision.

GhostBus blocks a 96 °C reset and previews an approved cooling path

Machine overview · TimeMachine comparison · Mobile console

Start GhostBus

docker compose up --build -d --wait

Open GhostBus on localhost. OpenAPI documents the HTTP routes. Configuration defaults to the deterministic demonstration operator.

For local development with Python 3.12 and Node 22.12 or later in the 22.x line.

python3.12 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.txt
npm --prefix frontend ci
npm --prefix frontend run build
.venv/bin/python -m uvicorn backend.app:app --host 127.0.0.1 --port 8000

Related MCP server: otgate

Demonstrate the interlock

  1. Inject overheating and advance three virtual ticks. The pump reaches 96 °C with a critical alarm.

  2. Trigger the unsafe reset. GhostBus records TEMP_RESET_001 and preserves the pump state.

  3. Start diagnosis in demonstration mode. Inspect the proposed cooldown and its simulated temperature trajectory.

  4. Approve cooling, execute it, and advance three more ticks. A separate Modbus read confirms recovery at 75 °C.

  5. Compare outcomes in TimeMachine. Inspect the actual recovery and the simulated pump fault from allowing the reset.

Architecture

flowchart LR
  Model["Operator or AI diagnosis"] --> MCP["MCP gateway"]
  MCP --> Workflow["Guarded workflow"]
  Console["Operator console"] --> Workflow
  Workflow --> Policy["Deterministic policy and approval"]
  Policy --> Executor["Controlled executor"]
  Executor --> Bridge["Private Modbus TCP bridge"]
  Bridge --> Pump["Pump simulator"]
  Pump --> Verify["Independent verification"]
  Verify --> Audit["TimeMachine and SQLite"]
  Policy --> Audit
  Audit --> Fork["Isolated counterfactual"]

Architecture · Safety policies · Threat model · Register map · MCP tools and connection

Configuration

Variable

Default or purpose

GHOSTBUS_DB

ghostbus.sqlite locally, mounted /data/ghostbus.sqlite in the image

GHOSTBUS_SECURE_COOKIE

Set to 1 behind HTTPS

GHOSTBUS_ORIGIN

Public origin allowed for browser-originated MCP requests

GHOSTBUS_ENABLE_LIVE

0. Set to 1 for a controlled live provider session

GHOSTBUS_LLM_BASE

Chat-completions base URL, defaults to OpenAI's versioned endpoint

GHOSTBUS_LLM_MODEL, GHOSTBUS_LLM_KEY

Optional provider configuration

GHOSTBUS_MCP_TOKEN

Client-side environment variable containing the generated incident bearer token

Use the example environment file with Compose or export the variables for local Uvicorn. Live mode uses an explicitly configured provider compatible with JSON-mode chat completions. Its recommendation still passes through GhostBus policy and authorization.

Verify

cd frontend
npx playwright install chromium
cd ..
./scripts/verify.sh

The verification suite covers policy boundaries, generated state and retry sequences, unauthorized writes, concurrent execution, Modbus TCP interoperability, the SDK MCP lifecycle, persistence, replay, and the complete browser walkthrough. See the verification report for observed results and limits.

Release and Kiro

Deployment · Demo script · Devpost draft · Kiro handoff and submission requirements · Engineering progress

The project uses an illustrative simulator, session-based operator identity, a limited protocol profile, and a single application replica. Audit hashes detect edits under the stated trust model. Release notes describe the remaining public demo and Kiro work. Released under the MIT License.

ORBIT comparison · Capability profile

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      An OT-aware authorization MCP server for OPC UA that applies process-aware policies (value ranges, rate limits, interlocks) to every agent call, enabling safe industrial control with optional human approval workflows.
      31 PyPI
      Apache 2.0
    • A
      license
      B
      quality
      B
      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
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that connects a local LLM to an industrial PLC via Modbus TCP, enabling process reading, alarm correlation, and safe diagnosis with restricted write access through an allowlist. Includes a simulated PLC with real physics for local testing.
      -