Sentinel MCP - agent safety

Build safer agent-driven workflows.

Sentinel is a three-stage guardrail for LLM-powered coding assistants. It reviews commands, file writes, and git operations before execution, with an interactive control panel for rules, models, MCP servers, and audit decisions.

agent-session
$

Watch the intro

See Sentinel review a command in real time.

A short walkthrough of the problem, the pipeline, and the dashboard.

The problem

Agents do not just write code anymore. They run it.

A coding agent that can execute commands can also run the wrong one: a hallucinated rm -rf /, a force-push it was not asked for, or a request that exports user data. Sentinel reviews the action before it reaches your machine.

rm -rf /BLOCK git push --forceBLOCK curl .../export-usersREVIEW git statusALLOW

How it works

Three checks, cheapest and most reliable first.

01

Rules Engine

Instant pattern matching blocks known-dangerous actions and allows known-safe ones without a model call.

02

Trained Classifier

An offline classifier resolves confident middle-ground decisions quickly with an explainable risk signal.

03

LLM Reviewer

Only genuinely ambiguous actions reach the final reviewer, using local Ollama by default or a configured provider.

rm -rf ./build
BLOCK

Matched a hard-blocked pattern. Stopped instantly.

REVIEW

Ambiguous action escalated for context-aware review.

ALLOW

Clearly safe action approved without delay.

What the dashboard gives you

Guardrails you can inspect, tune, and trust.

Rules engine

Instant block and allow patterns, including regex support.

Offline classifier

A fast local Stage 2 decision layer for routine actions.

LLM escalation

Escalate only ambiguous actions to the Stage 3 reviewer.

MCP support

Connect through stdio for local tools or SSE for web clients.

Live dashboard

Watch pipeline stages, transport status, and guardrail metrics.

Audit log

Review live ALLOW, BLOCK, and REVIEW decisions in one feed.

Configurable models

Choose local Ollama models or an API provider from Model Settings.

Local-first privacy

Keep action text on your machine when using a local model.

The control panel

The same control panel your agent workflow runs through.

The dashboard shows the three-stage pipeline in real time, lets you test an action, manage safety rules, select a model, register MCP servers, and export a ready-to-paste connection configuration.

Get started

From install to protected workflow in five simple steps.

  1. Clone the repository. git clone https://github.com/fncreator22/sentinel-mcp.git
  2. One-click launch. Double-click start.bat (Windows) or run python main.py to launch the API (port 8000), SSE server (port 8002), and Live Dashboard (port 8080).
  3. Open your client config. Open claude_desktop_config.json or your IDE's MCP settings panel.
  4. Paste the Sentinel MCP snippet. Copy the pre-filled JSON or SSE URL (http://localhost:8002/sse) from the dashboard's Connect button.
  5. Verify & protect. Relaunch your client and look for the blue sentinel running status badge. Every action is now protected!

Built with

PythonFastAPIscikit-learnOllamaSQLiteMCPVanilla JS

No agent framework dependency. The local-first model path keeps action text on your machine, while optional API providers are available when you need them.

Build safer agent-driven development workflows.

Rules first. Context when it matters. A clear decision every time.

Get Sentinel MCP on GitHub