Sentinel
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., "@SentinelWhich tool calls are waiting for my approval?"
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
A self-hosted governance layer for MCP servers. Sentinel sits between your AI agents and the tools they call, evaluates every request against your policies, and writes an audit trail of what happened.
Runs entirely on your own machine. Postgres is the only hard dependency — no API keys, no cloud account, no phoning home.
agent ──▶ Sentinel proxy ──▶ policy engine ──▶ MCP server
│
└──▶ audit logWhy this exists
If you give an agent a set of MCP tools, you have handed it the ability to act. Most setups have no answer to three questions:
Which tools is this agent allowed to call, under which conditions?
What did it actually do?
Who approved the thing that touched production?
Sentinel answers all three with a policy engine that evaluates conditions per call, an append-only audit log with before/after snapshots, and an approval workflow for anything you flag as sensitive.
Related MCP server: AISentinel
What's in the box
Policy engine | ALLOW/DENY rules with condition trees. DENY always wins — it cannot be overridden by a later ALLOW |
Conditions | Two modes: SIMPLE (flat array) and ADVANCED (nested AND/OR expression trees) |
MCP proxy | Multi-transport: HTTP, STDIO, WebSocket, SSE |
Audit log | Every tool call, policy change, auth event, and admin action, with before/after snapshots |
Multi-tenancy | Organizations → workspaces → members, scoped at the query layer |
Approvals | Flag tools as sensitive; calls block pending human approval |
Credentials | AES-256-GCM encryption at rest for upstream server credentials |
Admin MCP server | 40 tools so an agent can administer Sentinel itself |
A2A proxy | Agent-to-Agent protocol support |
Web UI | Full admin and user console |
Quick start
Requires Node 20+, pnpm, and Postgres.
git clone https://github.com/gong8/sentinel-oss.git
cd sentinel-oss
cp .env.example .env # generate secrets, point DATABASE_URL at your Postgres
pnpm setup # install, generate client, push schema, seed
pnpm devNeed a Postgres? docker compose up -d postgres starts one.
That gets you:
Service | URL |
Web console | |
Docs site | |
API | |
MCP proxy | |
Admin MCP |
The seed creates an Acme Corporation org with three users and prints their access tokens. Run
pnpm db:creds any time to print them again.
Point an agent at it
Add the proxy to your MCP client config:
{
"mcpServers": {
"sentinel": {
"url": "http://localhost:3001/mcp",
"headers": { "Authorization": "Bearer YOUR_ACCESS_TOKEN" }
}
}
}Register upstream servers in the web console, write policies against their tools, and every call now routes through the policy engine.
Optional: agent features
Sentinel has a built-in admin agent (chat your way through configuration). It needs an LLM, and supports several providers — including fully local ones, so you never have to buy an API key:
Ollama or any OpenAI-compatible endpoint (LM Studio, llama.cpp, vLLM) — local, free
Anthropic, OpenAI, or Gemini — if you'd rather bring a key
Everything else in Sentinel works with no LLM configured at all.
Architecture
A pnpm + Turborepo monorepo.
Package | Lines | What it does |
| ~72k | tRPC API — services, routers, policy evaluation, audit |
| ~73k | React admin + user console |
| ~11k | Documentation site |
| ~6k | Shared types, condition evaluation, admin tool defs |
| ~4.7k | MCP proxy server (HTTP, STDIO, WebSocket, SSE) |
| ~3.3k | Prisma schema — 67 models |
| ~2.5k | Agent-to-Agent protocol proxy |
| ~1.7k | Admin MCP server (40 tools) |
Roughly 177k lines of source and 163k lines of tests across 218 test files.
The most reusable piece is packages/api/src/services/policyCondition.ts — a ~1,300-line condition
tree evaluator with no dependencies beyond Zod and a logger. It knows nothing about MCP, Prisma, or
Sentinel, and could be lifted into any project that needs policy expressions.
Deeper docs live in docs/ — start at docs/README.md.
Testing
pnpm test:unit # no database needed
pnpm test:integration # requires TEST_DATABASE_URL
pnpm test:security # tenant isolation, DENY precedence
pnpm test:e2e # Playwright
pnpm check # format, lint, types, testsProject conventions
This codebase holds itself to a few non-negotiable rules, enforced by lint config and git hooks in
.claude/hooks/:
No
astype assertions (exceptas const), noany, no@ts-ignore, noeslint-disableEvery database query scoped to
organizationIdAll input validated with Zod
Credentials encrypted before storage
Sensitive actions audit logged, admin actions with before/after snapshots
DENY policies cannot be bypassed, and that is tested explicitly
See CLAUDE.md for the full development guide.
Contributing
See CONTRIBUTING.md. Security issues: SECURITY.md.
License
GNU AGPL-3.0. If you run a modified Sentinel as a network service, you must make your modifications available to its users.
This server cannot be deployed
Maintenance
Related MCP Connectors
- gatewayOAuthai.sealgate
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
MCP enforcement layer that intercepts AI agent actions and blocks rule violations before execution.
Agent governance with A2A/Shopify/MCP trust audits, action screening, and decision UI.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA local-first control plane for AI agent tools, providing policy enforcement, spend caps, rate limiting, and audit trails for MCP servers.1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceAn open-source MCP server that protects AI agents at runtime by evaluating every tool call against YAML policies and generating audit trails.1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceAn MCP server that provides a governance layer for coding agents, enforcing policies, validation, and human-in-the-loop for tool calls without requiring an API key.MIT
- FlicenseAqualityBmaintenanceA governance layer for MCP servers that classifies tools by risk, enforces agent permissions, lets safe tools earn autonomy through a track record, and keeps an audit trail. Requires human approval for irreversible actions and provides blast radius context.14-