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.
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., "@sentinel-mcpReview PR #42 in owner/repo for security issues"
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.
# 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).
This server cannot be deployed
Maintenance
Related MCP Connectors
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables 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.158 npm4MIT
- AlicenseNot gradedqualityAmaintenanceEnables automated code review and GitHub PR commenting through MCP integration.195 npm9MIT
- FlicenseNot gradedqualityDmaintenanceEnables automated AI-powered code review for pull requests across GitHub, GitLab, Bitbucket, and Azure DevOps via webhooks, and manual code review through MCP tools using Groq, Claude, or GPT-4.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to fetch GitHub pull request diffs and metadata, and post review comments directly through the MCP protocol.1MIT