MCP Gateway SecurityAvailable
Every MCP tool call, checked before it runs.
Aegis is a gateway between your AI agents and your MCP servers that authenticates, authorizes and scans every tool call, for teams connecting agents to systems where a wrong call has consequences.
The source is shared during an evaluation — the gateway core is MIT-licensed.
- Policy
- Allow, deny or approve per tool
- Tool definitions
- Pinned — changes quarantined
- Audit log
- Hash-chained
- Core
- MIT, source on evaluation
Documented: 43 injection rules · 13 PII and secret classes · see the docs
The problem
An agent with tools is a new kind of caller.
Any tool, any argument
Connect an agent to an MCP server and it can call every tool that server exposes, with whatever arguments a prompt steers it towards. The server rarely knows who is asking.
Definitions change underneath you
A tool you reviewed last week can ship a new description or schema today, and a lookalike server can register a name that shadows a trusted one.
Results carry things back
A tool response can return keys, tokens or personal data straight into the model's context, and from there into logs and transcripts nobody meant to keep.
How it works
One checkpoint, in a fixed order.
Identify the caller
Once you configure a verifier, every request must carry a bearer JWT, checked against your identity provider's JWKS. The tenant comes from a claim, and every layer after this is scoped to it.
Decide before forwarding
Kill-switch, per-tool policy, approval hold, schema validation, and injection and egress scanning run in order. A refused call never reaches your server, and each refusal carries its own JSON-RPC code.
Check the result, then record it
The response is scanned for secrets and personal data, which are redacted by default. The decision is appended to a hash-chained audit log keyed by a secret the database never sees.
Stations in the drawing
The order every tools/call runs in. Hover or focus a row to light its station in the drawing.
S1Authenticate
Verifies the bearer JWT. A missing or invalid token is refused before anything else runs, and is not written to the audit log.
HTTP 401aegis/how-it-works
S2Route and kill-switch
Resolves the owning server once, for both the check and the forward. A switch on the tenant, server or tool refuses the call and overrides RBAC.
S3RBAC
A call with no matching allow, or any matching deny, is refused. Deny wins over approve, and approve wins over allow.
HTTP 403 · −32003aegis/how-it-works
S4Approval hold
An approve policy holds the call and returns an approval_id. Once an operator approves it, the same caller can run the identical call once.
−32061 · 1 h window by defaultaegis/approvals-and-kill-switch
S5Schema and threat gate
Arguments are checked against the tool's inputSchema, then the whole params object is scanned for injection patterns and outbound secrets.
−32602 · −32051 · −32053aegis/threat-detection
S6Forward and response scan
The call reaches your server only now. Secrets and personal data in the response are redacted by default.
[REDACTED:KIND]aegis/threat-detection
S7Record
The decision is appended to the HMAC-SHA256 chained audit log in the audit store. Rate-limit and quota refusals are counted in metrics, not audited.
GET /admin/v1/audit/verifyaegis/audit-and-observability
Capabilities
The controls tool use actually needs.
Chain intact
{
"ok": true,
"rows": n,
"first_break_seq": null
}Row k edited
{
"ok": false,
"rows": n,
"first_break_seq": k
}Catches edited, inserted, deleted and reordered rows, and a truncated tail while the gateway runs. Needs catalog:read on aegis-admin in the default tenant.
Per-tool policy
Allow, deny or approve per role, server and tool pattern. Deny wins, a call that matches no rule is denied, and tools/list hides what a caller cannot reach.
Approval holds
An approve policy holds the call. The operator sees argument names and size, never values. An approval admits that exact call once, it expires, and nobody can approve their own request.
Kill-switch
Stop traffic for a tenant, a server or a single tool without waiting for a policy refresh. Every replica picks it up within one refresh interval.
Tool pinning
Each tool's name, description and schema are hashed on first sight. A later change quarantines the tool until an operator re-pins it. Pins are held per replica and reset on restart, and pinning is trust-on-first-use, so review a server before you register it.
Argument and response scanning
Pattern rules check every string in a call's parameters, keys included, for shell and prompt injection. Credentials, card numbers and SSNs are refused on the way out and redacted on the way back.
A verifiable audit chain
Each allow, deny, block and error is sealed with an HMAC over the previous row. The verify endpoint recomputes the chain and names the first row that breaks.
Outcomes
What changes with Aegis.
Agents get the tools they need, not all of them
Policy is per tool, so an agent can read tickets without being able to close them, and a tool no rule allows is denied.
Risky actions have a person behind them
Mark a tool such as a branch delete or a refund for approval, and each call is held and runs only when the caller re-sends it after an operator approves that one call with those exact arguments.
An audit trail you can check, not just read
Editing, inserting, deleting or reordering rows breaks the chain while the gateway runs, and an operator can run the check on demand.
Compared
Aegis and generic API gateways
Each line on our side is sourced from the docs. The other column describes the general approach, not any one vendor.
- Unit of control
- AegisThe MCP tool call: which server, which tool, which arguments
- Generic API gatewaysThe HTTP route and method
- Protocol awareness
- AegisSpeaks MCP — filters tools/list per caller and routes each call to the server that owns the tool
- Generic API gatewaysSees JSON-RPC as an opaque request body unless extended with custom plugins
- Tool integrity
- AegisPins tool definitions and quarantines changes
- Generic API gatewaysNo notion of a tool definition
- Human approval
- AegisBuilt-in hold for a specific call, single-use and time-bound
- Generic API gatewaysNot usually part of the request path
- Scope and maturity
- AegisTool traffic only, pre-1.0 — MCP resources and prompts are not proxied
- Generic API gatewaysMature, general-purpose and suited to any HTTP traffic
Rollout
How teams roll out Aegis.
Rev A · Evaluate
Run it locally
Start the Compose stack with its mock MCP servers and send a first tool call through the gateway to see each check and refusal code.
Rev B · Observe
Front one server
Put Aegis in front of one server with a narrow allow policy, and run the threat checks in monitor mode to see what they would refuse.
Rev C · Enforce
Turn the controls on
Configure your identity provider's JWKS, Postgres for policy and ClickHouse with a strong audit key, then enforce threat checks and add approval holds for risky tools.
Rev D · Scale
Deploy with Helm
Move to the hardened Helm chart, enable NetworkPolicy and confirm your CNI enforces it, and schedule audit-chain verification.
Who it's for
Built for the teams who have to answer for it.
Platform engineering
One place to put agent traffic under policy.
A reverse proxy your clients point at. MCP servers stay where they are, and the Helm chart ships hardened defaults.
Security
Know what agents did, and be able to prove it.
Every decision lands in a hash-chained log with the control that made it, and the chain can be verified.
AI and agent teams
Ship agents without a review meeting for every tool.
Allow the safe tools, hold the few risky ones for approval, and handle refusals by their distinct error codes.
FAQ
Questions teams ask about Aegis.
Not if your servers speak MCP over Streamable HTTP. Point your client at the gateway's /mcp endpoint and have it send a bearer token. Your servers stay where they are, behind the gateway, and you register them in the server catalog. Aegis builds each upstream request itself and never passes your client's headers through. It does not launch stdio servers.
The tools surface. Aegis answers initialize and ping itself, serves tools/list from the tools it discovered, filtered to what each caller may reach, and forwards tools/call to the server that owns the tool. Notifications are acknowledged. MCP resources and prompts are not proxied today, and any other method returns a method-not-found error.
Aegis is open core. The gateway core is MIT-licensed and runs on its own: the proxy, authentication, policy, threat detection, the audit log, approvals, the kill-switch and the Compose and Helm deployments. Billing, SSO and SCIM, the SIEM and alert connectors, the credential broker and per-tenant namespace guardrails are commercial. The source is not in a public repository today — we share it during an evaluation.
We do not publish a latency or throughput figure. Internal load tests exist, but they are not an independent benchmark and do not run in CI, and tail latency depends heavily on the host. Checks run cheapest first, and audit writes never block a call. Measure on your own hardware during an evaluation — the docs list every stage a call passes through.
Each has a defined posture. Redis is required: the gateway will not start without it, and while it is unreachable tool calls fail with HTTP 500 — kill-switches already in force stay in force, and rate limiting fails open. If Postgres drops, approval-gated calls fail closed and policy keeps its last snapshot. The audit store never blocks traffic — if ClickHouse is unreachable at startup, auditing stays off until restart, and a later failed write is dropped and logged.
It reduces the risk — it does not end it. Injection detection uses pattern rules over every string in a call's parameters, including keys, and refuses matches before the call is forwarded. It does not scan tool responses or tool descriptions for injection, and no pattern set is a complete defense. Pair it with per-tool policy and approval holds for tools that change state.
Yes. The tenant comes from a JWT claim, and routing, tools/list, policy, circuit breakers and the audit log are all scoped to it, so one tenant cannot tell another exists. You can restrict an instance to named tenants, and the Helm chart has an isolated mode that installs one release per tenant. Backing stores are still yours to separate.
Sources
Read the source of every drawing.
Each schematic on this page is drawn from the Aegis documentation, not from a product screen. The pages below are where every label comes from.