Showing posts with label model context protocol. Show all posts
Showing posts with label model context protocol. Show all posts

Tuesday, July 28, 2026

The HTTP of AI Shopping: Inside UCP, MCP, and the Open Protocol Stack

In a nutshell (TL;DR)...

This document explores the shift toward "Agentic Commerce," where AI agents independently execute shopping tasks. This ecosystem is powered by three key open protocols: MCP for live data access, UCP for transaction management (carts, identity, and payments), and A2A for dynamic negotiations between software agents. These open standards are vital for a friction-free, competitive future in retail.

In a previous post I talked about the rise of Agentic Commerce and how it will transform the way we shop online. I asked you to imagine asking your Personal AI Assistant: "Find me a waterproof hiking jacket in olive green under $200, apply my store rewards, and ship it to my apartment by Friday."

Five years ago, that prompt would yield a list of web links. Today, the AI Agent doesn't just find the jacket, it checks real-time inventory, verifies your loyalty tier, negotiates dynamic discounts, and executes the purchase without you ever loading a checkout page.

I’ve also delved into the magic sauce that makes this happen but let’s try and bring together the main components into one post and try to understand what is at play. It is an underlying stack of open protocols, a collection of open-source technical standards forming what experts are calling the "HTTP of Agentic Commerce".

If you want to understand how software will trade billions of dollars over the next decade, you need to understand the protocols making it happen: MCP, UCP, and A2A.

1. The Context Layer: Model Context Protocol (MCP)

Before an AI agent can buy anything, it needs access to real-time information. Language models are inherently isolated; they don't natively know if a store has 3 items left in stock or if a price dropped five minutes ago.

Enter Model Context Protocol (MCP), open-sourced by Anthropic.

MCP acts as a universal adapter between AI models and external data tools. Think of it as USB-C for AI: instead of developers writing custom API connectors for every single product database, store backend, or CRM, MCP provides a standardized format for agents to query live data.

What MCP Handles in E-Commerce:

  • Live Inventory Checks: Quoting real-time stock counts across multiple warehouse locations.

  • Spec Parsing: Extracting structured technical specifications (e.g., precise dimensions, fabric weight, voltage) from unstructured databases.

  • Contextual Inputs: Feeding user preferences, sizing profiles, and past purchase histories securely to the AI model.

2. The Commerce Layer: Universal Commerce Protocol (UCP)

While MCP provides data context, it isn't built to orchestrate end-to-end retail transactions. Querying an API for stock is easy; creating a multi-item cart, applying promotional codes, initiating identity verification, and managing payments requires a formal commerce standard.

To solve this, Google teamed up with retail and infrastructure giants—including Shopify, Etsy, Target, Walmart, Visa, and Stripe—to release the Universal Commerce Protocol (UCP).


+----------------------------------------------------+
|               CONSUMER AI SURFACES                |
|     (Gemini, AI Search, Custom Assistants)         |
+----------------------------------------------------+
                            |
                            v
+----------------------------------------------------+
|        UNIVERSAL COMMERCE PROTOCOL (UCP)           |
| Standard primitives for Cart, Identity & Checkout |
+----------------------------------------------------+
            /              |              \
            v               v               v
  +---------------+---------------+--------------+
  |    MERCHANT  |   LOYALTY &   |    PAYMENT  |
  |    BACKEND   |    IDENTITY   |   PROVIDERS |
  +---------------+---------------+--------------+

UCP defines an open-source communication specification for e-commerce operations. It doesn't replace existing merchant platforms like Shopify or WooCommerce; it gives AI agents a set of standard functional primitives to talk directly to them.

Core UCP Primitives:

  1. Catalog & Discovery: Exposing structured, real-time product catalogs directly to AI crawlers.

  2. Cart Management: Enabling agents to create, modify, and calculate sub-totals for multi-item carts programmatically.

  3. Identity & Loyalty Linking: Recognizing that "John Doe" is a Gold Tier member at a store, applying member pricing automatically without forcing a manual login on a website.

  4. Checkout & Orchestration: Tokenizing payments and completing transactions securely while keeping the merchant as the official Merchant of Record.

3. The Negotiation Layer: Agent-to-Agent Protocol (A2A)

The ultimate evolution of agentic commerce isn't just a buyer bot interacting with a static website backend—it's software negotiating with software.

Agent-to-Agent (A2A) protocols establish rules for buyer agents (representing consumers) and seller agents (representing brands) to interact dynamically.

How A2A Dynamics Work in Practice:

  • Dynamic Bundling: A buyer agent requests a camera, lens, and tripod. The brand's seller agent calculates real-time margins and responds: "If you buy all three together, I can offer an instant $45 bundle discount."

  • Inventory Clearing: A merchant's AI agent notices excess seasonal inventory and dynamically grants targeted discounts to consumer agents searching for deals in that specific category.

  • Automated Terms Negotiation: Negotiating bulk order delivery timelines or return window extensions for enterprise purchases.

The Big Shift: Why Open Protocols Win

Why does this open architectural stack matter so much? Because walled gardens create friction, and friction kills conversion.

If every AI assistant required a proprietary integration to buy from every merchant, only massive platforms (like Amazon) would survive. Open standards like UCP, MCP, and A2A democratize the landscape. They allow a boutique clothing store running on a standard e-commerce platform to sell to a consumer using ChatGPT, Gemini, or a standalone personal AI assistant seamlessly.

The web was built on open transport protocols like HTTP and HTML. The era of agentic commerce is being built on data, transaction, and negotiation protocols. Brands that adopt these standards early won't just keep up, they will be the first ones discovered when software starts doing the shopping.



Tuesday, March 24, 2026

The Model Context Protocol (MCP): Bridging AI and Actionable Data

 My day job has recently introduced a new concept for me to understand in my daily life (like I need more new concepts to understand). The Model Context Protocol (MCP)...

What is MCP?

MCP is an open standard designed to unify how AI assistants and large language models (LLMs) connect with external data sources, tools, and environments. An MCP Server acts as a secure gateway or bridge between the AI application (the client) and external systems, such as databases, file systems, or APIs. It is frequently compared to a "USB-C port for AI," as it provides a universal, standardized interface for plugging external capabilities into AI systems.

For example this is incredibly useful if you are building a chatbot for your organisation and want your AI Assistant to have access to your internal customer support database to use as a knowledge base for resolving common issues and answer questions based on your company (i.e. it’s providing context to your AI service). Without it you would somehow have to expose all that information to the larger LLM which is just not gonna happen.

An MCP server exposes three core primitives to AI applications:

  • Tools: Executable functions that the AI can actively call to perform actions, such as writing to a database, executing a web search, or modifying a file.

  • Resources: Passive, read-only data sources that provide the AI with context, such as database schemas, API documentation, or your customer support database.

  • Prompts: Reusable instruction templates that help structure interactions and guide the AI through specific workflows. Prompts that are refined by the architect of the MCP server to provide you with more meaningful responses - saving you time in generating and testing these from scratch.

Why You Would Need an MCP Server?

  • To Eliminate Fragmented Integrations: Before MCP, developers had to write custom API integrations for every single external tool or system an AI needed to access. By implementing an MCP server, developers can build an integration once and grant the AI access to a vast, standardized ecosystem of resources without maintaining dozens of custom codebases.

  • To Enable Safe Action and Execution: LLMs are limited to the data they were trained on and lack built-in environments to safely execute code or make network requests on their own. An MCP server acts as a controlled execution layer. It keeps sensitive elements like API keys hidden from the model while the server handles the actual safe execution of tasks.

  • For Dynamic Tool Discovery: Unlike static API specifications (like OpenAPI) that must be pre-loaded into an LLM, MCP allows AI applications to query servers at runtime to dynamically discover what tools and resources are currently available.

  • To Ensure Security and Access Control: MCP servers are designed with enterprise security in mind, utilizing OAuth 2.1 for authentication and centralizing permissions management. This ensures that AI applications only interact with authorized data and that user-specific contexts are strictly respected so data does not leak between users.

  • For Portability Across Applications: Because MCP is vendor-agnostic and model-agnostic, you can build a toolset once via an MCP server and plug it into any compatible AI application or IDE—such as Claude Desktop, Cursor, Windsurf, or LangChain—without needing to rewrite the integration.

  • To Support Agentic Workflows: MCP facilitates conversational, multi-turn interactions through real-time updates and streaming (using Server-Sent Events). This allows AI agents to dynamically interact with multiple data sources, handle intermediate steps, and maintain persistent context over complex, multi-step tasks.

Why use MCP rather than an API?

While both APIs and MCPs aid in communication between systems, their core audiences, mechanisms, and philosophies differ significantly. A helpful way to frame the difference is that APIs connect machines, whereas MCP connects intelligence to machines.

Here are the primary differences between the two:

Target Audience and Optimization

  • APIs are built for human developers to write code against, optimizing software-to-software communication.

  • MCP is built specifically for AI models to streamline agentic interactions where an AI needs to reason about the data it receives.

Static vs. Dynamic Discovery

  • APIs rely on static contracts that must be pre-loaded, read, and manually interpreted to formulate requests.

  • MCP features dynamic discovery. An AI agent can query an MCP server at runtime to ask, "What tools can you offer?", and the server will automatically respond with a structured list of available tools, their descriptions, and parameter schemas. This means the AI always has an up-to-date view of its capabilities without needing manually updated documentation.

Security and Execution

  • APIs are exposed over the network and assume the caller can securely manage tokens, headers, and request formatting. However, AI models do not have built-in execution environments and cannot safely hold secrets like API keys.

  • MCP introduces a secure intermediary layer. The AI model never sees API keys or sensitive URLs. Instead, the AI asks the MCP server to use a specific tool, and the MCP server validates the input, securely executes the API call using its own hidden credentials, and returns only the safe results. MCP also standardizes security governance, utilizing protocols like OAuth 2.1 to ensure the AI only accesses data the user has explicitly authorized.

Granularity and Abstraction

  • APIs typically expose granular, entity-based endpoints (e.g., /users or /weather).

  • MCPs are less granular and focus on driving broader use cases. An MCP server exposes high-level capabilities (e.g., get_weather or get_open_supportIssues). A single MCP tool might execute several underlying REST API calls to gather all the necessary context for the AI.

LLM-Native Features

  • APIs are generally stateless request-response mechanisms.

  • MCP supports multi-turn, long-lived sessions (often using Server-Sent Events) that allow an AI agent to have back-and-forth interactions with a tool. Furthermore, MCP includes AI-specific features like sampling, which allows the MCP server to leverage the LLM's reasoning abilities. For example, an MCP server could fetch open issues and then use sampling to ask the LLM to filter them by "highest security impact"—a subjective analysis that a traditional REST API cannot natively perform.

Output Formatting

  • APIs return machine-readable data, such as raw JSON payloads and database entity IDs.

  • MCP is designed to return data optimized for an LLM's context window, often formatting responses as human-readable Markdown with fully hydrated entity names instead of raw IDs.

How secure is my data behind an MCP Server?

Because the Model Context Protocol (MCP) acts as a bridge between untrusted, model-generated inputs and sensitive external systems, a single weak point can turn that bridge into a pathway for exploitation. Securing an MCP deployment requires a "shared responsibility" model, where the server stands as a fortified wall protecting resources, and the client acts as a vigilant gatekeeper ensuring the AI does not overstep its bounds.

Academic research breaks down MCP threats into four main categories: malicious developers, external attackers, malicious users, and security flaws. In practice, these manifest as prompt injection, command execution, token theft, excessive permissions, and unverified endpoints.

To protect yourself, you must implement strict safeguards across both MCP servers and MCP clients and quite honestly 99.9% of it goes straight over my head. It can be “dead secure” is what I’ll say on the matter.

How does MCP make my life easier?

So let’s list out a few scenarios where an MCP Server would make sense. At the end of the day it sits in the background and makes interaction with AI more meaningful as it has access to more capabilities and context of the organisation you are talking to.

Software Development and Debugging

The AI coding assistant is greatly enhanced by using MCP to connect directly to local filesystems and version control systems like Git or GitHub. Instead of manually pasting code snippets into a chat, the AI can securely browse your local files, read repository code, search codebases, review pull requests, and even commit changes directly within environments like Cursor or Claude Desktop.

Automated Travel Planning

The true power of multi-server MCP architecture shines here by combining multiple disparate services into one workflow. By connecting a Travel Server, a Weather Server, and a Calendar Server, an AI agent can autonomously read your calendar to find available dates, check destination weather forecasts, search and book flights, and automatically add the itinerary to your schedule while emailing you a confirmation.

Workflow and Communication Automation

AI can connect seamlessly to platforms like Slack, Gmail, or Google Drive. An AI assistant can search through your team's Slack history to pull project context, summarize past decisions, and automatically draft and send emails based on a simple natural language request, all without you needing to switch tabs.

Data Analysis and Visualization

MCP allows AI models to connect directly to SQL databases, Google Sheets, or financial APIs. The AI can read raw data like customer feedback or stock market history, execute complex queries, and instantly generate interactive charts or analytical dashboards. For instance, an AI can use the Alpha Vantage MCP server to fetch 10 years of historical coffee prices and immediately plot an interactive visual graph for you.

Enterprise Knowledge Management

A multi-agent MCP setup can be entirely automated for a Training Management System that can use specialized MCP agents to automatically ingest uploaded PDF documents, extract key learning objectives, generate structured course modules, and create custom multiple-choice assessments without manual human intervention.

Ultimately, the core benefit of MCP in these scenarios is that it transforms AI from a passive text generator into an active, context-aware participant. By utilizing standardized tools, resources, and prompts, you gain a modular, secure way to grant AI access to your personal and business data without needing to write custom integrations for every single application.

That was a big chunk of stuff I learned this week… What next?


The HTTP of AI Shopping: Inside UCP, MCP, and the Open Protocol Stack

In a nutshell (TL;DR)... This document explores the shift toward "Agentic Commerce," where AI agents independently execute shoppin...