In this section: Hands-On Examples
- Chapter 4 Feature Flag Evaluator Tutorial
- Chapter 5 Post Fetcher Runtime Tutorial
- Chapter 6 Universal Microservices Architecture (UMA) Portability Lab Tutorial
- Chapter 7 Metadata Orchestration Tutorial
- Chapter 8 Service Graph Evolution Tutorial
- Chapter 9 Trust Boundaries Tutorial
- Chapter 10 Architectural Tradeoffs Tutorial
- Chapter 11 Evolution Without Fragmentation Tutorial
- Chapter 12 Discoverable Decisions Tutorial
- Chapter 13 Portable MCP Runtime Tutorial
Chapter 13 UMA code example
Portable MCP runtime tutorial
This tutorial is the repo reference application. It composes discoverable capabilities into workflows, lets AI propose without becoming authoritative, and explains the execution through CLI, JSON, MCP, and a browser app.
Keep the final chapter’s navigation close to the lesson so the source, the examples index, and the previous step remain visible up front.
What you will learn
- how WASM MCP exposes discovery and invocation surfaces
- how the UMA runtime validates and executes selected capabilities
- how AI-backed capabilities participate with explicit fallback reporting
Prerequisites
- Rust 1.76 or newer
- wasm32-wasip1 target
- Node.js 20 or newer
- npm
- Wasmtime on your PATH
Run this setup command before the lab if your machine does not already have the target installed.
rustup target add wasm32-wasip1
Full tutorial
- Enter the example
cd chapter-13-portable-mcp-runtime - Set up pinned model artifacts
./scripts/setup_models.sh - Build the PlannerAI WASI module
./scripts/build_planner_ai_wasi.sh - Build the SummarizerAI WASI module
./scripts/build_summarizer_ai_wasi.sh - Build the TranslatorFr WASI module
./scripts/build_translator_ai_wasi.sh - List workflows
./scripts/list_labs.sh - Run the French AI report workflow
./scripts/run_lab.sh use-case-2-ai-report - Render the workflow as JSON
cargo run --manifest-path rust/Cargo.toml -- render use-case-2-ai-report json - Run the MCP server smoke check
./scripts/smoke_mcp_server.sh - Run the full chapter smoke path
./scripts/smoke_portable_mcp_labs.sh
What to inspect
After each command, look for these proof points. They are the signals that connect the code example back to the UMA architecture claim.
- capability selection
- runtime validation result
- structured report JSON
- explicit provider fallback reporting when used
Acceptance check
The chapter-level validation path is:
./scripts/smoke_portable_mcp_labs.sh
Return to the repository root for the final acceptance gate:
cd ..
./scripts/smoke_reader_paths.sh
Where to go next
This chapter closes the validated learning path and links to the live reference application.