Lab Quality Control Agents
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Lab Quality Control AgentsEvaluate this glucose QC run on Cobas c502 and hold patient results if it fails Westgard"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Lab Quality Control Agents
Agentic quality control for clinical laboratories. Control results arrive from the LIS or instrument middleware (HL7 v2 ORU^R01, ASTM E1394, or JSON), are scored against their targets and evaluated with the Westgard multirule procedure. A rejected run places a hold on patient-result release for that analyte and instrument, and a set of agents investigates the failure, ranks root causes from instrument events and lot changes, and proposes a CAPA. A supervisor signs the CAPA, staff perform the corrective action, the verification agent applies verification run rules, and only a supervisor's closing signature lifts the hold. No agent releases results on its own.
QC event ─▶ Westgard evaluation ─▶ Hold ─▶ Investigation agent ─▶ Root cause ranking
─▶ Corrective action agent (CAPA proposed) ─▶ Supervisor approval (e-signature)
─▶ Action performed (e-signature) ─▶ Verification agent ─▶ Supervisor closure ─▶ Hold liftedCapabilities
Capability | Implementation |
Westgard multirule | 1_2s (warning), 1_3s, 2_2s, R_4s, 4_1s, 10_x within runs, across runs per level and across levels and runs; every violation includes a current-run result; per-target rule selection |
Levey-Jennings | Control limits (±1/2/3 SD), z-scored points with rule flags, observed mean/SD/CV and bias |
Target establishment | Laboratory mean and SD from ≥20 baseline values (CLSI C24), sample SD |
Sigma metrics | σ = (TEa% − |bias%|) / CV%, TEa from the analyte catalogue (greater of % and absolute), Westgard Sigma Rules recommendation (rules, N, R) |
HL7 v2 | Full delimiter, repetition, component, subcomponent and escape handling; ORU^R01 QC profile (SPM-11 |
ASTM | E1381 frames (checksum, frame sequence, ETB continuation) and E1394 H/P/O/R/C/L records; QC by H-12 |
Patient-data guard | Messages carrying patient identifiers (PID, ASTM P) or non-control specimens are refused; policy denies RESTRICTED data |
Investigation agent | Deterministic, explainable root-cause scoring over calibration, maintenance, reagent/control lot changes, faults, cross-analyte failures and calibration age; patient-impact window from the last accepted run |
Narrative | Optional model summary via the agentic-core |
CAPA | Proposed → approved → action completed → verified → closed (or rejected); 21 CFR Part 11 style signatures with record digest; separation of duties |
Verification rules | Complete runs at all levels after the action, all results within ±2 SD, no rejection rule across verification runs, residual bias check for systematic errors |
Identity | agent-identity-fabric credentials (introspection, |
MCP | Official |
A2A | Agent card at |
Audit | agentic-core hash-chained, Ed25519-signed audit log for every decision and state change |
Observability | Prometheus metrics, OpenTelemetry traces, JSON logs with correlation IDs, alert rules, Grafana dashboard |
Related MCP server: sbe-agent
Quick start (local)
Requires Docker. No API keys or cloud credentials are needed.
docker compose up --build
curl -s localhost:8080/.well-known/agent-card.json | jq .skills[].idThe compose stack runs PostgreSQL, an OIDC provider standing in for the enterprise IdP, and an OpenTelemetry collector.
Development
uv sync
make check # ruff, black, mypy --strict, bandit, contracts, tests (coverage >= 90%)
make integration # PostgreSQL integration tests (needs LABQC_TEST_DATABASE_URL)Test suites: tests/unit (Westgard worked examples, statistics, HL7, ASTM,
investigation, CAPA, verification), tests/security (threat-model cases),
tests/chaos (dependency failures), tests/performance (latency budgets;
locustfile.py for load), tests/e2e (HTTP, MCP and A2A lifecycles and a
property-based OpenAPI contract test), tests/integration (PostgreSQL).
API
Endpoint | Caller | Purpose |
| Interface engine, technologist, agent | Ingest and evaluate QC runs |
| Staff, auditors, agents | Run evaluations |
| Supervisor (write) | Control targets |
| Staff, agents | Statistics |
| Interface engine, technologist | Calibration, maintenance, lots, faults |
| LIS, staff | Patient-result release holds |
| Staff, agents | Root cause investigations |
| Staff, supervisor | CAPA workflow |
| Agent runtimes | MCP tools |
| Other agents | A2A |
| Platform | Operations |
Full contract: docs/api/openapi.json; JSON Schemas in schemas/.
Deployment
Layer | Location |
Container image |
|
Helm chart |
|
Namespace and secret sync |
|
Cloud infrastructure |
|
See the startup runbook.
Documentation
QC method reference (rules, statistics, interface profiles, worked examples)
Runbooks: startup, monitoring, incident response, QC failure handling, rollback, disaster recovery
Shared controls (policy engine, audit chain, model routing, content guard, logging, telemetry) come from agentic-core.
License
Apache-2.0
This server cannot be deployed
Maintenance
Related MCP Connectors
Human-in-the-loop review and approval for AI agents. Audit trail, approval policies, native MCP.
Connect, monitor, and control AI agents — tasks, approvals, schedules, and governance.
QA platform for agents: coverage signals, in-repo test plans, verified tests and release governance.
Deterministic compliance and vertical knowledge bases for autonomous agents. Free 24hr trial.
Related MCP Servers
- AlicenseBqualityAmaintenanceHelps teams standardize implementation quality with project-aware rules, code review, health scoring, and an active agent workflow for intake, planning, verification, and release.16171 npmGPL 3.0
- FlicenseNot gradedqualityBmaintenanceEnables users to chat with an LLM agent that creates and reads Word, Excel, PDF, and JSON files, and accesses databases (letters, documents, LIMS) according to user permissions.-
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to query and manage a GxP computerized system inventory as a knowledge graph, including blast-radius impact analysis, regulatory lineage, validation-gap detection, audit-trail-compliant status change approvals, and periodic review generation.-
- AlicenseNot gradedqualityDmaintenanceEnables healthcare systems to parse HL7 v2 messages, convert them to FHIR R4 Bundles, validate FHIR resources, and detect/govern PHI with HIPAA, EU MDR, and GDPR compliance evidence for AI governance.MIT