Skip to main content
All posts
Thesis

MCP Is a Commodity. Here's What Isn't.

The 7 layers between an agent and a completed transaction - and why each one is a moat. The aggregator of MCPs + payments is the wedge. The moat is what we build on top of the volume that wedge generates.

FC
Fabiano Cruz
Co-founder, CodeSpar
Thesis
2026.04.15
25 min

Let's start with the uncomfortable truth.

MCP is auto-descriptive by design. Any developer can read the tool schema, understand the interface, and build a competing server. The switching cost for a developer using an MCP server is, in the worst case, a single string change in the workload definition. One line. One deploy. Done.

If we stop at "MCP aggregator + payment rails," we become a utility with thin margins. A commodity layer. The kind of business that survives on pricing and distribution, not on structural advantage.

That's not a company worth building. That's a feature inside someone else's company.

We know this. And we've built accordingly.

We've heard this question from every investor we've talked to. We've heard versions of it from developers, from potential partners, from other founders in the space. And the question is valid. In fact, it's the right question. Any investor who doesn't ask it isn't doing their job.

So when a VC asks, "What stops anyone from copying you?" - the honest answer is: nothing stops them from copying the MCP servers. We publish them under MIT. We want them copied. The protocol layer is supposed to be commoditized. That's the entire point of open standards.

The defensibility isn't in the protocol. It's in what happens between the agent and the final result.

Between "buy 500 units of SKU X, deliver to Sao Paulo, under R$Y" and the goods landing on a shelf with an NF-e issued, a Pix settled, and an ERP reconciled, there are layers. Seven of them. Each requires data, history, relationships, and risk that don't travel in a config string. Each one compounds over time. And each one, once established, is brutally expensive to replicate.

The aggregator of MCPs + payments is the wedge. The moat is what we build on top of the volume that wedge generates.

This post lays out those seven layers. Not as a roadmap to announce. As an architectural argument for why the company that processes the most agent commerce volume in Latin America will be nearly impossible to displace - and why we intend to be that company.

If you're an investor, this is the answer to your most important question. If you're a builder, this is the architecture you should be betting on. If you're a competitor, this is what you're actually up against.

The 7 Moat Layers
01
Best Agent Commerce Route
BACR
02
Agent-to-Agent Negotiation
A2A-N
03
Programmable Wallet + Policy
WALLET
04
Agent Identity & Trust Graph
TRUST
05
Post-Trade Resolution
DISPUTES
06
Shared Commercial Memory
MEMORY
07
Embedded Compliance & Fiscal
FISCAL

Layer 1: Best Agent Commerce Route (BACR)

In equities trading, there's a concept called "best execution." When a broker receives an order to buy 10,000 shares of PETR4, they don't just hit the first ask on B3. They route across venues, assess liquidity, estimate slippage, factor in latency, and execute in a way that minimizes total cost. Regulators require this. Markets depend on it.

Agent commerce has the same problem. No one has built the solution yet.

When an agent receives the intent buy 500 units of SKU X, deliver to Sao Paulo, under R$Y, the naive approach is to hit a single seller's API. The intelligent approach is to route across multiple sellers, payment gateways, and logistics providers - optimizing price, speed, availability, and fraud risk simultaneously, in real-time.

This isn't theoretical. As agent commerce scales, every buyer agent will face this problem: there are multiple sellers offering the same product, multiple payment methods with different costs and settlement times, multiple logistics providers with different SLAs and pricing. The agent that routes blindly overpays. The agent that routes intelligently saves its operator money on every single transaction. At scale, the difference is enormous.

What BACR requires

Historical fill rate telemetry. Which sellers actually fulfill orders? Which ones accept the order but cancel 12 hours later? Which ones ship on time vs. two days late? This data doesn't exist in any public API. It accumulates inside the middleware operator that processes the transactions.

Latency and dispute data per seller. Seller A responds in 200ms with 0.3% dispute rate. Seller B responds in 2s with 4.1% dispute rate. The agent should know this before routing. We know it because we process the volume.

Dynamic pricing models. Seller A charges R$14.20 per unit at 9am and R$15.80 at 4pm. Seller B is flat at R$14.90. The optimal route changes by the hour. You need volume to build these models. You need models to route the volume. That's a flywheel.

Supply prediction and SLA tracking. Seller A is running low on inventory - our telemetry shows declining fill rates over the last 48 hours. Route to Seller B preemptively. A competitor starting from zero has no signal. They route blind.

Why this is a moat

BACR is not round-robin load balancing. It's not a weighted random function with a retry loop. It's an execution engine that improves with every transaction routed through it. More volume routed = better BACR. Better BACR = more volume attracted. A new competitor starts with zero data and zero accuracy. They're not behind by months. They're behind by millions of data points.

This is the same structural advantage that made Citadel Securities dominant in equities market-making. The execution quality creates volume. The volume creates execution quality. Breaking into that loop requires either a massive capital subsidy or a fundamentally different architecture. Neither is easy.

Consider the timeline. A competitor launches an MCP aggregator on day one. They have zero transaction history. Their routing is random or heuristic-based. Their fill rate predictions are guesses. Meanwhile, we've processed millions of transactions, know which sellers are reliable on Tuesdays vs. Fridays, know which payment gateways fail during SEFAZ maintenance windows, and know which logistics carriers lose packages on routes to the interior of Minas Gerais.

That knowledge gap doesn't close with funding. It closes with time and volume. And we have both.

Layer 2: Agent-to-Agent Negotiation (A2A Bargaining)

Today, MCP is dumb request/response. An agent calls a tool. The tool returns a result. There is no negotiation, no counterproposal, no back-and-forth. It's the equivalent of walking into a store, seeing a price tag, and either paying or leaving.

That's not how commerce works. Especially not in Latin America, where negotiation isn't a feature - it's the culture. Ask any Brazilian procurement manager how they buy. They negotiate. Every time. The listed price is the starting point, not the final price. Volume discounts, payment term flexibility, bundled shipping, loyalty rebates - all of this happens in conversation. An agent that can't negotiate is an agent that overpays.

We're building a stateful negotiation layer where a buyer agent and a seller agent can negotiate price, terms, bundles, delivery windows, and payment conditions. Not through rigid rule engines. Through learned strategies.

What the negotiation layer delivers

Learned concession strategies. When should the buyer agent concede on price to secure faster delivery? When should it hold firm? When should it walk away entirely? These strategies are trained on the corpus of completed negotiations - a dataset that only the middleware operator accumulates.

Cross-counterparty reputation. Seller agent Alpha has a pattern: it opens high, concedes 12% on average, and always bundles free shipping above R$2,000. Our buyer agent knows this before the first message. A new competitor's agent is negotiating blind.

Atomic settlement. When negotiation concludes, the agreed terms settle atomically - payment initiates, NF-e parameters lock, shipping SLA commits. No gap between "we agreed" and "it's done." This requires deep integration with layers 3 (wallet), 5 (disputes), and 7 (fiscal). You can't bolt it on. It's architectural.

The corpus of negotiations is the moat. Every deal that passes through the middleware trains the next deal. A competitor launching a negotiation layer without historical data is bringing a spreadsheet to an algorithmic trading desk.

This is research-grade work. Nobody in Latin America is building agent-to-agent negotiation with learned strategies and atomic settlement. The closest analogs are in DeFi (automated market makers) and programmatic advertising (real-time bidding). We're bringing those principles to physical commerce.

Why does this matter for defensibility? Because negotiation strategies are only as good as the data they're trained on. A competitor can copy the protocol. They cannot copy the corpus. They cannot copy the counterparty profiles. They cannot copy the learned walk-away points that took thousands of negotiations to calibrate. The protocol is open. The intelligence is proprietary. And the intelligence compounds with every deal.

Layer 3: Programmable Wallet + Budget + Policy Engine

Here is a question every CFO will ask before letting an AI agent spend company money:

"How do I control what it spends?"

The answer cannot be "give it a corporate card and hope for the best." No CFO in the world will accept "the AI has the company Amex." The answer has to be programmable, auditable, policy-driven, and integrated with the company's existing approval workflows. This isn't a nice-to-have. It's the prerequisite for enterprise adoption of agent commerce. Without it, agents stay in the sandbox forever.

That's what this layer delivers.

What we build

Programmable wallet per agent, per workload, per end-user. Agent X has a wallet with R$5,000 loaded. Agent Y has R$500. Each wallet is scoped, traceable, and reconcilable independently. No shared pool of funds with opaque access.

Policy engine. "Agent X can spend up to R$500/day in category 'office supplies', needs human approval above R$2,000 in any category, and is blocked from 'entertainment' entirely." These policies are defined by the tenant, enforced by the middleware, and audited in real-time. The agent never touches a raw payment API.

Budget pooling. Three agents of the same tenant share a monthly budget of R$50,000. The policy engine tracks aggregate spend, alerts at 80%, and hard-blocks at 100%. Cross-agent budget coordination is something a single MCP server fundamentally cannot do.

Reconciliation and accounting audit trail. Every transaction ties back to an agent, a workload, a policy, an approver, and a fiscal document. The CFO doesn't just see "R$14,200 spent this month." They see exactly which agent spent it, on what, under which policy, approved by whom, with the NF-e attached.

Why switching is a 6-month project

Once the CFO approved the policy structure, once the accounting team integrated the reconciliation feed, once the auditor blessed the trail - switching providers is not a string change. It's a 6-month project involving legal, finance, compliance, and IT. That's not lock-in through malice. That's lock-in through operational depth. The same reason companies don't switch ERPs on a whim.

Layer 4: Agent Identity & Trust Graph

Today, agents are anonymous. An agent that calls your API looks identical to a bot, a scraper, or a legitimate customer. There is no identity layer. No reputation. No history. Every interaction starts from zero trust.

This is unsustainable for commerce. Sellers need to know who they're transacting with. Buyers need to know who they're buying from. And both need a system of record that tracks behavior over time.

What we build

Agent identity with KYC linkage. Every agent that passes through CodeSpar gets an identity: a unique ID, a history, a reputation score. Behind every agent identity sits a verified human operator - KYC'd, linked to a CNPJ or CPF, traceable. The agent is autonomous. The accountability is human.

Behavioral reputation. Agent Alpha has completed 2,400 transactions with a 99.1% fulfillment rate, 0.2% dispute rate, and average settlement time of 3.2 seconds. Agent Beta has completed 12 transactions with a 67% fulfillment rate and 8% dispute rate. The seller's system should treat them differently. Ours does.

Trust-gated access. Sellers start requiring "CodeSpar-verified agent" as a prerequisite to accept orders. Not because we force them. Because the trust signal is valuable. A verified agent with a 99%+ fulfillment rate is a better counterparty than an anonymous API call. The seller knows it. We just make it legible.

This is a classic two-sided network effect. More agents create more data. More data creates better trust signals. Better trust signals attract more sellers. More sellers attract more agents. The cost of leaving is not switching a tool. It's abandoning a reputation built over thousands of transactions.

Compare this to credit scores. Once the ecosystem trusts your score, rebuilding it elsewhere costs years. SERASA took decades to become the trust layer for Brazilian consumer credit. We intend to become the trust layer for agent commerce. The dynamics are identical. The timeline is compressed because agent transaction velocity is orders of magnitude higher than human transaction velocity.

There's a subtlety here worth highlighting. The trust graph doesn't just protect against competitors. It protects against disintermediation. A seller could theoretically build a direct integration with a buyer agent, bypassing CodeSpar entirely. But why would they? The trust signal we provide - "this agent has a 99.3% fulfillment rate across 5,000 transactions" - is worth more than the margin they save by going direct. We don't just sit between agents and sellers. We make the relationship between them better. That's why they keep us there.

Layer 5: Post-Trade - Disputes, Chargebacks, Reconciliation

Everyone wants to build the buy button. Nobody wants to build what happens when the buy goes wrong.

When the agent buys the wrong SKU. When the product doesn't arrive. When the seller overcharges. When the NF-e has the wrong CFOP code. When the Pix settles but the seller claims it didn't. When the logistics provider loses the package and both parties point fingers.

Who resolves it?

Today, the answer is "a human, manually, after hours of back-and-forth." In agent commerce, there is no human in the loop by default. The resolution layer has to be built into the infrastructure. We build it.

What we build

Automated dispute detection. The agent ordered 500 units. The seller shipped 480. Our reconciliation layer catches the discrepancy before the buyer even checks. The dispute is opened automatically, with evidence attached: the original order, the shipping manifest, the delivery confirmation. No human had to notice. No human had to file a ticket. The infrastructure caught it.

Evidence-based resolution. Every transaction has a complete audit trail: the negotiation (Layer 2), the policy approval (Layer 3), the trust scores (Layer 4), the fiscal documents (Layer 7). Disputes don't devolve into he-said-she-said. They resolve on evidence.

Precedent database. Dispute #4,712: Seller X shipped late again. Resolution: 15% credit, consistent with precedent from disputes #2,301, #3,044, and #3,891 involving the same seller and similar delay patterns. The system learns. Resolutions get faster and more consistent over time.

The boring infrastructure moat

Dispute resolution is unglamorous. It's not the feature you demo to investors. But it's the feature that makes you irreplaceable. The dispute history lives with us. Switching means losing all precedent. Every resolved dispute makes the next resolution faster. Every unresolved dispute at a competitor takes weeks. This is the "boring infrastructure" moat that Stripe, Adyen, and Shopify all built and all benefit from.

There's a legal dimension here too. As agent commerce scales, regulators will ask: who is responsible when an agent makes a purchase that goes wrong? Who mediates? The company that has the dispute history, the precedent database, and the audit trail is the natural answer. We don't just want to resolve disputes. We want to be the jurisdiction of record for agent commerce disputes in Latin America. That's a regulatory moat that takes years to establish and cannot be forked from a GitHub repo.

Layer 6: Shared Commercial Memory (Opt-in, Tenant-Scoped)

Every time an agent completes a transaction, it learns something. Supplier A delivers faster than Supplier B. The approver for purchases above R$5,000 is Maria, not Carlos. The preferred logistics carrier for fragile goods is Jadlog, not Correios. The negotiated rate with Seller X is R$13.80/unit, valid until Q3.

Today, this knowledge lives in the agent's prompt. Or in the developer's head. Or nowhere. It evaporates between sessions, between frameworks, between agent versions. Every new agent starts from zero context.

We fix this.

What we build

Persistent commercial memory. The agent's accumulated knowledge - preferences, preferred suppliers, negotiated terms, approval hierarchies, budget patterns - lives in our infrastructure. Not in the prompt. Not in the framework. In a durable, queryable, versioned memory layer that persists across sessions, across frameworks, across agent versions.

Framework-portable. Switch from LangChain to CrewAI to AutoGen. The commercial memory travels with you. It's attached to the tenant, not to the framework. This is deliberate: we want developers to feel free to switch frameworks, because the memory stays with us regardless.

Opt-in and tenant-scoped. Your data never leaks to other tenants. The memory is scoped to your organization, controlled by your policies, deletable on demand. This isn't surveillance. It's institutional knowledge preservation.

Switching away from CodeSpar means losing your agent's accumulated commercial intelligence. Every supplier preference. Every negotiated rate. Every approval pattern. It's the equivalent of switching ERPs - technically possible, practically unthinkable after 12 months of accumulated context.

The closest analog is Salesforce. Not the CRM features - those are commoditized. The data. The reason companies don't leave Salesforce isn't that they love the UI. It's that 10 years of customer relationships, pipeline history, and institutional knowledge lives there. We're building the same gravity for agent commerce.

And here's the critical detail: this memory doesn't just help the current agent. It helps every future agent the tenant deploys. Spin up a new procurement agent in January? It inherits the supplier preferences, negotiated rates, and approval hierarchies from the agent that ran all of last year. The memory is organizational, not individual. It belongs to the tenant, not to any single agent instance. That means every new agent is better on day one than a competitor's agent after a month. The compounding advantage is structural.

Layer 7: Embedded Compliance & Fiscal (LatAm-Specific)

This is our unfair advantage. Not because we're smarter than anyone else. Because we chose to build where the complexity is highest and the reward for solving it is greatest.

Let me list what a foreign agent needs to handle to complete a single commercial transaction in Brazil:

NF-e (Nota Fiscal Eletronica). Electronic invoice. Required for every commercial transaction. Validated in real-time by SEFAZ. Different XML schemas per state. Different CFOP codes per operation type. Different ICMS calculations per product category per state. Get any of it wrong and the invoice is rejected. Get it wrong enough times and the CNPJ gets flagged.

Tax withholding. ISS, PIS, COFINS, CSLL, IR - each with different rates, different thresholds, different rules for services vs. goods, different rules per municipality. Sao Paulo has different ISS rules than Belo Horizonte. Both change regularly.

SPED. The federal tax reporting system. Monthly obligations. Digital bookkeeping. Fiscal documents must be machine-readable and compliant with dozens of layout specifications that change with each new normative instruction.

Pix with reconciliation. Instant payment is easy. Instant payment with proper reconciliation against NF-e, with correct tax treatment, with audit trail, integrated with SPED - that's a different problem entirely.

BCB-regulated split payments. The Banco Central do Brasil has specific regulations for payment split operations. Marketplace models, intermediation, escrow - each has compliance requirements that don't fit in a generic MCP tool definition. Get it wrong and you're not just non-compliant - you're operating an unregulated financial institution. The penalties are existential.

The regulatory moat

Regulatory complexity is not a bug. It's our moat. Every new tax rule from Receita Federal, every SEFAZ schema change, every BCB circular, every municipal ISS update - each one makes our compliance layer more valuable, not less. A generic global platform treats regulatory complexity as a cost center. We treat it as a competitive advantage.

A foreign agent cannot solve this alone. A foreign platform will not invest in solving it until the market is large enough to justify the cost. By then, we'll have years of production compliance data, edge case handling, and regulatory relationships that don't transfer.

And Brazil is just the beginning. Mexico has CFDI and SAT. Argentina has Factura Electronica and AFIP. Colombia has DIAN. Each country has its own fiscal authority, its own XML schemas, its own compliance calendar, its own tax withholding rules. Every country we add deepens the moat.

Here's what a global competitor faces: they need to build compliance layers for 20+ Latin American jurisdictions, each with different authorities, schemas, timelines, and enforcement mechanisms. They need local legal counsel in each country. They need engineers who understand the difference between CFOP 5102 and 6102. They need to know that SEFAZ-SP has maintenance windows on Saturday mornings and that NF-e rejection code 539 means the CNPJ's Inscricao Estadual was cancelled, not invalid. This is not the kind of knowledge you acquire from documentation. This is the kind of knowledge you acquire from running in production, in-country, for years.

The Wedge vs. The Moat

Let me be precise about the strategy, because the distinction matters.

The wedge is the MCP aggregator + payments. It's what gets us in the door. A developer installs @codespar/mcp-zoop, their agent can charge via Pix in five minutes. That's valuable. That's useful. And it's reproducible by anyone with a weekend and the Zoop API docs.

The moat is Layers 1 through 7. It's what makes us impossible to remove once we're in.

The wedge gets us volume. The volume feeds the moat. The moat protects the volume. This is not a metaphor. It's the literal mechanics of how the business compounds.

1wedge layer (copyable)
7moat layers (compounding)
switching cost after 12 months

The compounding loop

Watch how the layers reinforce each other:

BACR improves with volume - every transaction routed trains the routing model. Better routing attracts more transactions.

Volume increases with the trust graph - sellers accept more orders from verified agents. More orders mean more volume for BACR.

The trust graph deepens with dispute resolution - every resolved dispute updates reputation scores. Better reputations mean more trust. More trust means more sellers joining.

Disputes feed commercial memory - every dispute resolution teaches the system what went wrong and how to prevent it. The memory makes future transactions smoother.

Memory makes switching impossible - after 12 months, the agent has accumulated supplier preferences, negotiated rates, approval workflows, and fiscal configurations that represent the company's operational knowledge. Leaving means starting over.

The wallet locks in finance teams - once the CFO approved policies, once accounting integrated the audit trail, once compliance blessed the reconciliation - switching is a board-level decision, not a developer decision.

Compliance locks in geography - every NF-e rule we encode, every SEFAZ quirk we handle, every BCB regulation we implement - it's another reason a foreign competitor can't just "enter LatAm."

By the time a competitor launches their MCP aggregator, we'll be seven layers deep. They'll be competing on the wedge while we're compounding on the moat.

The Compounding Loop
Wedge (MCP + Payments)Volume
VolumeBetter BACR routing
Better BACRMore sellers join
More sellersDeeper trust graph
Trust graphFaster dispute resolution
Disputes resolvedRicher commercial memory
Commercial memorySwitching cost compounds
Switching costVolume locks in

Why LatAm First

A brief coda on geography, because the choice of starting market is itself a defensibility decision.

These seven layers are harder to build in Latin America than anywhere else. The regulatory complexity is real. NF-e alone has thousands of validation rules that change quarterly. Each Brazilian state has different ICMS rates. Each Mexican state has different ISR withholding rules. The fiscal infrastructure is sophisticated but fragmented and deeply local.

But that's exactly the point.

Easy markets attract competition. Hard markets build moats. The same regulatory complexity that makes it painful to build here makes it painful for anyone to follow us here. Every SEFAZ edge case we encode is a barrier to entry. Every BCB regulation we implement is a year of compliance work a competitor hasn't done. Every CFDI validation rule is institutional knowledge they don't have.

The instant payment infrastructure (Pix, SPEI, Transferencias 3.0) is more advanced than anything in the US. The digital fiscal infrastructure (NF-e, CFDI) is more structured than paper-based systems elsewhere. The commercial culture (negotiation-heavy, relationship-driven, WhatsApp-native) demands layers that generic global platforms won't build.

And the market is massive. Brazil alone has 21 million active companies. Mexico has 6 million. Colombia, Argentina, Chile, Peru - another 10 million combined. These aren't future customers. These are businesses operating today, with real commerce, real fiscal obligations, and real pain. When their agents need to transact, they'll need infrastructure. We're building it.

Latin America is where the seven layers are hardest to build and hardest to replicate. Once built, they don't just work here. They become the blueprint for every other complex market: India, Southeast Asia, the Middle East, Africa. Markets where commerce is real, regulations are dense, and agents need local infrastructure to function.

There's a reason Stripe started in the US and expanded outward. There's a reason Adyen started in Europe. Each built where they understood the complexity best, then exported that expertise. We're building where the complexity is deepest - and where the competition is thinnest. When we expand to India or Southeast Asia, we won't be starting from scratch. We'll be porting a battle-tested architecture with seven proven moat layers. The compliance layer changes. The architecture doesn't.

Start where it's hardest. The moat digs itself.

4countries with fiscal coverage
26Brazilian states with different ICMS rules
0global competitors with LatAm depth

The Conviction

We started this post with the uncomfortable truth: MCP is a commodity. Switching cost is a string. Anyone can build a server in a weekend.

We end it with a different truth: MCP is a commodity, and that's exactly why we win.

A commoditized protocol means every agent, in every framework, can reach our infrastructure. It means we don't need to win a protocol war. It means our wedge is frictionless. And a frictionless wedge is the fastest path to the volume that feeds the seven layers that no one can replicate.

MCP is a commodity. We agree. We celebrate it. We publish our MCP servers under MIT and encourage people to fork them.

But the seven layers between the agent and the completed transaction are not a commodity. They are the product of volume, data, relationships, compliance, and operational depth that accumulate over years and compound over time.

The wedge is easy to copy. The moat is not.

We are not building an MCP aggregator. We are building the commerce operating system for AI agents in Latin America - starting with the wedge that gets us in, and building the seven layers that make us impossible to remove.

Every layer we ship makes the next layer easier to build. Every transaction we process makes every layer stronger. Every month that passes widens the gap between us and anyone who starts later. This is the fundamental asymmetry of the business: the cost of building layer N decreases when you already have layers 1 through N-1. For a competitor starting fresh, the cost of building all seven layers simultaneously is prohibitive.

The question is not whether someone will try to copy our MCP servers. They will. The question is whether they can replicate the routing intelligence, the negotiation corpus, the wallet policies, the trust graph, the dispute precedents, the commercial memory, and the fiscal compliance - all at once, all compounding, all reinforcing each other - before we're too deep to catch.

We don't think they can. Not because we're arrogant. Because we understand the math. Seven layers. Each one compounds. The product of compounding advantages is not additive - it's multiplicative. And we're not waiting for permission to start building. We're building now.

That's not a pitch. That's an architectural reality. And we're already building it.

Fabiano Cruz is co-founder of CodeSpar. This post is the second in the thesis series - the first, "The commerce layer for AI agents doesn't exist yet," lays out the founding argument. CodeSpar's MCP servers are open source on GitHub and available on npm.