ucp-mock

Simulate the UCP vending checkout lifecycle for local integration testing.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/fxp/vending-protocol --skill ucp-mock
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ucp-mock
Source: https://github.com/fxp/vending-protocol/tree/main/adapters/ucp/mock
Command: npx skills add https://github.com/fxp/vending-protocol --skill ucp-mock

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It lets AI agents and engineers exercise a complete UCP vending-machine purchase flow without needing real hardware, so integration work can proceed safely in a local environment.

Core Features & Use Cases

  • End-to-end purchase simulation: Covers discovery, OAuth 2.0 authentication, cart browsing, checkout creation, checkout completion, order polling, and SSE event streaming.
  • Realistic vending scenarios: Simulates normal dispensing, slow fulfillment, empty-lane rejection, and offline-device errors to test retries and fallback handling.
  • Protocol validation: Exposes UCP envelopes, continue URLs, status transitions, totals, and payment-handler behavior so another agent can verify its client against a predictable mock.

Quick Start

Tell the agent to start the UCP mock server and run a full purchase flow against it using the local checkout and order endpoints.

Frequently Asked Questions about ucp-mock

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a UCP vending machine checkout flow without real hardware?

You can test a UCP vending machine checkout flow by running a local mock server that simulates the entire purchase lifecycle, including cart, checkout, order polling, and SSE dispense events. This allows integration testing safely in a local environment.

What vending machine error scenarios can I simulate for integration testing?

For integration testing, you can simulate normal dispensing, slow fulfillment, empty-lane rejection, and offline-device errors. These scenarios help validate retry mechanisms and fallback handling in your client during the checkout process.

Does the UCP mock support OAuth 2.0 and SSE event streaming?

Yes, the UCP mock supports OAuth 2.0 client credentials for authentication and SSE event streaming for dispense events. It provides a complete environment to validate payment handlers and order status transitions locally.

How do I validate UCP envelopes and payment handlers using a mock server?

You validate UCP envelopes and payment handlers by configuring the mock server to expose predictable status transitions and continue URLs. This allows another agent to verify its client against the mock's checkout completion and order polling responses.

Can I test AI agent cart and checkout workflows against a local mock server?

Yes, AI agents can test cart browsing, checkout creation, and checkout completion workflows against the local mock server. It simulates the full UCP vending purchase flow, enabling agents to safely exercise order polling and event streaming.