Lab 104: MCP 2026-07-28: Stateless Servers, Discovery, and Multi-Round-TripΒΆ
Phase 3 Β· local first
The required route is deterministic and local. The Real route is optional and includes an estimate and cleanup.
What You'll LearnΒΆ
- Implement a stateless server contract
- Discover capabilities before invoking them
- Model multi-round-trip interactions
- Place Registry and authorization controls at the correct boundary
PrerequisitesΒΆ
- Python 3.10+ and a terminal
- No credentials for the required route
- Read the linked official specification before using a hosted adapter
Visual modelΒΆ
sequenceDiagram
participant C as Client
participant S as Stateless server
C->>S: initialize
C->>S: discover capabilities
C->>S: request
S-->>C: elicitation or continuation
C->>S: next round
S-->>C: result
ScenarioΒΆ
OutdoorGear needs a reviewable workshop implementation with deterministic fixtures, explicit trust boundaries, measurable acceptance criteria, and a reversible optional hosted adapter.
Guided exerciseΒΆ
Step 1: initializeΒΆ
- Run the deterministic fixture for this step.
- Record the declared input, output, policy decision, and failure behavior.
- Change one bounded behavior and run the local test again.
Evidence: Save the command, result, and one sentence explaining why the evidence is trustworthy.
Step 2: discoverΒΆ
- Run the deterministic fixture for this step.
- Record the declared input, output, policy decision, and failure behavior.
- Change one bounded behavior and run the local test again.
Evidence: Save the command, result, and one sentence explaining why the evidence is trustworthy.
Step 3: round_tripΒΆ
- Run the deterministic fixture for this step.
- Record the declared input, output, policy decision, and failure behavior.
- Change one bounded behavior and run the local test again.
Evidence: Save the command, result, and one sentence explaining why the evidence is trustworthy.
Step 4: authorizeΒΆ
- Run the deterministic fixture for this step.
- Record the declared input, output, policy decision, and failure behavior.
- Change one bounded behavior and run the local test again.
Evidence: Save the command, result, and one sentence explaining why the evidence is trustworthy.
Run locallyΒΆ
Simulation / Real pathΒΆ
Supporting kitΒΆ
The site build generates stable PDF and ZIP downloads. CI also keeps a temporary artifact mirror for 30 days.
README.md: quick start and evidence checklistCHEATSHEET.md: decision and review guidescenario.json: deterministic exercise contracttest_scenario.py: local acceptance tests- Download generated PDF
- Download generated ZIP
Scored knowledge checkΒΆ
Why keep a local contract?
Answer
It provides a deterministic baseline before adding hosted variability and cost.
When is the Real route complete?
Answer
Only after validation evidence and cleanup are recorded.
How should tool output be treated?
Answer
As untrusted data until policy and schema validation succeed.
Exit criteriaΒΆ
- Local tests pass without credentials.
- The diagram has a text explanation and does not depend on color.
- The scored quiz was reviewed.
- The Real path has a cost cap and cleanup plan.
- Sources and stability status were checked.