Every major platform shift produces the same pattern: intelligence arrives before infrastructure. The smartphone era had GPS, cameras, and app stores before it had Uber, Stripe, or Twilio. The cloud era had compute on demand before it had Terraform, Datadog, or Snowflake.
The agent era has intelligence. It does not have infrastructure.
Claude can write an entire codebase. GPT-4o can plan a supply chain. Gemini can analyze a P&L. But ask any of them to actually charge a customer, issue an invoice, book a carrier, notify the buyer, update the ERP, and reconcile the bank account?
They can't. Not because they're not smart enough. Because the tools don't exist.
This is the founding argument for CodeSpar. Not a product roadmap. Not a pitch. The conviction that drives everything we build.
I. The capability-infrastructure gap
Watch a senior engineer use Claude Code for an hour. It reads entire codebases, understands architectural patterns, writes idiomatic code in any language, and produces working pull requests. The capability is no longer debatable. It's here.
Now ask that same model to run a business. Not write code about a business. Actually run one.
Charge a customer via Pix. Issue a nota fiscal. Book a carrier through Melhor Envio. Notify the customer on WhatsApp. Register the sale in Omie. Reconcile the payment in Stark Bank.
It breaks. Every single time.
Not because the model doesn't know what Pix is. It does. Not because it can't understand NF-e requirements. It can. It breaks because there is no bridge between the model's intelligence and the APIs that commerce runs on.
The MCP ecosystem has exploded from 100,000 to 97 million downloads per month in 18 months. 5,800+ servers published. Slack, GitHub, Notion, Salesforce, Stripe, HubSpot, and hundreds more.
Zero cover Pix. Zero cover NF-e. Zero cover SPEI. Zero cover CFDI. Zero cover any commercial API that 700 million Latin Americans depend on.
The MCP ecosystem serves one continent. We serve the rest.
This is what we call the capability-infrastructure gap. The models are ready. The rails are not. And the gap is widest in the markets with the most complex commercial infrastructure: Latin America.
II. Why MCP is the right bet
We had a choice. Build an agent platform. Build a workflow tool. Or build the layer underneath both: the MCP servers that let any agent, in any framework, reach the local APIs that commerce depends on.
We chose the layer underneath. Here's why.
MCP is becoming the TCP/IP of AI tool use. Anthropic created it. The Linux Foundation governs it. Every major framework supports it. 97 million downloads a month. When you publish an MCP server, you publish a tool that any agent in any framework can use. Today and in ten years.
The question for any API that wants to be agent-accessible isn't "should we have an MCP server?" It's "why don't we have one yet?"
Six protocols are competing for dominance: Stripe ACP, Google UCP, AP2, MCP, A2A, Visa TAP. Everyone asks which one wins. Wrong question. They operate at different layers. The tool layer (MCP) and the payment protocol layer (ACP/UCP) don't compete. They complement. The tool layer wins regardless of which payment protocol wins.
We build the tool layer. That makes us protocol-agnostic by design.
III. Why Latin America
Three things make Latin America the best territory for this company. Not the only territory. The best one.
1. The infrastructure is more agent-ready than the US
This is counterintuitive. But it's true.
Pix: instant, 24/7, free, open API. 64 billion transactions in 2024. NF-e: fully digital, structured, machine-readable, validated in real-time by SEFAZ. Open Finance: mandated by the central bank. Compare that to ACH (days to settle), paper invoices, and fragmented banking APIs in the US.
Latin America's financial rails were built for the digital era. They just haven't been connected to agents yet.
2. The APIs exist. The MCP layer doesn't.
Zoop, Asaas, PagSeguro for payments. Nuvem Fiscal for invoicing. Melhor Envio for logistics. Z-API for WhatsApp. Omie for ERP. Stark Bank for banking. Conekta for Mexico. These are production APIs processing billions of dollars. Every one of them lacked an MCP server. We built dozens.
3. We got here first
We mapped 207+ companies in agentic commerce globally. Over $70M invested. The space is real and growing fast. But building for Latin American commerce requires something that capital alone can't buy: deep familiarity with SEFAZ, BACEN, CFDI, AFIP, and dozens of regional APIs that have no English documentation and no global equivalent.
We have that familiarity. And we've already shipped. Every day the catalog grows, the domain knowledge deepens, and the switching cost for developers who depend on our servers increases. That's not a window. That's a compounding advantage.
IV. The Complete Loop
A single MCP server is useful. npm install @codespar/mcp-zoop and your agent can charge via Pix in five minutes.
But the real thesis isn't individual tools. It's the orchestration.
A sale isn't complete when payment confirms. It's complete when the payment confirms, the invoice issues, the package ships, the customer gets notified, the ERP updates, and the bank reconciles. Six systems. Six APIs. Today, this takes 15 to 45 minutes per order across multiple people.
We do it in under five seconds. Zero humans.
This is where the thesis shifts from developer tooling to business transformation. Individual MCP servers save developer time. The Complete Loop eliminates entire job functions. That's a different economic conversation entirely.
The Complete Loop turns 45 minutes of manual work across 6 systems into 5 seconds of autonomous execution. For every order. Every day. At any scale.
V. The moat
The obvious question: what stops someone from copying this?
The honest answer: MCP is a commodity. It's auto-descriptive by design. Agents adapt to whatever the server exposes. Switching cost is a string in the workload definition. Anyone can build an MCP server - the SDK is open source, the APIs have documentation. A competent team could build a Pix server in a week.
If our thesis stopped at "we aggregate MCPs and facilitate payments," we'd be a utility with thin margins and high churn the day a hyperscaler ships the same endpoint.
The MCP aggregator + payment rails is the wedge. The moat is what we build on top of the volume that wedge generates.
The defensibility isn't in the protocol. It's in what happens between the agent and the final result - seven layers that require data, history, relationships, and risk that don't travel in a config string.
Layer 1 - Best Agent Commerce Route (BACR)
Analogous to best execution in equities. Given an intent - "buy 500 units of SKU X, deliver to São Paulo, under R$Y" - we route across multiple sellers, gateways, and logistics providers, optimizing price, speed, availability, and fraud risk in real-time. This requires historical fill rate telemetry, dispute data per seller, dynamic pricing models, and SLA tracking that the agent alone can't build.
The moat is the execution dataset. More volume routed = better BACR. A new competitor starts from zero.
Layer 2 - Agent-to-Agent Negotiation
Today MCP is dumb request/response. We deliver a stateful negotiation layer where a buyer agent and a seller agent can negotiate price, terms, bundles, and deadlines - with learned strategies, cross-counterparty reputation, and atomic settlement. This is research-grade. Nobody in LatAm is building it. The defensibility comes from the corpus of negotiations that only the middleware operator accumulates.
Layer 3 - Wallet, Budget, and Policy Engine
An agent should never have direct access to a corporate card. We deliver programmable wallets per agent, per workload, per end-user - with policies ("agent X can spend up to R$500/day in category Y, needs human approval above that"), budget pooling across agents of the same tenant, and full reconciliation with accounting audit trail. Once the CFO approves the policy and fiscal is integrated, switching providers is a six-month project, not a string change.
Layer 4 - Agent Identity and Trust Graph
Every agent that transacts through us accumulates history: reputation score, success rate, dispute rate, KYC of the human operator behind it. Sellers start requiring "CodeSpar-verified agent" as a prerequisite to accept orders. This is a classic two-sided marketplace network effect - more agents and sellers make it more expensive to leave. Like credit scores: once the ecosystem trusts your score, rebuilding it elsewhere costs years.
Layer 5 - Post-Trade: Disputes, Chargebacks, Reconciliation
The part nobody wants to build. When the agent buys the wrong item, when the product doesn't arrive, when the seller overcharges - who resolves it? We do. Becoming the dispute resolution layer between agents and humans is a massive legal and operational moat. The dispute history lives with us. Switching means losing all precedent.
Layer 6 - Shared Commercial Memory
The client's agent accumulates preferences, preferred suppliers, negotiated terms, approval chains. This memory lives in our infrastructure - not in the agent's prompt - and is portable across frameworks. Switching means losing context. It's the equivalent of switching ERPs: technically possible, practically impossible.
Layer 7 - Embedded Compliance and Fiscal
NF-e issuance, tax withholding, SPED reporting, Pix reconciliation, BCB-regulated split payments. A foreign agent can't solve this alone. Every new tax rule, every SEFAZ schema change, every BCB regulation makes our layer more valuable. Regulatory complexity isn't a bug. It's our moat.
Each layer feeds the next. BACR improves with volume. Volume increases with the trust graph. The trust graph deepens with dispute resolution. Disputes feed commercial memory. Memory makes switching impossible. By the time a competitor launches their MCP aggregator, we'll be seven layers deep.
Domain knowledge - knowing that SEFAZ rejects CNPJ-ME differently than CNPJ-LTDA, that ICMS varies across 26 states, that Pix keys can be deactivated with a silent 200, that Z-API webhooks arrive out of order under load - is the foundation. But domain knowledge alone is Layer 7. The full moat is all seven layers, and each one raises the cost of replacing us.
Our moat isn't technology. Technology is reproducible in months. Our moat is seven layers of data, relationships, and operational complexity that compound over time. Start where it's hardest. The moat digs itself.
VI. The compounding advantage
MCP went from 100K to 97M downloads in 18 months. Developers are choosing their default servers right now. Ecosystems are hardening. Defaults are being set.
Infrastructure advantages compound. Every server we ship, every edge case we handle, every developer who builds on our tools adds to the switching cost. A developer who's built their agent on @codespar/mcp-zoop isn't going to rewrite their integration because a new entrant publishes a competing server. Defaults are sticky. We intend to be the default.
Every production deployment teaches us something. A SEFAZ edge case. A Pix timing quirk. A Melhor Envio schema inconsistency. That knowledge goes into the next release. The next release makes the servers more reliable. More reliability means more adoption. More adoption means more production deployments. This is a flywheel, not a race.
VII. The bet
Strip away the framing. Here is the core belief:
AI agents will become the primary operational layer for commerce.
Not because anyone decided this. Because the economics are irresistible. An agent that runs your order fulfillment costs less than a human. Makes fewer errors. Operates 24/7. Scales without hiring. Doesn't take vacation. Doesn't make typos on invoices. Doesn't forget to notify the customer.
Once a business owner experiences an agent processing 100 orders while they sleep, they don't go back to doing it manually. That's not a prediction. That's human nature.
For this to happen in Latin America, agents need tools. Not generic tools. Tools that understand Pix, NF-e, CFDI, SPEI, Melhor Envio, WhatsApp, Omie, Stark Bank. Tools built by people who know why SEFAZ rejects certain schemas on Tuesday mornings in Sao Paulo but not in Recife.
We built them. They're live. Developers are using them today.
npm installed. MIT licensed. Production-ready. Shipping today.
CodeSpar makes it possible for any AI agent to run a business in Latin America. That's not a tagline. That's a capability that didn't exist six months ago.
That's the bet. The infrastructure gap is real. The timing is now. The domain knowledge is ours. The window is closing.
Everything else follows from that.
Fabiano Cruz is co-founder of CodeSpar. CodeSpar's MCP servers are open source on GitHub and available on npm. The complete landscape analysis referenced in this post is available as a separate Dispatch post.