Cerberus
Provides a three-layer payment firewall for AI agents, enabling identity verification, risk screening, and execution authorization with on-chain policy enforcement for secure and auditable transactions.
README
Cerberus: On-Chain Payment Firewall for AI Agents
Three gates. MCP risk control. On-chain policy enforcement.
Security middleware for AI agent payments — off-chain MCP soft controls + on-chain Policy hard floor.
Full project guide:
docs/PROJECT_GUIDE.md
MetaMask + network setup (step-by-step):docs/PROJECT_GUIDE.md#10-complete-metamask-guide-connect-wallet--add-network
Architecture
Payment Request
│
▼
┌─────────────────────────────────────┐
│ Layer 1: Identity Verification │ MCP: @cerberus/mcp-identity
├─────────────────────────────────────┤
│ Layer 2: Risk & Safety Screening │ MCP: @cerberus/mcp-payment-guard
├─────────────────────────────────────┤
│ Layer 3: Execution & Authorization │ MCP: @cerberus/mcp-execution
│ + Policy.validate (chain) │ + PaymentGateway.pay (wallet)
└─────────────────────────────────────┘
│
▼
Approved / Blocked + Audit Log + Events
Pitch: MCP lets the agent check smartly; on-chain Policy makes rules unbypassable; events are independently verifiable.
Quick Start (Simulated Demo)
npm install
npm run demo
Open http://localhost:3000 — badge ⚡ Simulated.
Five scenarios: Identity / Risk / On-chain Policy / Success / Amount Limit.
On-Chain Mode + MetaMask (Summary)
# Terminal 1 — keep running
npm run node
# Terminal 2
npm run deploy:local
# Terminal 3
npm run demo
- Badge should show ⛓️ On-chain.
- In MetaMask, add network Localhost 8545 (
RPC http://127.0.0.1:8545, chainId31337). - Import Hardhat Account #0 private key:
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - Run scenario 4 · Successful Payment → Connect Wallet → Approve & Pay.
Full step-by-step guide: §10 in docs/PROJECT_GUIDE.md.
Base Sepolia: PRIVATE_KEY=0x... npm run deploy:base-sepolia (then switch MetaMask to chainId 84532).
| Mode | Layer 3 Policy |
|---|---|
| ⚡ Simulated | In-memory whitelist simulation |
| ⛓️ On-chain | viem readContract → Policy.validateWithReason |
MCP Servers
npm run mcp:identity
npm run mcp:guard
npm run mcp:execution
Project Structure
cerberus/
├── docs/PROJECT_GUIDE.md # Full project guide + MetaMask tutorial
├── packages/core/ # Three-layer firewall + chain/viem
├── packages/mcp-identity/
├── packages/mcp-payment-guard/
├── packages/mcp-execution/
├── packages/contracts/ # Policy, PaymentGateway, AgentRegistry, MockUSDC
└── apps/demo/ # Next.js demo + wagmi
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.