Building a MCP Server for Agentic Commerce (PayPal Edition)
Written by Om-Shree-0709 on .
Imagine an AI agent that shops for you—browsing catalogs, comparing prices, completing checkout, and tracking delivery. In their MCP Summit session, Brenden Lane and Nitin Sharma from PayPal showed this is not just possible—it’s already happening. With MCP servers, agents can now handle entire shopping workflows end-to-end.
Problem
Online shopping today is still largely manual. Users search, compare, and buy. Merchants, in turn, run ads and promotions hoping to catch attention. This human-first loop feels outdated. What if agents could handle the shopping for us?
The Approach
PayPal’s MCP server for Agentic Commerce gives AI agents the tools to:
- Browse and search product catalogs
- Compare products and prices
- Make secure purchases with authentication
- Check shipping, inventory, and payment options
All done through structured tool calls over MCP.
Example Server Design (TypeScript)
A simple way to build such a server in TypeScript:
1. Directory Structure
2. Main Server Setup (mcp-server.ts)
3. Example Checkout Tool (tools/checkout.ts)
Key Takeaways
- Typed tools help agents perform complex tasks like shopping securely and reliably.
- Clear tool boundaries make the system easier to maintain.
- Control mechanisms like audit logs and access restrictions are essential.
PayPal’s server also prioritizes trust, schema checks, sandbox testing, and discovery across agents.
Acknowledgements
This guide is based on Brenden Lane and Nitin Sharma's session at the MCP Summit – Building a MCP Server for Agentic Commerce, where they demonstrated how to build a full-stack server for agent-driven shopping.
Thanks to the Anthropic team and the broader MCP developer community for their ongoing contributions to this space.
Written by Om-Shree-0709 (@Om-Shree-0709)