Skip to main content
Glama

Tollgate

Tollgate is an open-source firewall for AI agents that move money through PayPal. Agents call Tollgate — over MCP or REST — instead of calling PayPal directly, and every money-moving request passes through a deterministic policy engine plus an AI guard that can only make verdicts stricter, never looser, before it ever reaches PayPal's sandbox.

Architecture

flowchart LR
    Agent[AI Agent] -->|MCP / REST| Gateway[apps/gateway]
    Gateway --> Auth[Authn + idempotency]
    Auth --> Policy[Policy Engine<br/>packages/policy]
    Policy --> Guard[AI Guard<br/>packages/guard-ai]
    Guard -->|allow| PayPal[PayPal Sandbox<br/>packages/paypal]
    Guard -->|hold| Approval[Approval Request + ntfy]
    Guard -->|block| Reject[Reject + reasons]
    Approval --> Human[Human approves on phone]
    Human --> PayPal
    Gateway --> Audit[(Hash-chained audit log<br/>packages/db)]
    Gateway -->|SSE| Dashboard[apps/dashboard]

Related MCP server: Parimit

Quickstart

TODO: docker compose up, pnpm demo, PayPal sandbox credentials.

Demo

TODO: 2-minute walkthrough script — legit payout, injected invoice blocked, held payout approved from phone, kill switch.

How AI is used

TODO: NL→policy compiler, injection scan, intent check — and why the AI can only escalate, never relax, a verdict.

PayPal APIs used

TODO: Payouts, Captures Refund, Invoicing v2, Orders v2 — sandbox only.

Security model

TODO: trust boundaries, fail-closed rules, hash-chained audit log — see docs/ARCHITECTURE.md.

License

MIT — see LICENSE.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to propose wallet payments while a local, human-authored policy decides whether each transaction is approved, requires human confirmation, or is refused, and records every decision in a signed, append-only ledger.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to propose structured payment intents, apply deterministic policy, require human approval, and record tamper-evident audit trails without connecting to live payment rails.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables store owners to reorder from suppliers by voice or chat and settle payments through PayPal, while a deterministic policy engine enforces spending limits, allow-listed suppliers, price-jump and duplicate checks so the LLM can only propose payments, never move money. Funds are authorized rather than charged, then captured only for goods verified on delivery via a 3-way match, with step-up human approval for unusual orders and a full audit ledger of every authorization, capture, void and refund.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to carry out PayPal payments, invoice recordings, and refunds through a fail-closed firewall that enforces spending limits and trusted recipients, cross-checks requests against account records, and screens for prompt injection. Unusual or unverifiable requests are halted and escalated to a human for approval before any execution.
    MIT