AgentBouncer v1.0 Overview
In-process verification of AI agents, multi-passports, OAuth 2.1, and DDoS rate limits inside your server in < 0.3 ms with no proxy.
AgentBouncer is an embeddable security and authorization layer for open MCP servers and AI APIs. Unlike cloud proxy gateways, all cryptographic checks, IP rate limits, and access rules run synchronously inside your Node.js process memory in < 0.3 ms (Data Plane) using a locally cached, Ed25519-signed PolicyBundle. The AgentBouncer cloud (Control Plane) operates strictly asynchronously out of the request path: it compiles signed bundles, verifies provider domains and agent cards, refreshes issuer JWKS, aggregates telemetry, and syncs IP blocks.
Core Integration Invariant
Always gate business logic exclusively on verification.allowed === true. The verification.verified field only indicates whether cryptographic authentication (signature, passport, or token) succeeded—it does not account for tool-level access rules, public routes (credential: public), or safe observation mode (MONITOR_ONLY).
| Package / Subpath | Runtime | Purpose |
|---|---|---|
| @agentbouncer/sdk | Node.js >= 22 (ESM, TypeScript) | Core package: local verifier (AgentBouncer), MCP protection (withMcpProtection), passport plugins, DDoS rate limiter, and outbound signer (AgentBouncerSigner). |
| @agentbouncer/sdk/mcp | Node.js >= 22 (ESM, TypeScript) | Dedicated wrappers for MCP Streamable HTTP / JSON-RPC 2.0 (withMcpProtection, verifyMcpRequest) and RFC 9728 WWW-Authenticate response builders. |
| @agentbouncer/sdk/contracts | Node.js >= 22 (ESM, TypeScript) | Strict Zod v4 schemas (PolicySchema, BundleSchema, PublicJwkSchema, OAuthIssuerSchema, PassportIssuerSchema) and canonicalSignatureAgent for CI/CD config validation. |
| @agentbouncer/sdk/policy | Node.js >= 22 (ESM, TypeScript) | Pure deterministic evaluatePolicy() function for local unit testing of access rules without starting a server. |
| agentbouncer-signer | Python >= 3.10 (PyPI) | Lightweight client for cryptographically signing outbound HTTP and MCP requests (RFC 9421 + RFC 9530 Content-Digest) with built-in adapters for httpx, the official Python MCP SDK, and requests. |
| verified | allowed | State Semantics |
|---|---|---|
| true | true | Agent and/or user identity is verified, and all policy requirements for the requested action and tool are satisfied. |
| true | false | Cryptography is valid, but the policy rejected the call (insufficient Tier, low trustScore, explicit DENY rule, or user OAuth 2.1 token required — step_up). |
| false | true | Request is unauthenticated, but allowed by an open rule (credential: public) or the project is in MONITOR_ONLY mode (the potential block reason is recorded in policy.wouldBlockReason). |
| false | false | Request is rejected: missing/invalid signature, Content-Digest mismatch, replay detected, invalid passport, or IP rate limit exceeded. |
- HTTP Message Signatures verification (RFC 9421, web-bot-auth profile) and streaming SHA-256 Content-Digest validation (RFC 9530) before JSON parsing.
- Dual reliability window for PolicyBundle: 5 minutes of guaranteed online freshness (refreshAfter) with background polling every 30 s, and up to 24 hours of full offline operation (offlineUntil) during network outages.
- Single-wrapper protection withMcpProtection() covering all MCP operations (tools/call, prompts/get, resources/read, including JSON-RPC batches up to 50 messages).
- Multi-passport trust model: verified domains and organizations, Google A2A Signed Cards (RFC 8785 JCS), portable PoP passports (cnf.jkt), World AgentKit, mTLS / SPIFFE, Enterprise OIDC, Skyfire KYA, and x402.
- Local OAuth 2.1 user JWT verification against cached JWKS with RFC 9728 Protected Resource Metadata and delegation (act claim) support.
- Dual-bucket DDoS and scraper protection with automatic synchronization of blocked public IPs across all replicas in your cluster.