sentinel-mcp
Allows review of Bitbucket pull requests using static analysis, local LLM explanations, and validated auto-fix patches.
Allows review of GitHub pull requests, including security and bug analysis, severity scoring, and optionally opening validated auto-fix PRs.
Allows review of GitLab merge requests using the same analyzer, LLM, and auto-fix pipeline as other providers.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
# Sentinel 🛡ï¸
AI can suggest. Evidence decides.
Sentinel is an open-source, local-first security and code-review agent for repositories, pull requests, and merge requests.
It detects security issues, explains them using AI, proposes fixes, validates those fixes, and produces evidence-backed results.
DETECT → EXPLAIN → FIX → VERIFY → SHIPThe difference
Sentinel does not allow an AI model to decide whether a security finding is fixed.
AI can:
explain a finding
reason about potential impact
suggest remediation
generate a candidate patch
But AI cannot manufacture the final verdict.
Sentinel uses evidence to determine:
VERIFIED
INCOMPLETE
FAILEDIf required evidence is unavailable, Sentinel reports:
INCOMPLETEIt never converts missing evidence into a fake PASS.
Why Sentinel?
AI-generated code is becoming increasingly common.
That creates a new problem:
How do we verify that an AI-generated security fix actually works?
Sentinel approaches the problem as an evidence pipeline:
Repository / PR
↓
DETECT
↓
EXPLAIN
↓
FIX
↓
VERIFY
↓
SHIPVerification can include:
static analysis
security rules
syntax validation
test execution
security regression checks
analyzer results
rule verification
patch validation
The final verdict is produced by the evidence engine — not by the LLM.
Related MCP server: code-review-mcp-server
Local-first AI
Sentinel can use local LLMs through Ollama.
Your source code does not need to leave your machine for the AI explanation layer when using a local provider.
OpenAI-compatible providers can also be configured when remote inference is appropriate.
Current analyzers
Sentinel currently supports:
Bandit
Ruff
Sentinel custom security rules
optional Semgrep
rule-book verification
AST-based analysis where supported
Analyzer availability is explicit.
For example:
✓ Bandit
✓ Ruff
✓ Sentinel Rules
✗ Semgrep
Result:
INCOMPLETESentinel does not treat an unavailable analyzer as a successful security check.
Rule books
Sentinel currently includes open rule books for:
Python
JavaScript
SQL
Rules contain:
author attribution
explanation
vulnerable examples
safe examples
detection logic
verification metadata
A rule is not considered verified simply because it was written.
It must pass its verification gates.
Benchmark
Sentinel includes a security benchmark and regression corpus.
The benchmark currently contains:
10 security rules
35 security samplesThe benchmark itself found real defects in Sentinel's security rules.
For example:
a secret-detection rule missed specific modern API-key formats
an SQL-injection rule produced false positives for parameterized queries while missing a string-concatenation case
Those issues were fixed and pinned with regression tests.
Current benchmark result:
Precision: 1.00
Recall: 1.00The benchmark is continuously tested so regressions fail CI.
Trust model
Sentinel follows a simple principle:
Missing evidence is not evidence of success.
Therefore:
VERIFIEDmeans the required verification gates passed.
INCOMPLETEmeans required evidence was unavailable or could not be collected.
FAILEDmeans a validation or verification step explicitly failed.
Sentinel does not turn uncertainty into confidence.
Open source
Sentinel is being developed openly.
The goal is not to build another black-box AI security reviewer.
The goal is to build a security agent where developers can inspect:
detection rules
evidence
verification logic
generated patches
test cases
benchmarks
security assumptions
known limitations
and challenge them.
Current limitations
Sentinel is actively evolving.
Known limitations include areas such as:
deeper interprocedural data-flow analysis
additional programming languages
container security
infrastructure-as-code analysis
dependency security
sandboxed test execution
enterprise authentication
expanded rule marketplace capabilities
These limitations are documented rather than hidden.
See KNOWN_LIMITATIONS.md for the detailed, honest inventory.
The principle
AI can suggest a fix.
AI can explain a vulnerability.
AI can generate code.
But before Sentinel says:
VERIFIEDit asks:
Where is the evidence?
Quick start
# Install from source
git clone https://github.com/Magudapa/sentinel-code-agent.git
cd sentinel-code-agent
pip install -e ".[dev]"
# 1. Pull a local model (free, offline-capable)
ollama pull qwen2.5-coder:7b
# 2. Review a pull request
sentinel review --provider github --repo owner/repo --pr 42
# 3. Review a local diff (no network at all)
git diff HEAD~1 | sentinel review --diff -
# 4. Benchmark rule quality against the regression corpus
sentinel benchmarkOutput: human Markdown, JSON, and standard SARIF (works with GitHub code scanning).
Docs
SENTINEL_TRUST_INVARIANTS.md — the evidence/verdict contract, test-enforced
SENTINEL_SECURITY_MODEL.md — security & trust model, implemented controls
KNOWN_LIMITATIONS.md — honest inventory of what Sentinel does not do (yet)
SENTINEL_API_SPEC.md — REST API spec (
sentinel serve, FastAPI, localhost-first)SENTINEL_THREAT_MODEL.md — threat model and our core guard
BRD.md — design decisions & full backlog
ARCHITECTURE.md — architecture (informed by 20+ leading open-source AI repos)
Development
pip install -e ".[dev]"
pytest # run tests
ruff check . # lint
bandit -q -r sentinel -x sentinel/tests -c pyproject.toml # security lint (CI config)
sentinel benchmark # regression corpus: precision/recall gatesRoadmap
Status of the BRD → production milestones:
# | Milestone | Status |
M1 | BRD | ✅ |
M2 | Scaffold (LICENSE, CI, packaging) | ✅ |
M3 | Providers (GitHub/GitLab/local) + analyzers (custom rules, Bandit, Ruff) | ✅ |
M4 | Local-first model layer (Ollama + OpenAI-compatible) | ✅ |
M5 | Reviewer pipeline + CLI (markdown/JSON/SARIF) | ✅ |
M6 | Auto-fix (validated patches, export + GitHub fix PR) | ✅ |
M7 | Codebase memory (fixed-before recall) | ✅ |
M8 | MCP server ( | ✅ |
M9 | Web surface — Phase-0 REST API ( | ✅ |
M10 | Tests + docs + lint/bandit green | ✅ |
M11 | Docker image + GitHub Action + | 🔜 |
M12 | PyPI release | 🔜 |
M13 | AI-verified rule books (Python/JS/SQL) + | ✅ |
M14 | Phase-0 REST API ( | ✅ |
M15 | Trust verdict ( | ✅ |
Contributing
Open issues/PRs. Ideas wanted: Bitbucket provider, Semgrep rules plugin, pip-audit
dependency analysis, Chrome-extension-like IDE hints, webhook daemon (sentinel watch).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
IaC, CI and dependency security review for coding agents: local scan CLI plus hosted OAuth MCP.
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables code review operations on GitHub and GitLab, including fetching pull/merge requests, viewing diffs, adding comments, analyzing code quality, and creating merge requests directly from your MCP client.1529 npm4MIT
- AlicenseNot gradedqualityCmaintenanceEnables automated code review and GitHub PR commenting through MCP integration.1,175 npm9MIT
- AlicenseAqualityDmaintenanceProvides GitHub PR review capabilities to LLMs, enabling automated PR analysis, review submission, and inline commenting via MCP.1422 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables pull request review, risk rating, and improvement suggestions directly inside MCP clients by pasting a GitLab/GitHub URL; it can post review comments back to the PR/MR.1MIT