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: AllowAgent MCP

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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      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 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
    • A
      license
      A
      quality
      B
      maintenance
      Enables an AI agent to create and capture orders, refund captures, and pay suppliers through PayPal while the operator's policy fixes the payee, currency, and credential behind a broker that the agent never sees. Adds spending limits, human-approval thresholds, server-derived idempotency, and a hash-chained audit ledger, so a compromised or injected agent can only pick an operation and bounded values.
      2
      2
      MIT