The open-source payment control plane for AI agents.
Cream is a Rust-based payment control plane with a policy engine, multi-provider routing with circuit breakers, and an append-only audit ledger — exposed as both REST and MCP — designed for AI agents to spend money autonomously within operator-defined guardrails.
MCP server for Cream — the universal payment control plane for AI agents. Exposes payment initiation, policy inspection, audit queries, virtual card issuance, and provider health through MCP tools, resources, and prompts. Translates MCP calls into the Cre
Cream is a Rust-based payment control plane with a policy engine, multi-provider routing with circuit breakers, and an append-only audit ledger — exposed as both REST and MCP — designed for AI agents to spend money autonomously within operator-defined guardrails.
What is Cream?
Cream sits between AI agents and payment providers (Stripe, Airwallex, Coinbase, etc.) and governs every transaction. Think of it like an API gateway, but specifically for money.
An agent never talks to Stripe directly. It talks to Cream, which decides whether the payment is allowed, which provider handles it, and why — then logs everything immutably.
The core problem: AI agents are gaining real economic agency, but the infrastructure for governing, auditing, and executing their payments doesn't exist yet. No single provider covers all rails, geographies, and agent frameworks. Cream fills this gap.
Key Features
Unified API — one interface for card payments, cross-border transfers, and stablecoin micropayments. Agents never know which provider executes the transaction.
Policy Engine — declarative rules evaluated in priority order before any money moves. Amount caps, velocity limits, category restrictions, geographic controls, duplicate detection — 12 built-in rule types.
Structured Justification — every payment request must include a machine-structured reason. No justification, no payment. This creates an agent-authored paper trail for every transaction.
Intelligent Routing — automatically selects the optimal provider based on cost, latency, health, and corridor. Circuit breakers shift traffic away from degraded providers. Failover is automatic.
Human-in-the-Loop — policy rules can require human approval for any transaction class. Operators approve or reject from the dashboard or via Slack notification.
Immutable Audit Ledger — every step of every payment (request, justification, policy decision, routing choice, provider response) is written to an append-only log. The database physically blocks updates and deletes.
MCP-Native — AI agents connect via the Model Context Protocol out of the box. Claude, GPT-4, LangChain, LangGraph — anything that speaks MCP works with Cream.
Architecture
Cream's backend is a Rust workspace with 6 crates, layered as a strict dependency DAG:
The MCP server is a separate TypeScript project using the official @modelcontextprotocol/sdk. It translates MCP tool calls into REST API calls — zero business logic.
How a Payment Flows
Every payment follows an 8-step deterministic pipeline:
# Clone the repo
git clone https://github.com/crimson-sun/cream.git
cd cream
# Start Postgres + Redis
just up
# Run database migrations
just migrate
# Build the backend
just build
# Run the API server
just run-api
# In another terminal, start the MCP server
just run-mcp
# In another terminal, start the frontend
just fe-dev
Available Commands
just # List all commands
just up # Start Docker services (Postgres + Redis)
just down # Stop Docker services
just build # Build all Rust crates
just check # Type-check without building
just test # Run unit tests
just test-integration # Run integration tests (requires Docker services)
just clippy # Lint with Clippy
just fmt # Format code
just run-api # Start the API server
just run-mcp # Start the MCP server
just fe-dev # Start the frontend dev server
just fe-build # Build the frontend
API Overview
REST Endpoints
Method
Endpoint
Description
POST
/v1/payments
Initiate a payment with justification
GET
/v1/payments/{id}
Get payment status and audit record
POST
/v1/payments/{id}/approve
Approve an escalated payment
POST
/v1/payments/{id}/reject
Reject an escalated payment
POST
/v1/cards
Issue a scoped virtual card
PATCH
/v1/cards/{id}
Update card controls
DELETE
/v1/cards/{id}
Revoke a card
GET
/v1/audit
Query the audit log
GET
/v1/agents/{id}/policy
Get agent's policy profile
PUT
/v1/agents/{id}/policy
Update agent's policy profile
GET
/v1/providers/health
Provider health status
POST
/v1/webhooks
Register a webhook endpoint
MCP Tools
Agents connecting via MCP have access to:
initiate_payment — initiate a payment with structured justification
Cream is open source and we welcome contributions. The project is in early development — there's a lot of ground to cover.
Good first areas:
Policy engine rule implementations
Provider integrations (implement the PaymentProvider trait for your favourite PSP)
Frontend dashboard components
Documentation and examples
The architecture is designed with contributor experience in mind. Every major system (auth, audit, providers, observability) is behind a trait boundary — you can add new implementations without touching core logic.
See docs/executing/implementation-plan.md for the full technical blueprint.
MCP server for Cream — the universal payment control plane for AI agents. Exposes payment initiation, policy inspection, audit queries, virtual card issuance, and provider health through MCP tools, re
MCP server for Cream — the universal payment control plane for AI agents. Exposes payment initiation, policy inspection, audit queries, virtual card issuance, and provider health through MCP tools, resources, and prompts. Translates MCP calls into the Cre
ตรวจสอบล่าสุดเมื่อ 2026-11-17 MCP server for Cream — the universal payment control plane for AI agents. Exposes payment initiation, policy inspection, audit queries, virtual card issuance, and provider health through MCP tools, resources, and prompts. Translates MCP calls into the Cre