Skip to main content
Glama
instrument-index-mcp

instrument-index-mcp

by remiliorc

instrument-index-mcp

An MCP server that gives AI agents read-only access to a plant instrument index. With it, an assistant can answer questions like "which SIL-rated transmitters are overdue for calibration?" or "is 370 degC on TT-229 in alarm?" from structured data, without guessing.

The dataset is synthetic: it is generated from a fixed seed (data.py) and describes no real site, asset or vendor.

Why

Instrument indexes usually live in spreadsheets or engineering databases that LLMs cannot query safely. This server shows the pattern:

  • A domain layer (index.py) with no MCP dependency, unit-tested on its own.

  • A thin MCP layer (server.py) whose tools are all marked readOnlyHint. The database is also opened in SQLite mode=ro, so it cannot be written even through a bug.

  • Engineering logic the model should not improvise: 4-20 mA scaling with NAMUR NE43 fault detection, alarm and range evaluation, ISA-5.1 tag decoding.

  • Errors are MCP errors: an unknown tag or loop returns a tool result with isError: true, so the agent cannot mistake it for data.

Related MCP server: PDF-RAG

Tools

Tool

Purpose

search_instruments

Free text and filters (type, area, status)

get_instrument

Full record for one tag

get_loop

All devices in a control loop

calibration_due

Due or overdue calibrations, flags SIL-rated devices

evaluate_reading

Value → % of span and normal / alarm / out-of-range state

convert_ma

4-20 mA → engineering units, with NE43 diagnostics (failure, under/over-range, undefined band)

explain_tag

Decodes a tag such as PSV-130A, PDT-301 or LSHH-120 (subset of ISA-5.1)

index_summary

Counts by type and status

Run

pip install -e ".[dev]"
pytest -q
python -m instrument_index_mcp.server            # stdio
python -m instrument_index_mcp.server --http     # streamable HTTP on :8000

With Docker:

docker build -t instrument-index-mcp .
docker run --rm -p 127.0.0.1:8000:8000 instrument-index-mcp   # local only: the server has no auth

Claude Desktop / Claude Code (stdio)

{
  "mcpServers": {
    "instrument-index": {
      "command": "python",
      "args": ["-m", "instrument_index_mcp.server"],
      "env": { "INSTRUMENT_DB": "/absolute/path/to/instruments.db" }
    }
  }
}

The database is created automatically on first run if it does not exist.

Notes:

  • Calibration dates are generated around 2026-01-01 and calibration_due compares them with today's date, so the overdue list grows over time.

  • The HTTP transport has no authentication. Bind it to localhost, or put it behind an authenticating proxy before exposing it.

Example prompts

  • "List in-service flow transmitters in area 200 and their signal types."

  • "Which SIL-rated instruments are overdue for calibration?"

  • "PT-269 reads 13.8 mA. What pressure is that, and is it in alarm?"

Compatibility

Works with MCP Python SDK 1.x (FastMCP) and 2.x (MCPServer).

License

MIT

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
      C
      maintenance
      Enables AI agents to look up thermophysical properties — density, viscosity, thermal conductivity, speed of sound, enthalpy, entropy, Cv/Cp and phase — for roughly 76 reference fluids at a given temperature and pressure, or along the liquid/vapor saturation curve, plus fluid listing and name resolution. Each returned value is accompanied by its unit, and out-of-range conditions surface as clear errors.
      65 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to search local component-manual corpora via hybrid semantic, full-text, and substring retrieval with table recognition and OCR fallback for scanned pages. Provides tools for literal/regex grepping, reading single or multiple pages, navigating bookmarks and outlines, listing categories and indexed files, and checking index and dependency status.
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents and LLM clients to securely query and write PI time-series archives, AF asset databases, elements, attributes, and summaries through standard tool calls, with optional off-by-default tools for building and maintaining AF structures and dry-run modifications.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to inspect industrial devices read-only over Modbus TCP and OPC UA, including reading and watching values, browsing nodes, decoding registers, and diagnosing connection issues without any write capability.
      Apache 2.0