Skip to main content
Glama
Younes-Alaoui-Ismaili

mcp-live-telemetry

mcp-live-telemetry banner

mcp-live-telemetry

CI License: MIT

A Model Context Protocol server that exposes live industrial IoT telemetry to any MCP client. It streams simulated sensor data from a small fleet of machines, detects anomalies against per device thresholds, and lets you inject a fault on demand so the whole loop is visible in a single session.

The simulator is deliberately isolated behind a thin boundary so it can be swapped for a real data source without touching the tools. See Adapting this to your data source.

Illustration of a stdio MCP session: list devices, inject a fault, detect it

An illustration, not a screen capture. Readings are a function of the current timestamp, so every run prints different numbers. The unedited output of a real run is below.

A real session, end to end

The block below is the unedited output of npm run smoke, which drives the built server as a real subprocess over stdio using the MCP client SDK. It is not an in-process shortcut, and it is not a transcript written by hand.

$ npm run smoke

> mcp-live-telemetry@0.1.0 smoke
> node scripts/smoke.mjs

mcp-live-telemetry 0.1.0 running on stdio
connected. tools: list_devices, get_telemetry, get_anomalies, simulate_fault

--- list_devices ---
{
  "count": 4,
  "devices": [
    {
      "id": "press-01",
      "name": "Hydraulic Press",
      "state": "running",
      "temperature_c": 65.5,
      "vibration_mm_s": 2.116,
      "timestamp": 1785240876420
    },
    {
      "id": "spindle-02",
      "name": "CNC Spindle",
      "state": "running",
      "temperature_c": 51.67,
      "vibration_mm_s": 1.411,
      "timestamp": 1785240876420
    },
    {
      "id": "conveyor-03",
      "name": "Conveyor Motor",
      "state": "running",
      "temperature_c": 42.74,
      "vibration_mm_s": 0.943,
      "timestamp": 1785240876420
    },
    {
      "id": "pump-04",
      "name": "Coolant Pump",
      "state": "running",
      "temperature_c": 57.42,
      "vibration_mm_s": 1.796,
      "timestamp": 1785240876420
    }
  ]
}

--- simulate_fault press-01 overheat ---
Injected overheat fault on press-01, active until 2026-07-28T12:19:36.425Z. Call get_anomalies or get_telemetry to see it.

{
  "id": "fault-1-press-01",
  "device_id": "press-01",
  "type": "overheat",
  "started_at": 1785240756425,
  "ends_at": 1785241176425,
  "duration_ms": 300000
}

--- get_anomalies press-01 ---
{
  "count": 1,
  "window": {
    "start": 1785239976428,
    "end": 1785240876428,
    "step_ms": 30000
  },
  "anomalies": [
    {
      "id": "press-01:temperature:1785240756428",
      "device_id": "press-01",
      "metric": "temperature",
      "started_at": 1785240756428,
      "ended_at": 1785240876428,
      "peak_value": 93.79,
      "threshold": 77,
      "sample_count": 5
    }
  ]
}

smoke ok

A healthy fleet stays under its thresholds. The injected fault crosses one, and the anomaly surfaces in the same session, through the same tools an MCP client would call. Run it yourself and the numbers will differ: they are derived from the clock, and only the behaviour is fixed.

Related MCP server: GridWatch MCP

Tools

Tool

Description

Read only

list_devices

List every machine with its latest reading and state.

yes

get_telemetry

Time ordered readings for one device across a window, with pagination.

yes

get_anomalies

Threshold crossings (temperature or vibration) over a window.

yes

simulate_fault

Inject a fault (overheat, vibration, or combined) so it surfaces live.

no

Each tool ships a strict Zod input schema, a documented output schema, and behaviour annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint).

A dashboard that consumes this server

Industrial Telemetry Dashboard is a supervision screen whose live source reads this server. It calls the four tools above through a small local bridge, which speaks MCP over stdio to the server and serves the tool results to the page over HTTP, mapping devices, readings and detected anomalies onto a plant view with threshold alarms and acknowledgement. That mode is implemented and covered by the dashboard's tests, on both sides of the bridge.

Live demo

The published demo does not read this server. It runs on the dashboard's own built-in simulator, which is why it needs nothing installed. The live source is used from a local build instead: a browser blocks a page served over https from reaching a service on http://localhost, and the bridge is local by design.

Quickstart

npm install
npm run build
npm start

npm start runs the server on stdio. To try it interactively, use the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js

Or run a scripted end to end session against the built server:

npm run smoke

Use it from Claude Desktop

Add the server to your Claude Desktop config (claude_desktop_config.json), using an absolute path to the built entry point. A ready to edit example lives in demo/mcp-config.example.json:

{
  "mcpServers": {
    "live-telemetry": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-live-telemetry/dist/index.js"]
    }
  }
}

Restart Claude Desktop, then ask it to list devices, pull telemetry for one of them, inject a fault, and check anomalies.

Adapting this to your data source

The simulator lives entirely under src/simulator/ and is reached only through the Simulator facade in src/simulator/store.ts. To point this server at real hardware or an existing API, replace the body of that facade (listDevices, getTelemetry, getAnomalies, simulateFault) with calls to your backend, for example a historian, an MQTT broker, or a REST endpoint. The four tools, their schemas, and their output shapes stay exactly the same, so an MCP client that works against the simulator works unchanged against your data.

Development

npm test          # run the vitest suite
npm run test:cov  # run tests with coverage thresholds
npm run lint      # eslint
npm run build     # type check and emit dist/

A step by step live demo script is in docs/DEMO.md.

How the simulation works

Readings are a pure function of (seed, device id, timestamp), so any time window is fully reproducible and a sub window always agrees with the wider window on shared timestamps. A healthy machine stays under its anomaly threshold under normal noise; an injected fault always crosses it. Faults are treated as having started two minutes before injection, so they are visible in recent telemetry immediately.

License

MIT. See LICENSE.

Available Tools

4 tools
get_anomaliesGet anomaliesA
Read-onlyIdempotent

Detect threshold crossings (temperature or vibration) over a time window.

Inputs: device_id (optional, omit to scan all devices), start and end (epoch ms, optional, default last 15 minutes), step_ms (default 30000), response_format. Returns { count, window, anomalies: [{ id, device_id, metric, started_at, ended_at, peak_value, threshold, sample_count }] }. A healthy machine returns no anomalies. Read only.

ParametersJSON Schema
NameRequiredDescriptionDefault
endNoWindow end (epoch ms). Defaults to now.
startNoWindow start (epoch ms). Defaults to end minus 15 minutes.
step_msNoSampling step in milliseconds.
device_idNoRestrict to one device. Omit to scan every device.
response_formatNoText output format: 'markdown' (default, human readable) or 'json'.markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYes
windowYes
anomaliesYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false. The description reinforces that the tool is read-only and adds behavioral context: 'A healthy machine returns no anomalies.' It also outlines the return structure, which is consistent with annotations. No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two short paragraphs. The first sentence states the purpose, followed by input details and return structure. Every sentence adds value, and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose, parameters, and return structure. With an output schema present, the explanation of return values is sufficient. However, it could briefly explain how step_ms affects anomaly detection granularity, so it is not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description repeats defaults and options already present in the schema (e.g., device_id optional, step_ms default 30000, response_format). It adds minimal extra meaning beyond the schema, so a score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool detects threshold crossings for temperature or vibration over a time window. It lists inputs and output structure, and the verb 'Detect' with resource 'anomalies' is specific. It distinguishes from siblings like list_devices and get_telemetry which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use the tool (detect anomalies) and implies that healthy machines return no anomalies. However, it does not explicitly state when not to use it or mention alternatives like get_telemetry for raw telemetry data. Still, the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_telemetryGet telemetryA
Read-onlyIdempotent

Return time ordered sensor readings for one device across a time window.

Inputs: device_id (required), start and end (epoch ms, optional, default last 15 minutes), step_ms (default 30000), limit and offset for pagination, response_format. Returns { device_id, start, end, step_ms, total, count, offset, has_more, next_offset?, readings: [{ timestamp, temperature_c, vibration_mm_s, state }] }. Read only.

ParametersJSON Schema
NameRequiredDescriptionDefault
endNoWindow end (epoch ms). Defaults to now.
limitNoMax readings returned (pagination).
startNoWindow start (epoch ms). Defaults to end minus 15 minutes.
offsetNoReadings to skip (pagination).
step_msNoSampling step in milliseconds (1000 to 3600000).
device_idYesDevice id, for example 'press-01'. Call list_devices for valid ids.
response_formatNoText output format: 'markdown' (default, human readable) or 'json'.markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
endYes
countYes
startYes
totalYes
offsetYes
step_msYes
has_moreYes
readingsYes
device_idYes
next_offsetNo

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds significant behavioral context beyond annotations: it confirms read-only nature ('Read only'), explains pagination details (has_more, next_offset), and specifies defaults for time window and step. Annotations already indicate readOnlyHint, idempotentHint, and non-destructive, but the description enriches with concrete runtime behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: three sentences covering purpose, inputs, and output. Front-loads the primary action, then efficiently enumerates parameters and return shape. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 7 parameters and an output schema, the description is quite complete: it specifies all inputs with defaults, explains pagination, and details the return object including nested readings. Minor omission: the meaning of readings fields like 'state' could be elaborated, but output schema existence mitigates this.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with each parameter having a description in the schema. The tool description summarizes parameters but does not add substantial new meaning beyond the schema. It lists the key parameters and defaults but lacks additional semantics like edge cases or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Return time ordered sensor readings for one device across a time window.' It uses a specific verb (Return) and resource (sensor readings), and distinguishes it from sibling tools like list_devices (lists devices) and get_anomalies (returns anomalies).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide explicit guidance on when to use this tool versus alternatives, nor does it state when not to use it. It only describes the tool's function without contextualizing its place among siblings like list_devices or get_anomalies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_devicesList devicesA
Read-onlyIdempotent

List every simulated machine with its latest reading and state.

Returns { count, devices: [{ id, name, state, temperature_c, vibration_mm_s, timestamp }] }. Read only. Use this first to discover valid device ids for the other tools.

ParametersJSON Schema
NameRequiredDescriptionDefault
response_formatNoText output format: 'markdown' (default, human readable) or 'json'.markdown

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYes
devicesYes

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description explicitly states 'Read only', consistent with annotations (readOnlyHint=true, idempotentHint=true, destructiveHint=false). It adds value by describing the return structure, including fields like temperature_c and vibration_mm_s.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with purpose, and includes the return structure. Every sentence adds value with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explicitly lists the return schema fields, which is sufficient even though an output schema exists. It covers all necessary aspects for a simple list tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the parameter (response_format) is well-documented in the schema with enum values and default. The description does not add extra meaning beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List every simulated machine with its latest reading and state', providing a specific verb and resource. It distinguishes itself from sibling tools by positioning itself as the initial discovery tool for device IDs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Read only. Use this first to discover valid device ids for the other tools', providing clear guidance on when and how to use this tool relative to its siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

simulate_faultSimulate faultA

Inject a fault on a device so it becomes visible to get_telemetry and get_anomalies.

Inputs: device_id (required), fault_type ('overheat' | 'vibration' | 'combined', default 'overheat'), duration_seconds (default 300). The fault is treated as having started two minutes ago so it appears immediately in recent telemetry. Returns { fault: { id, device_id, type, started_at, ends_at, duration_ms }, message }. This tool mutates simulator state; it is not read only.

ParametersJSON Schema
NameRequiredDescriptionDefault
device_idYesDevice to fault. Call list_devices for valid ids.
fault_typeNooverheat: temperature spike; vibration: vibration spike; combined: both.overheat
duration_secondsNoHow long the fault stays active from now, in seconds (10 to 3600).

Output Schema

ParametersJSON Schema
NameRequiredDescription
faultYes
messageYes

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses key behavioral traits beyond annotations: the fault is treated as having started two minutes ago, it mutates simulator state, and returns a fault object with timing fields. This adds value to the readOnlyHint=false annotation without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with two clear paragraphs: purpose and parameter list in the first, behavioral nuance and return format in the second. Every sentence adds value, and information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutation with temporal effects, non-trivial return), the description provides purpose, parameters, behavioral context, and return structure. It is sufficient for an agent to correctly invoke and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with good descriptions. The description restates parameters and defaults, and adds the crucial timing behavior ('started two minutes ago') that affects how duration_seconds interacts with telemetry. This goes beyond schema, but doesn't add syntax details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool injects a fault on a device, making it visible to get_telemetry and get_anomalies. The verb 'Inject' and resource 'fault on a device' are specific, and the purpose distinguishes it from read-only sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains that the tool is for making faults appear in telemetry and anomalies, and explicitly states it is not read only. While it doesn't list explicit when-not-to-use conditions, the context of siblings and the mutation warning sufficiently guide usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a unique and clearly distinct purpose: listing devices, retrieving telemetry, detecting anomalies, and injecting faults. There is no overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (list_devices, get_telemetry, get_anomalies, simulate_fault), making them predictable and easy to learn.

Tool Count5/5

With 4 tools, the set is concise but covers all essential operations for a telemetry monitoring and simulation domain. Each tool serves a necessary role without redundancy.

Completeness4/5

The tool surface covers listing, reading telemetry, anomaly detection, and fault injection. A minor gap is the absence of a tool to cancel an active fault, though faults self-reset after a given duration.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server exposing distributed industrial asset data (battery storage, EV chargers, solar arrays) with tools for asset status, geospatial search, alerts, anomaly explanation, and load simulation.
    516
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes industrial motor telemetry data to AI agents via MCP and REST, enabling natural-language queries about motor status, health, and alerts. Provides a single tool and resource for retrieving real-time motor metrics and escalating critical conditions.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Exposes digital twin device data capabilities as MCP tools, allowing MCP clients to query device status, read real-time metrics, fetch time-series data, and check alerts. Includes a simulated PLC driver with a clean interface for connecting real devices via OPC-UA, Modbus, or gateway APIs.
    6
    MIT

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/Younes-Alaoui-Ismaili/mcp-live-telemetry'

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