Commit f1fef38
committed
feat: Add MCP (Model Context Protocol) sample implementation
This commit adds a new MCP binding sample for UCP, enabling AI agents to
interact with UCP-compliant merchants through the Model Context Protocol.
New files:
- mcp/python/ucp_mcp_server.py: FastMCP server exposing UCP capabilities
- Tools: list_products, create_checkout, add_to_checkout, complete_payment, etc.
- Resources: catalog, checkout sessions, orders, discovery profile
- Prompts: shopping assistant, order confirmation, product recommendations
- Supports stdio, HTTP, and SSE transports
- mcp/python/ucp_mcp_client.py: Example client demonstrating complete shopping flow
- Connects via MCP protocol
- Demonstrates happy path: browse -> checkout -> pay -> track
- mcp/python/README.md: Comprehensive documentation
- Architecture diagram
- Quick start guide
- Claude Desktop integration
- Development guide
- mcp/python/pyproject.toml: Project configuration with dependencies
Updated:
- README.md: Added MCP binding section with comparison table
This sample enables conversational commerce experiences by allowing LLMs
like Claude, GPT, and Gemini to perform shopping operations through the
standardized MCP protocol.1 parent 1b83acf commit f1fef38
File tree
5 files changed
+1778
-2
lines changed- mcp/python
5 files changed
+1778
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
52 | 89 | | |
53 | 90 | | |
54 | 91 | | |
| |||
0 commit comments