Skip to content

stephen-gilbert-cko/samples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal Commerce Protocol (UCP) Samples

This directory contains sample implementations and client scripts for the Universal Commerce Protocol (UCP).

Sample Implementations

REST Bindings

Python (REST)

A reference implementation of a UCP Merchant Server using Python and FastAPI.

  • Server: Documentation

    • Located in rest/python/server/.
    • Demonstrates capability discovery, checkout session management, payment processing, and order lifecycle.
    • Includes simulation endpoints for testing.
  • Client: Happy Path Script

    • Located in rest/python/client/.
    • A script demonstrating a full "happy path" user journey (discovery -> checkout -> payment).

Node.js (REST)

A reference implementation of a UCP Merchant Server using Node.js, Hono, and Zod.

  • Server: Documentation
    • Located in rest/nodejs/.
    • Demonstrates implementation of UCP specifications for shopping, checkout, and order management using a Node.js stack.

MCP Binding (Model Context Protocol)

A reference implementation using the Model Context Protocol for AI agent integration.

  • Server & Client: Documentation

    • Located in mcp/python/.
    • Exposes UCP shopping capabilities as MCP tools and resources.
    • Enables AI agents (Claude, GPT, etc.) to perform commerce operations.
    • Includes example client demonstrating complete shopping flow.

Key Features:

  • Tools for product discovery, checkout, payment, and order management
  • Resources for read-only access to catalogs, sessions, and orders
  • Prompts for reusable conversation patterns
  • Support for stdio, HTTP, and SSE transports

A2A Binding (Agent-to-Agent)

An example Business A2A Agent implementing the UCP Extension.

  • Agent & Client: Documentation
    • Located in a2a/.
    • Demonstrates agent-to-agent communication for commerce operations.
    • Includes chat client for interactive testing.

Protocol Binding Comparison

Binding Use Case Transport Best For
REST Traditional APIs HTTP Web/mobile apps, service integration
MCP AI Agents stdio/HTTP/SSE LLM integration, conversational commerce
A2A Agent Communication HTTP Multi-agent systems, automated workflows

Getting Started

Please refer to the specific README files linked above for detailed instructions on how to set up, run, and test each sample.

About

Samples for UCP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 67.5%
  • TypeScript 31.7%
  • Other 0.8%