Sign In

@garlai/agentlog

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@garlai/agentlog

MCP reverse proxy that audits AI agent actions. Intercept tool calls, swap credentials, track IP provenance, and export ISO 42001 Trust Passports.

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
5
25%
Maintainers
1
Weekly downloads
 
Created
Source

agentlog

Your AI agent has root access to your codebase. Do you know what it did last Tuesday?

AgentLog is an open-source MCP reverse proxy that sits between your IDE and external MCP servers, creating an immutable audit trail of every action your AI agent takes.

Built for teams that ship with Cursor, Windsurf, Claude Code, or any MCP-powered agent — and need to prove it was safe.

IDE / AI Agent  ──▶  AgentLog Proxy  ──▶  External MCP Servers
                         │
                    Audit Database
                    (Supabase / PG)
                         │
              ┌──────────┼──────────┐
              ▼          ▼          ▼
         Credential   Intent     Trust
           Vault     Analysis   Passport

The Problem: Shadow MCP

Every time your AI agent calls an MCP server, it can:

  • Read and write files across your entire filesystem
  • Execute shell commands with your user permissions
  • Send HTTP requests to third-party APIs with your credentials
  • Access databases, secrets, and production infrastructure

And right now, none of this is logged. There is no audit trail. No attribution. No way to prove what was AI-generated vs. human-written.

This is Shadow MCP — the invisible, unmonitored surface area that AI agents operate in. And it's a nightmare for:

  • M&A due diligence — acquirers can't verify IP provenance
  • ISO 42001 compliance — no evidence chain for AI system governance
  • SOC 2 / SOX audits — zero visibility into non-human identities
  • Enterprise security — credentials exposed directly to AI agents

The Solution

npm install -g agentlog
agentlog signup
agentlog login
agentlog start

That's it. Your agent traffic is now being audited.

What AgentLog Does

1. Intercepts All MCP Traffic

Every JSON-RPC request and response between your agent and external MCP servers flows through the proxy. Full payloads, timestamps, latencies, and method names are recorded.

  /mcp/supabase  →  http://localhost:3100  (supabase-mcp)
  /mcp/github    →  http://localhost:3200  (github-mcp)

2. Credential Vault (Agents Never See Real Keys)

Store your API keys in AgentLog's encrypted vault. Your agent receives an opaque placeholder token like agentlog_ref_a1b2c3... — the proxy swaps it with the real key at request time.

# Store a credential
curl -X POST http://localhost:4100/__agentlog/credentials \
  -H "Content-Type: application/json" \
  -d '{"alias": "openai-key", "server_name": "openai", "api_key": "sk-..."}'

# Agent only ever sees: agentlog_ref_a8f3e2b1...

The AI agent never touches your real API keys. Period.

3. Git Provenance — AI vs. Human Attribution

AgentLog analyzes git blame to classify every line of code as AI-generated or human-written, using author patterns and commit message heuristics.

  src/auth.ts         142 lines   87% AI   13% Human
  src/db/schema.ts     89 lines   34% AI   66% Human
  src/utils.ts         56 lines  100% Human

4. Intent Narratives

Raw event logs are clustered by time window and analyzed into human-readable intent summaries:

  ◆ AI agent generated code targeting src/auth.ts using Write, Shell (12 events, 3m)
  ◆ Human modified database schema using StrReplace (4 events, 45s)
  ◆ AI agent explored the codebase using Grep, Read (8 events, 1m)

5. ISO 42001 Trust Passport Export

One command generates a comprehensive Markdown report covering:

  • Executive summary with AI vs. human code percentages
  • Full intent narrative timeline with confidence scores
  • File-level code provenance attribution
  • Credential access audit trail
  • ISO 42001 compliance matrix (controls A.4.1 – A.9.2)
  • Risk indicators and exposure assessment

This is the document that goes into M&A data rooms, SOC 2 evidence packages, and ISO 42001 certification binders.

Multi-Tenant Architecture

AgentLog uses Supabase Auth + Postgres RLS for tenant isolation:

agentlog signup    # Create account
agentlog login     # Authenticate (stores token in ~/.agentlog/)
agentlog start     # Proxy starts with tenant-scoped writes

Every row in the database has a tenant_id column. RLS policies ensure tenant_id = auth.uid() on every query. Your data is invisible to other tenants.

Configuration

Edit agentlog.config.json to register your MCP servers:

{
  "proxy": {
    "port": 4100,
    "targets": {
      "supabase": {
        "name": "supabase-mcp",
        "target": "http://localhost:3100"
      },
      "github": {
        "name": "github-mcp",
        "target": "http://localhost:3200"
      }
    }
  }
}

Then point your AI agent to http://localhost:4100/mcp/<server-name> instead of directly to the MCP server.

CLI Reference

CommandDescription
agentlog signupCreate a new account
agentlog loginAuthenticate and store session
agentlog logoutClear local credentials
agentlog statusShow auth state and tenant stats
agentlog startLaunch the audit proxy
agentlog helpShow all commands

Dashboard

The AgentLog Dashboard provides a real-time view of your audit data:

  • Event timeline with expandable payloads
  • Token usage charts by model
  • Tool call distribution and latency metrics
  • Intent narrative timeline
  • Code provenance visualization (AI vs. Human)
  • One-click Trust Passport export

Why Open Source?

The audit proxy — the component that intercepts your traffic — must be open source. You need to verify that:

  • No data leaves your machine except to your own database
  • Credentials are encrypted and never logged in plaintext
  • The proxy doesn't modify your agent's behavior

Trust requires transparency. The proxy is MIT-licensed and always will be.

The managed dashboard and API are proprietary — that's our business model.

Use Cases

ScenarioHow AgentLog Helps
M&A Due DiligenceProve IP provenance. Show acquirers exactly which code was AI-generated vs. human-written.
ISO 42001 CertificationPre-built compliance matrix with evidence chain. Export directly to auditor format.
SOC 2 Type IIDemonstrate non-human identity governance and credential access controls.
Enterprise AI PolicyMonitor which tools agents use, what files they touch, and what APIs they call.
Vibe Coding TeamsShip fast with AI, but maintain a clean audit trail for when investors ask questions.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

git clone https://github.com/ardakutsal/agentlog.git
cd agentlog
npm install
npm run dev

License

MIT — see LICENSE

Built by Arda Kutsal
Stop flying blind. Audit your AI agents.

Keywords

mcp

FAQs

Package last updated on 14 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts