Your agent decides
where money goes.We make sure it gets there.
CodeSpar is the commerce stack your agent runs on. Policies, mandates, cross-border routing, escrow, reconciliation, audit. The infrastructure that turns a chatbot into something that can actually move money.
Teams moving money on behalf of someone else.
One intent. The right rails. Settled.
Real outcomes, not just chat. Pick a commerce intent and watch the agent run the actual CodeSpar meta-tools — charge, pay, invoice, ship, KYC — across the LATAM provider catalog.
Cobra R$240 da Maria pelo pedido #1042, manda o Pix no WhatsApp dela e emite a nota.
Found order #1042 — 2× Tênis SKU-ABX, R$240. I'll charge via Pix, drop the QR in Maria's WhatsApp, then issue the NF-e.
codespar_chargeAsaascodespar_notifyZ-APIcodespar_invoiceNFe.ioCharged R$240 via Pix, dropped the QR into Maria's WhatsApp, and issued NF-e #4471 — in one turn.
Free tools to start.Orchestration when you scale.
MCP Servers
Every LatAm API your agent needs, wrapped as an MCP server. npm install, configure env vars, your agent transacts. Free and MIT licensed.
Commerce Orchestration
The Complete Loop. One agent, six APIs, zero human intervention. Policies, mandates, routing, escrow, audit — managed.
Every rail. One catalog.Every API your agent needs to transact in LatAm.
Give your AI agents
commerce superpowers
One SDK. Payments, invoices, shipping, notifications, ERP. Across Latin America. Five lines to run the Complete Loop.
Session-first DX
One line to create a session. One line to send a message. Your agent gets payments, invoicing, shipping, messaging, ERP, and banking in a single call.
9 Meta Tools, Not 2,200+
A full LATAM commerce catalog has 2,200+ raw MCP tools across 53 routing rails. We compress them into 9 meta tools that pick the best provider per call. Your agent sees clear categories, not noise.
Managed Auth
OAuth, API keys, token refresh, lifecycle management. Connect once per provider. The SDK handles credentials, refresh, and storage.
Framework Agnostic
Works with Claude, OpenAI, Vercel AI SDK, or any MCP client. Swap models based on cost or capability. Your tools and auth carry over.
Ship a working test agent against the
hosted backend in ten minutes
A test key, a declared mocks payload, and a single session.send() — the agent code you write here is the agent code that ships to live traffic when you flip the project.
Deterministic responses, no provider OAuth
Declare a mock per tool call once at session creation; every matching call returns the value you pinned. No sandbox keys to rotate, no provider consent flows to script around.
Policy, audit, and commerce-memory fire on every send
The same governance that runs in live traffic evaluates on every session.send() in test mode. Tune approval rules and verify audit-chain shape against deterministic input before a single real cent moves.
The same agent code flips to live, unchanged
Drop the mocks payload, point a live-environment key at the same session shape, and the agent runs against real providers. No environment branching in your code.
Works with your agent.
Connect over MCP with no code, or install a one-line adapter and call getTools(session). Either way your agent gains a LATAM commerce rail.
Point it at your code.Get an MCP server.
No OpenAPI spec. No hand-written schemas. CodeSpar reads your Express, Fastify, or Next.js codebase and generates a production-ready MCP server your agent can use immediately.
From intent to ledger.One function call.
Your agent says it once. CodeSpar orchestrates all six providers, confirms every result, and seals the transaction in an immutable ledger. No callbacks, no cron jobs, no reconciliation spreadsheet.
const result = await session.send( "Charge R$ 150 via Pix, issue the NF-e, dispatch with Melhor Envio, notify on WhatsApp, and post it all to Omie." );
Five guardrails. One command.
Every payment your agent initiates passes through five governance layers. Programmable, signed, and audit-ready by construction.
Per-agent budgets, deny-lists, time windows. Your CFO writes the rules.
HMAC-signed tokens with TTL, amount caps, purpose. Revocable instantly.
Cheapest rail every time. Cost-optimized across providers and currencies.
Idempotency keys, rollback plans, no orphan transactions.
Immutable hash chain. Tamper-evident. SIEM and auditor exports built in.
Autonomous fulfillment for LatAm marketplaces.
An agent watches the order stream, charges the buyer on the cheapest local rail, issues the fiscal doc, prints a Melhor Envio label, notifies the buyer on WhatsApp, and reconciles it all into the ERP. End-to-end, unattended, audit-sealed.
See more use cases →The commerce loops teams ship first.
All use casesWhatsApp commerce bot
Conversational checkout that settles in chat
Cross-border payout orchestrator
Pay sellers, contractors, suppliers in local currency
Fiscal compliance autopilot
NF-e, CFDI, Factura issued automatically
Teams shipping agents that actually move money.
We were quoted R$ 200k to build cross-border FX routing in-house. CodeSpar handled USDC, Pix and Wire in one afternoon. The ROI was not even close.
“We had three engineers gluing Pix, Stripe and our ERP together. CodeSpar collapsed that into one SDK call. Our agent closes the loop end-to-end now.”
“The mandate system alone was worth the migration. Our CFO finally signed off on letting agents move money because she can see — and revoke — every policy in real time.”
Your questions, answered.
Yes. The SDK and MCP servers are live on npm today. The orchestration layer — policies, mandates, routing, escrow, audit — runs in dev environments with early builders and is hardened for regulated use. Active roadmap is published on GitHub.
The MCP servers and the SDK are free and MIT-licensed — install from npm, configure env vars, and transact. The orchestration layer (mandates, policy engine, audit ledger) is per-transaction pricing for teams that want it managed. See /pricing.
Brazil is fully covered today — Pix, NF-e, Melhor Envio, Z-API / Evolution, Omie / Bling, Stark Bank, Open Finance. Mexico, Argentina, and Colombia are rolling out next. USD and USDC supported globally via Circle and Stripe.
Stripe ACP is one rail. A raw MCP server is one integration. CodeSpar bundles dozens of rails and APIs behind one SDK, with policies, signed mandates, and an immutable audit ledger — the pieces an agent actually needs to move money safely. The servers themselves are swappable and MIT.
Yes. First-class adapters for Claude Agent SDK, OpenAI, and Vercel AI SDK. Anything else that speaks MCP works out of the box — sessions, tools, and credentials carry over when you swap models.
Policies prevent most mistakes before they happen: spend limits, deny-lists, time windows, per-agent budgets. Mandates are HMAC-signed and revocable in one call. Every decision — check, route, execute, fail — is written to an immutable hash chain. High-risk ops (prod deploys, migrations) always require human approval.
The MCP servers and SDK are self-hostable today — they are npm packages, you run them. The managed orchestration layer is hosted by default; self-hosted enterprise deployments are on the roadmap.
We believe the tools that move money should be auditable.
Every MCP server, every tool — MIT licensed and published on npm. Every line of code is public. Every wrapper is tested. Every integration is production-ready. codespar.dev/open-source
Your agent is ready to run the business.Is your stack?
Start free on open source. Upgrade when you need the orchestration layer.