Skip to content

Commit 800fd2c

Browse files
committed
chore(examples): archive slice — 4 archives + 1 merge (maintainer-approved)
Slice 1 of the examples disposition, per docs/plans/2026-07-28-examples-review.md (now stamped EXECUTED): Archived to examples/archived/ with dated banners (reason + superseded-by): - manual-tools-server — manual trait implementation is owned by calculator-add-manual-server (the CLAUDE.md-designated reference); its session-persistence teaching is false on the 2026 stateless lane. - dynamic-resource-server — name/README promised dynamic-resource teaching the code never contained (zero resources registered); URI-template resources are owned by function-resource-server. - alert-system-server — both teachable ideas owned elsewhere (stateful-server, derive-macro-server); the remainder suggested transport sessions exist on the 2026 lane. - simple-logging-server — per-session log storage is the removed 2025 session model; never exercised the MCP logging capability. Merged: session-aware-logging-demo archived as a superseded strict subset of session-logging-proof-test (which adds 3-session isolation, the full level cascade, and PASS/FAIL verification). Same-commit reference cleanup: - workspace members + default-members (cargo metadata verified) - EXAMPLES.md: 5 rows removed, active count 55 → 50 - root README: business list renumbered; Basic Patterns → calculator-add-manual-server; Business Value row removed - examples/minimal-server/README.md: Next Steps link repointed (+ the two already-dead links removed) - scripts/verify_phase{2,5,8}.sh entries removed (legacy dev scripts — the actual CI gates never referenced any of the five) - tests/working_examples_validation.rs compilation list Gates: scripts/ci-gates.sh all → ALL GATES PASSED.
1 parent bd0dc0f commit 800fd2c

27 files changed

Lines changed: 43 additions & 83 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,19 @@ members = [
2121
# Test crates
2222

2323
# Active examples (33 total)
24-
"examples/alert-system-server",
2524
"examples/audit-trail-server",
2625
"examples/calculator-add-builder-server",
2726
"examples/calculator-add-function-server",
2827
"examples/calculator-add-manual-server",
2928
"examples/calculator-add-simple-server-derive",
3029
"examples/completion-server",
3130
"examples/derive-macro-server",
32-
"examples/dynamic-resource-server",
3331
"examples/dynamic-tools-server",
3432
"examples/elicitation-server",
3533
"examples/function-macro-server",
3634
"examples/function-resource-server",
3735
"examples/lambda-mcp-client",
3836
"examples/lambda-mcp-server",
39-
"examples/manual-tools-server",
4037
"examples/minimal-server",
4138
"examples/notification-server",
4239
"examples/pagination-server",
@@ -49,7 +46,6 @@ members = [
4946
"examples/roots-server",
5047
"examples/sampling-server",
5148
"examples/simple-dynamodb-session", # Simplified and ready - utility binaries commented out
52-
"examples/simple-logging-server",
5349
"examples/simple-postgres-session", # Fixed API mismatches - ready to use
5450
"examples/simple-sqlite-session", # Fixed API mismatches - ready to use
5551
"examples/stateful-server",
@@ -70,7 +66,6 @@ members = [
7066
"examples/client-initialise-report",
7167
"examples/logging-test-client",
7268
"examples/logging-test-server",
73-
"examples/session-aware-logging-demo",
7469
"examples/session-logging-proof-test",
7570
"examples/session-management-compliance-test",
7671
"examples/streamable-http-client",
@@ -120,20 +115,17 @@ default-members = [
120115
# examples use 2025-only features (tasks/sampling/elicitation/logging builders,
121116
# the runtime ToolBuilder, pagination envelopes) or the bilingual client and are
122117
# held out until ported or pinned to the 2025 opt-in.
123-
"examples/alert-system-server",
124118
"examples/audit-trail-server",
125119
"examples/calculator-add-builder-server",
126120
"examples/calculator-add-function-server",
127121
"examples/calculator-add-manual-server",
128122
"examples/calculator-add-simple-server-derive",
129123
"examples/completion-server",
130124
"examples/derive-macro-server",
131-
"examples/dynamic-resource-server",
132125
"examples/function-macro-server",
133126
"examples/function-resource-server",
134127
"examples/icon-showcase",
135128
"examples/lambda-authorizer",
136-
"examples/manual-tools-server",
137129
"examples/middleware-auth-lambda",
138130
"examples/middleware-auth-server",
139131
"examples/middleware-logging-server",
@@ -146,7 +138,6 @@ default-members = [
146138
"examples/resource-server",
147139
"examples/resources-server",
148140
"examples/simple-dynamodb-session",
149-
"examples/simple-logging-server",
150141
"examples/simple-postgres-session",
151142
"examples/simple-sqlite-session",
152143
"examples/tool-output-introspection",

EXAMPLES.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MCP Framework Examples
22

3-
This document provides a comprehensive overview of all **55 active examples** in the MCP Framework (plus `examples/archived/`), organized by learning progression from basic concepts to advanced implementations.
3+
This document provides a comprehensive overview of all **50 active examples** in the MCP Framework (plus `examples/archived/` — grown by 5 in the 2026-06-12 archive slice, see `docs/plans/2026-07-28-examples-review.md`), organized by learning progression from basic concepts to advanced implementations.
44

55
**✅ All active examples compile under their lane's CI gates** (2026-07-28 default lane
66
+ per-manifest 2025-11-25 pins). Per-example functional re-verification against the
@@ -69,7 +69,6 @@ cargo run --example minimal-server
6969
| **resources-server** | 8041 | ✅ VALIDATED | Multiple resource types | Resource handling patterns |
7070
| **resource-test-server** | 8043 | ✅ VALIDATED | Resource testing | Resource validation framework |
7171
| **function-resource-server** | 8008 | ✅ VALIDATED | Function-based resources | Resource function patterns |
72-
| **dynamic-resource-server** | 8048 | ✅ VALIDATED | Runtime resources | Dynamic resource creation |
7372
| **session-aware-resource-server** | 8008 | ✅ VALIDATED | Session-aware resources (2025-11-25 pinned) | Session context integration on the stateful lane |
7473

7574
## 🟢 **FEATURE-SPECIFIC SERVERS** (8 examples) - Specialized MCP Features
@@ -90,9 +89,7 @@ cargo run --example minimal-server
9089
| Example | Port | Status | Description | Advanced Features |
9190
|---------|------|--------|-------------|-------------------|
9291
| **comprehensive-server** | 8002 | ✅ VALIDATED | All MCP features in one server | Complete framework showcase |
93-
| **alert-system-server** | 8010 | ✅ VALIDATED | Alert management | Enterprise alert management system |
9492
| **audit-trail-server** | 8009 | ✅ VALIDATED | Audit logging | Comprehensive audit logging system |
95-
| **simple-logging-server** | 8008 | ✅ VALIDATED | Simplified logging | Simplified logging patterns |
9693
| **zero-config-getting-started** | 8641 | ✅ VALIDATED | Zero-configuration setup | Getting started tutorial server |
9794

9895
## 🔴 **SESSION & STATE** (4 examples) - Advanced State Handling
@@ -101,7 +98,6 @@ cargo run --example minimal-server
10198
|---------|------|--------|-------------|------------------|
10299
| **stateful-server** | 8006 | ✅ VALIDATED | Advanced stateful operations (2025-11-25 pinned) | Session state management on the stateful lane |
103100
| **session-logging-proof-test** | 8001 | ✅ VALIDATED | Session logging validation | Session-based logging verification |
104-
| **session-aware-logging-demo** | 8000 | ✅ VALIDATED | Session-scoped logging | Session-aware logging patterns |
105101
| **logging-test-server** | 8052 | ✅ VALIDATED | Logging test suite | Comprehensive logging test suite |
106102

107103
## 🟠 **CLIENT EXAMPLES** (5 examples) - Client Implementation
@@ -139,7 +135,6 @@ cargo run --example client-initialise-report -- --url http://127.0.0.1:8641/mcp
139135
|---------|------|--------|-------------|--------------|
140136
| **derive-macro-server** | 8765 | ✅ VALIDATED | Derive macro tools | `#[derive(McpTool)]` with code generation tools |
141137
| **function-macro-server** | 8003 | ✅ VALIDATED | Function macro tools | `#[mcp_tool]` attribute macro patterns |
142-
| **manual-tools-server** | 8007 | ✅ VALIDATED | Manual tool impl | Session state, progress notifications, complex schemas |
143138
| **tools-test-server** | random | ✅ VALIDATED | Comprehensive tool testing | All MCP tool patterns and edge cases |
144139
| **tool-output-introspection** | 8641 | ✅ VALIDATED | Output schema via introspection | Automatic field-level output schema generation |
145140
| **tool-output-schemas** | 8641 | ✅ VALIDATED | Output schema via schemars | `schemars::JsonSchema` derive for JSON Schema output |

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -581,19 +581,18 @@ let server = McpServer::builder()
581581
### 🏢 Real-World Business Applications
582582
Development servers for actual business problems:
583583

584-
1. **dynamic-resource-server** → Enterprise API Data Gateway
585-
2. **audit-trail-server** → Application Audit & Compliance System (SQLite-backed)
586-
3. **elicitation-server** → Customer Onboarding Platform
587-
4. **notification-server** → Development Team Alert System
588-
5. **completion-server** → IDE Auto-Completion Server
589-
6. **prompts-server** → AI-Assisted Development Prompts
590-
7. **derive-macro-server** → Code Generation & Template Engine
591-
8. **calculator-add-\*-server** → Calculator examples (builder, function, derive, manual patterns)
592-
9. **resources-server** → Development Team Resource Hub
584+
1. **audit-trail-server** → Application Audit & Compliance System (SQLite-backed)
585+
2. **elicitation-server** → Customer Onboarding Platform
586+
3. **notification-server** → Development Team Alert System
587+
4. **completion-server** → IDE Auto-Completion Server
588+
5. **prompts-server** → AI-Assisted Development Prompts
589+
6. **derive-macro-server** → Code Generation & Template Engine
590+
7. **calculator-add-\*-server** → Calculator examples (builder, function, derive, manual patterns)
591+
8. **resources-server** → Development Team Resource Hub
593592

594593
### 🔧 Framework Demonstrations
595594
Educational examples showcasing framework patterns:
596-
- **Basic Patterns**: minimal-server, manual-tools-server, zero-config-getting-started
595+
- **Basic Patterns**: minimal-server, calculator-add-manual-server, zero-config-getting-started
597596
- **Advanced Features**: stateful-server (2025-pinned), pagination-server, tasks-e2e-inmemory-server (2025-pinned)
598597
- **Macro System**: derive-macro-server, function-macro-server, function-resource-server
599598
- **Serverless**: lambda-mcp-server (AWS Lambda with SQS integration)
@@ -1192,7 +1191,6 @@ curl -N -H "Accept: text/event-stream" \
11921191
## 📊 Business Value Examples
11931192

11941193
### Enterprise Integration
1195-
- **dynamic-resource-server**: API orchestration across Customer, Inventory, Financial, and HR systems
11961194
- **audit-trail-server**: SOX, PCI DSS, GDPR, and HIPAA compliance reporting
11971195

11981196
### Developer Productivity

docs/plans/2026-07-28-examples-review.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ own binary. The worst offenders print broken curl commands from their own stdout
2626

2727
## 🗄️ Archive (4) — no remaining teaching value or actively misleading
2828

29+
> **EXECUTED 2026-06-12** (maintainer-approved slice 1): all four moved to
30+
> `examples/archived/` with dated banners; `session-aware-logging-demo`
31+
> merged (archived as a superseded duplicate of `session-logging-proof-test`)
32+
> in the same slice. Workspace members, EXAMPLES.md, root README,
33+
> `verify_phase{2,5,8}.sh`, and the compilation-validation test list cleaned
34+
> in the same commit.
35+
2936
| Example | Lane | Teaches | Why / required fixes | Gate-ref |
3037
|---|---|---|---|---|
3138
| `alert-system-server` | 2026-default | A rule-based alerting domain app (cooldowns, severities, regex log matching) built from derive-macro tools persisting rules/history in framework SessionContext state. | Its two teachable ideas are both better taught elsewhere on the 2026 lane: session-state-on-stateless-transport is owned by examples/stateful-server (which has the correct 2026 'application-level SessionContext is not the removed transport session' framing), and derive-macro tool patterns are owned by derive-macro-server. What remains is ~600 lines of un-README'd domain logic that, unframed, actively suggests transport sessions exist on the 2026 default. The repo already has an examples/archived/ mechanism. Only reference is the legacy manual scripts/verify_phase5.sh:229 — not ci-gates.sh, not .github/workflows, not e2e_utils.rs — so archiving is safe. If the maintainer wants a 'realistic app' demo to survive, the alternative is a merge of its cooldown/severity flavor into stateful-server, with stateful-server surviving. — **Staleness:** No README at all (only Cargo.toml + src); main.rs:117,275,513 hard-fail with 'Session required' and store everything in SessionContext with zero framing that on 2026 this is the framework's application-level state layer, NOT the removed transport session (contrast examples/stateful-server/README.md:63-68, which was given exactly that framing in a12f14c — this example was skipped by that rewrite); main.rs:661 `.sse(true)` is a no-op on the 2026 POST-only lane; main.rs:1-6 doc-comment says 'manage alert history using session state' with no 2026 caveat. | no |
@@ -35,6 +42,8 @@ own binary. The worst offenders print broken curl commands from their own stdout
3542

3643
## 🔀 Merge (1) — duplicate of a sibling
3744

45+
> **EXECUTED 2026-06-12** — see the archive note above.
46+
3847
| Example | Lane | Teaches | Why / required fixes | Gate-ref |
3948
|---|---|---|---|---|
4049
| `session-aware-logging-demo` | 2025-pinned | Per-session MCP logging-level filtering: tools call session.notify_log and a session-scoped level (set via a custom tool) determines which notifications/message events reach that session's SSE stream. | Correctly manifest-pinned to protocol-2025-11-25 (Cargo.toml:9-13), but it is a strict subset of session-logging-proof-test: identical architecture (server with a send-log-at-level tool + set-level tool, inline reqwest client doing initialize → set level → cascade filtering checks), while proof-test adds 3-session isolation, the full level cascade, and PASS/FAIL verification instructions. It also sets the level via a custom tool rather than the spec logging/setLevel method, so it teaches nothing the survivor doesn't. Merge into session-logging-proof-test (survivor). Not referenced by any CI gate (only legacy verify_phase8.sh:95-144). — **Staleness:** src/main.rs:187-194 inline client hardcodes protocolVersion 2025-06-18 (annotated as intentional backward-compat testing); src/main.rs:292 .version("1.0.0"); Cargo.toml lacks the '2025-11-25 regression example' manifest comment its siblings logging-test-server/client carry | no |
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
> **ARCHIVED 2026-06-12** — session-state-on-stateless-transport is owned by `stateful-server` (2025-pinned, correctly framed) and derive-macro patterns by `derive-macro-server`; what remained suggested transport sessions exist on the 2026 lane.
2+
> Disposition record: `docs/plans/2026-07-28-examples-review.md`. Not a
3+
> workspace member; kept for reference only.
4+
5+
# alert-system-server
File renamed without changes.
File renamed without changes.

examples/dynamic-resource-server/README.md renamed to examples/archived/dynamic-resource-server/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
> **ARCHIVED 2026-06-12** — its name/README promised dynamic-resource teaching the code never contained (zero resources registered); URI-template resources are owned by `function-resource-server`.
2+
> Disposition record: `docs/plans/2026-07-28-examples-review.md`. Not a
3+
> workspace member; kept for reference only.
4+
15
# Dynamic Resource Server Example
26

37
A comprehensive demonstration of **dynamic MCP resources** with parameterized URIs for accessing specific entities. This example shows how real-world resource systems should work with identifiers instead of static paths.

examples/dynamic-resource-server/data/api_endpoints.json renamed to examples/archived/dynamic-resource-server/data/api_endpoints.json

File renamed without changes.

0 commit comments

Comments
 (0)