agent-audit-trail

agent-audit-trail

MCP server providing immutable audit logging, policy enforcement, and compliance reporting for AI agent workflows, enabling regulatory compliance and chain integrity verification.

Category
访问服务器

README

Agent Audit Trail

Compliance infrastructure for agentic AI.

An MCP server that provides immutable audit logging, policy enforcement, and compliance reporting for AI agent workflows. Built for SMBs deploying AI agents who need to demonstrate regulatory compliance (Colorado SB 205, EU AI Act, and emerging state AI legislation).

Employer Summary

This is the strongest repo to review for AI governance, agent safety, and implementation reliability. It shows the part of AI delivery that usually gets ignored in demos: what happened, which tool was called, what data was touched, which policy fired, and whether the record can be trusted later.

Proof points:

  • MCP server surface for agent/tool workflows
  • hash-chained audit log with integrity verification
  • configurable policy rules for PII, financial actions, and destructive operations
  • compliance-oriented export path
  • production path from local JSON to PostgreSQL/Supabase-style storage

What It Does

Agent Audit Trail sits between your AI agents and their tools, providing:

  • Cryptographically Immutable Audit Logging - Every agent action is recorded with full context and a SHA-256 hash chained to the previous entry. Tampering is detectable. Verification is one call away.

  • Policy Engine - Configurable rules that evaluate every action in real time. Flag PII access, block high-value financial transactions, detect destructive database operations, or create custom rules for your business.

  • Compliance Reporting - Export audit logs in formats suitable for regulatory submissions. Pre-built support for Colorado SB 205 impact assessments and EU AI Act transparency documentation. Exports include a chain integrity verification result.

  • Agent Registry - Track which agents are active, what they do, and their historical activity patterns.

Quick Start

Install

npm install -g agent-audit-trail

Add to Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "agent-audit-trail": {
      "command": "agent-audit-trail"
    }
  }
}

Add to Claude Code

claude mcp add agent-audit-trail -- npx agent-audit-trail

Available Tools

Tool Description
log_action Log an agent action to the immutable audit trail
query_logs Search and filter audit entries
get_log_detail Get full details for a specific log entry
get_summary Dashboard-style activity summary
list_agents Show all registered agents
register_agent Explicitly register a new agent
list_policy_rules Show configured policy rules
add_policy_rule Create a new policy rule
toggle_policy_rule Enable or disable a rule
verify_chain Verify the cryptographic integrity of the audit trail
export_audit_log Export logs for compliance reporting

Default Policy Rules

Three rules are active out of the box:

  1. PII Field Access (High) - Flags access to fields matching SSN, date of birth, email, phone, address, passport, driver license, or credit card patterns.

  2. High-Value Financial Action (High) - Flags financial actions with amounts exceeding $1,000.

  3. Destructive Action Detection (Critical) - Flags tool calls containing DELETE, DROP, TRUNCATE, or REMOVE operations.

Cryptographic Immutability

Every log entry is chained to the previous one using SHA-256. Each entry stores:

  • previous_hash — the hash of the entry before it (null for the first entry)
  • hash — SHA-256 of: previous_hash + all entry fields

This means:

  • Modifying any historical entry changes its hash, breaking the chain
  • Deleting an entry leaves the next entry pointing to a hash that no longer exists
  • You can verify the entire chain with verify_chain and get a definitive yes/no answer

Run verify_chain before exporting compliance reports to confirm the chain is intact. The export output includes the verification result.

Example Usage

Logging an action

Use the log_action tool:
- agent_name: "customer-support-bot"
- tool_name: "database_query"
- tool_action: "SELECT"
- parameters: {"query": "SELECT email, phone FROM customers WHERE id = 123"}
- data_fields_accessed: "email,phone"

The server will log the action and return any policy violations (in this case, the PII Field Access rule would flag the email and phone access).

Querying the audit trail

Use the query_logs tool:
- has_violations: true
- limit: 10

Adding a custom policy rule

Use the add_policy_rule tool:
- name: "Block External API Calls"
- description: "Block agents from calling external APIs without approval"
- condition_type: "tool_match"
- condition_operator: "contains"
- condition_value: "external_api"
- action: "block"
- severity: "high"

Data Storage

Audit logs are stored locally at ~/.agent-audit-trail/audit-logs.json by default with full hash chaining. Configure a custom path with the AUDIT_DATA_DIR environment variable.

Production note: Local JSON storage works for single-instance deployments. For multi-agent or distributed setups, swap to Supabase/PostgreSQL for scalable, cloud-hosted storage with the same hash chain guarantees (documentation coming soon).

Regulatory Context

This tool helps businesses demonstrate compliance with:

  • Colorado SB 205 (effective Feb 2026) - Requires impact assessments and consumer notifications for AI-driven consequential decisions
  • EU AI Act (high-risk enforcement Aug 2026) - Requires transparency, documentation, and human oversight for AI in critical sectors
  • Emerging US state AI legislation - Multiple states have pending AI governance requirements

Note: Agent Audit Trail provides logging and reporting infrastructure. It does not constitute legal compliance certification. Consult legal counsel for your compliance program.

Built By

DANZUS Holdings LLC

License

MIT

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选