Skip to main content
Glama

ClinGate

MCP-Native Human-in-the-Loop Gateway for Autonomous Clinical AI Agents

ClinGate is an open-source MCP (Model Context Protocol) gateway that sits between any AI agent framework and the clinical tools it calls, classifies every action by risk in real time, and forces a human decision before anything irreversible reaches a patient record.

Architecture

The agent never talks to the real EHR/tool API directly — it only ever sees ClinGate's MCP tool surface. ClinGate proxies the actual call through to the downstream tool only after a decision (auto-clear or human approval) is reached.

 ┌────────────────────┐        MCP tool calls        ┌──────────────────────┐
 │  Agent Orchestrator │ ───────────────────────────▶ │      ClinGate        │
 │ (LangGraph/CrewAI/  │                              │   MCP Gateway Server │
 │   AutoGen/custom)   │ ◀─────────────────────────── │                       │
 └────────────────────┘     approved / blocked        └──────────┬───────────┘
                                                                   │
                                        ┌──────────────────────────┼───────────────────────────┐
                                        ▼                          ▼                           ▼
                              ┌──────────────────┐      ┌───────────────────┐       ┌────────────────────┐
                              │  Rule Engine      │      │  LLM Risk          │       │  Audit Ledger       │
                              │ (deterministic     │      │  Classifier        │       │  (SQLite, append-  │
                              │  policy DSL)       │      │ (severity + reason)│       │  only, exportable)  │
                              └──────────────────┘      └───────────────────┘       └────────────────────┘
                                        │                          │
                                        └────────────┬─────────────┘
                                                      ▼
                                          ┌───────────────────────┐
                                          │  Escalation Queue +    │
                                          │  Review Dashboard      │
                                          │  (HTML/JS)             │
                                          └───────────────────────┘

Related MCP server: promptspeak-mcp-server

Regulatory Grounding

This gateway directly addresses the human-oversight patterns expected by modern regulatory frameworks:

Requirement

Article / Guidance

How ClinGate addresses it

Human oversight capability

EU AI Act Art. 14

Escalation queue with hard stop before execution

Record-keeping / logging

EU AI Act Art. 12

Structured, exportable audit ledger per action

Deployer oversight assignment

EU AI Act Art. 26

Reviewer role explicitly modeled, not implicit

Risk management system

EU AI Act Art. 9

Configurable risk taxonomy + policy rules

AI as Medical Device oversight

UK MHRA guidance

SaMD change-control proxy for agent actions

Vendor oversight evidence

NHS DTAC

Dashboard + audit export provides ready evidence


Quickstart

ClinGate ships as a single stack including the MCP server, the audit store, and a minimal review dashboard.

git clone https://github.com/vilsee/clingate.git
cd clingate

# Build and start the MCP server, SQLite store, and UI
docker compose up --build
  • The Review Dashboard and UI is available at http://localhost:8000/.

  • The MCP Server uses SSE and HTTP mounts to intercept tool calls.


Implemented Features vs Roadmap

We built ClinGate prioritizing a robust, end-to-end MVP that correctly classifies risks across real APIs.

Implemented Features (Live Today)

  1. Classifier Disagreement Signal: Logs when the deterministic rule engine and the fallback LLM risk classifier would have made different decisions. This prevents silent alignment failures by highlighting edge-case behaviors to reviewers.

  2. SLA Breach Failsafe: A background daemon that automatically transitions unreviewed ESCALATE items into SLA_BREACH_BLOCK if human reviewers fail to act within a defined timeframe. Actions never sit in limbo.

  3. Real-Data Integrations: openFDA (drug scheduling), HAPI FHIR (patient context), and ClinicalTrials.gov (referral grounding).

Roadmap Stubs (To Be Implemented)

These features are explicitly documented as stubs in the source code to facilitate future roadmap development:

  • Clinical Trials Context Matching: Query ClinicalTrials.gov and attach currently recruiting, localized trials to any blocked medication order to provide alternatives.

  • FHIR Resource Validation: Validate outgoing tool arguments against active FHIR R4 profiles to ensure payload schema compliance before reaching the real system.

  • Reviewer Delegation Rules: Route specific ESCALATE items to specific specialist queues rather than a global pool.

  • Agent Feedback Loop: Send natural language explanations of a BLOCK decision back to the autonomous agent, giving it the opportunity to self-correct.

F
license - not found
-
quality - not tested
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
    -
    quality
    D
    maintenance
    Human-in-the-Loop authorization gateway for AI Agents. Securely pause MCP workflows and route high-risk actions to human approvers via Slack or Email.
    Last updated
    51
    1
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    A fail-closed cryptographic gate for the MCP tool-call boundary that intercepts tools/call requests, evaluates a policy, and either forwards or denies the call with signed receipts, providing tamper-evident evidence for AI agent actions.
    Last updated
    52
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid

  • Six-gate governance for AI agents: PROCEED/PAUSE/HALT decisions with hash-chained audit trails.

  • Runtime AI governance: decision gates, human approval, hash-chained audit, compliance mapping.

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/Vilsee/clingate'

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