Put a gateway between your agents and
production.

AMG is the policy-enforcing MCP gateway between your AI agents and the tools they touch. Agents see one server; you decide which tools each role can call — down to the argument — with every decision audited.

self-hosted · default-deny · credential brokering · shadow mode · human approvals

Built for teams that can't ship their data to someone else's cloud

Self-hostedruns in your VPC, on your terms
Open coreread every line before you trust it
docker compose upfirst scoped agent in minutes

Policy engine

An API key is a blank check. A role is a contract.

Agents in production call tools with the full blast radius of whatever key they're handed. AMG replaces the key with a scoped token, and the token with a policy.

Default-deny RBAC, authored in YAML

Roles are compiled and validated against the live upstream tool list at save time — not at 2am when the call fails.

role: notion_read servers: notion: tools: - name: get_pages constraints: workspace_id: { in: ["ws_abc123"] } approvals: - match: "*delete*" # parked for a human require: human

Argument-level constraints

Reads scoped to one workspace. Limits capped at 100. Unknown arguments? Denied by default.

workspace_id in ["ws_abc123"] limit lte 100 include_archived: true admin_override: true

Shadow mode

Log would-be denials without enforcing. Promote to enforce when the line hits zero — like a migration cut-over.

shadow denies / daycut over ↗

Human-in-the-loop approvals

Destructive tools park instead of executing. The payload is immutable — approval forwards exactly what the agent sent.

notion__delete_page
docs-crawler · docs_writer · {"page_id": "pg_runbook_archive"}
Approve Deny expires 11:42

Credential brokering

Upstream secrets live in Vault and never reach the agent runtime. Agents hold one thing: an AMG token you can revoke in 30 seconds.

agent amg vault stripe api

The audit log is the product

Every decision lands with role, arguments (redacted), policy version, latency, and verdict. Replayable forever.

{ ts, agent, role, tool, args⊘, policy_v, verdict, latency }

How it works

One endpoint in. Policy in the middle. Everything out.

Point your agent's MCP client at AMG. That's the whole integration.

01

Agents authenticate to AMG

A scoped bearer token resolves server-side to a role. Claimed roles are never honored — the agent is untrusted input.

Authorization: Bearer amg_4f9c…e2
02

Policy decides, in microseconds

Tool visibility, call authorization, argument constraints, rate limits, approval gates. Any engine error fails closed.

(role, tool, args) → allow | deny | needs_approval
03

AMG calls upstream for them

Credentials injected from Vault at the connection, never before. Result returned, decision audited, asynchronously.

notion__get_pages → mcp.notion.com · 82ms · ok

Trust model

Built like the agent is trying to escape. Because someday one will.

Prompt injection can't escalate privileges it was never granted. The worst case is bounded by the grant — and the grant is yours.

Roles are never agent-declared

Bearer token → role, resolved server-side. Skill files are documentation, not authorization.

Fail closed, always

Malformed policy, engine error, unknown upstream — every failure path is a deny, never a passthrough.

Tokens are digests at rest

256-bit, shown once at issuance, revocable with a 30-second latency ceiling.

Secrets never touch agents

Upstream keys live in Vault, read into memory at connection time, absent from logs and the database.

Argument redaction before persistence

Sensitive fields never land in the audit log — redaction happens before the write, not after.

Strict tool namespacing

Path traversal, case games, and null bytes are rejected before routing — and the attempt is audited.

From one key that could delete everything to per-agent grants you can read in a screenful of YAML.
The migration AMG was built for — shadow mode makes the cut-over a non-event.

Every Agent. Exactly enough power.

Self-hosted, open core. One docker compose up away from your first scoped agent.