Skip to content

Commit 55ce87d

Browse files
committed
docs(readme): refocus on MCP 2026-07-28; drop beta labeling
- New '🆕 MCP 2026-07-28' section: what's new (stateless core, MRTR, subscriptions/listen, Tasks + Apps extensions, SEP-2243 headers, Origin protection, 2020-12, caching headers), what changed from 2025-11-25 (no handshake, -32002→-32602 + new -32001/-32003/-32004, per-request logLevel, SEP-2577 deprecations), and a removed-from-core table (7 methods with SEP numbers + 2026 replacements). Facts pulled from the spec-compliance driver's Major-SEP rows. - Remove all 'beta' labeling → honest Pre-1.0 (0.4.x) framing. - Implementation checklist: flag Roots/Sampling/Logging deprecated (SEP-2577), Session Management as 2025-opt-in, split Tasks into the 2026 extension vs 2025 core. - Crate count 15→17 (+turul-mcp-ext-tasks, turul-mcp-ext-apps); examples 53→54; function-macro output field output→result (derive uses output, function macro uses result); repoint the 2026 server/discover verification off the 2025-pinned resource-test-server to minimal-server; rewrite the Tasks Architecture section for the real ext-tasks crate; add a '2026 Protocol Features' examples line. - WIP banner left untouched. Docs-only; README is not a doctest target.
1 parent 5ee0754 commit 55ce87d

1 file changed

Lines changed: 98 additions & 23 deletions

File tree

README.md

Lines changed: 98 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,85 @@
1212
> - Servers are single-spec per build; the client (`turul-mcp-client`) is bilingual.
1313
> - Expect churn: examples, docs, and E2E tests are still being migrated to 2026 semantics.
1414
15-
# Turul MCP Framework - Beta Rust Implementation
15+
# Turul MCP Framework
1616

1717
A comprehensive Rust framework for building Model Context Protocol (MCP) servers and clients with modern patterns, extensive tooling, and enterprise-grade features. On this branch the default build targets the **MCP 2026-07-28 specification** (stateless core: `server/discover`, per-request `_meta`, no `Mcp-Session-Id`); **MCP 2025-11-25 remains available** as an opt-in (`--no-default-features --features protocol-2025-11-25`).
1818

19-
⚠️ **Beta Status** - Active development with ongoing feature enhancements. Default build is MCP 2026-07-28 (stateless); 2025-11-25 is opt-in. Suitable for development and testing.
19+
**Pre-1.0 (0.4.x).** The framework is production-shaped — comprehensive test coverage, zero-warning gates — but public APIs may still change before 1.0.0. The default build is MCP 2026-07-28 (stateless); 2025-11-25 is opt-in.
2020

21-
## 🧪 **Active Development** - Comprehensive Test Coverage
21+
## 🧪 Comprehensive Test Coverage
2222
**Broad test coverage across the workspace****Complete async SessionContext integration****Framework-native testing patterns**
2323

2424
## ✨ Key Highlights
2525

26-
- **🏗️ 15 Framework Crates**: Complete MCP ecosystem with core framework, client library, task storage, and serverless support
26+
- **🏗️ 17 Framework Crates**: Complete MCP ecosystem with core framework, client library, task storage, serverless support, and opt-in protocol extensions (Tasks, Apps)
2727
- **📚 Comprehensive Examples**: Real-world business applications and framework demonstrations (most build on the 2026-07-28 default lane; a 2025-11-25 regression set is pinned to the opt-in, and client-using examples are built by explicit CI steps — see EXAMPLES.md)
2828
- **🧪 Framework-Native Test Suite**: Core framework tests, SessionContext integration tests, and framework-native integration tests
2929
- **⚡ Multiple Development Patterns**: Derive macros, function attributes, declarative macros, and manual implementation
3030
- **🌐 Transport Flexibility**: Streamable HTTP via StreamableHttpHandler with SSE streaming (stdio planned)
3131
- **☁️ Serverless Support**: AWS Lambda integration with streaming responses and SQS event processing
3232
- **🔧 Development Features**: Session management, real-time notifications, performance monitoring, and UUID v7 support
3333

34+
## 🆕 MCP 2026-07-28
35+
36+
The default build targets the 2026-07-28 release candidate. This is a **stateless
37+
rewrite** of the protocol with several core methods removed — if you're coming from
38+
2025-11-25, read this section first.
39+
40+
### What's new (and implemented here)
41+
42+
- **Stateless core**`server/discover` advertises versions/capabilities/identity;
43+
every request carries `protocolVersion` + `clientInfo` + `clientCapabilities` in
44+
`_meta` under `io.modelcontextprotocol/*`. Any server instance serves any request.
45+
- **MRTR (Multi-Round-Trip Requests, SEP-2322)** — a tool/resource/prompt returns an
46+
`InputRequiredResult` to ask for elicitation/sampling/roots input; the client
47+
answers and retries the original call. This replaces all server-initiated requests.
48+
`examples/mrtr-elicitation-server`
49+
- **`subscriptions/listen`** — the ack-first, filtered, long-lived POST SSE stream that
50+
replaces 2025's GET-SSE resumability and the `resources/subscribe` RPC.
51+
- **Tasks extension** (`io.modelcontextprotocol/tasks`, SEP-2663) — durable poll handles
52+
via `turul-mcp-ext-tasks` (opt-in `ext-tasks` feature): `.with_ext_tasks()` +
53+
`.ext_task_tool()` server-side, `call_tool_or_task` / `task_*` client-side.
54+
`examples/ext-tasks-server`
55+
- **MCP Apps extension** (`io.modelcontextprotocol/ui`, SEP-1865) — MCP-side bindings
56+
(`turul-mcp-ext-apps`).
57+
- **SEP-2243 request-metadata headers**`Mcp-Method` / `Mcp-Name` / `Mcp-Param-*` let
58+
infrastructure route on method/tool/arguments without parsing JSON bodies.
59+
`examples/header-bound-tools-server`
60+
- **Origin validation / DNS-rebinding protection** — on by default (ADR-031).
61+
`examples/origin-policy-server`
62+
- **JSON Schema 2020-12**, **caching headers** (`ttlMs` / `cacheScope` on list/read
63+
results), and OAuth 2.1 Resource Server hardening (RFC 9207/9728).
64+
65+
### What changed from 2025-11-25
66+
67+
- **No handshake**`initialize``notifications/initialized``Mcp-Session-Id` is
68+
gone; capabilities ride per-request `_meta` instead.
69+
- **Error codes** — resource-not-found moved from `-32002` to `-32602`; new
70+
`-32001` (header mismatch), `-32003` (missing required client capability),
71+
`-32004` (unsupported protocol version).
72+
- **Per-request logging** — log level is set per-request via `io.modelcontextprotocol/logLevel`
73+
in `_meta`; servers must not emit `notifications/message` for requests that didn't opt in.
74+
- **Deprecations (SEP-2577)** — Roots, Sampling, and Logging are deprecated (earliest
75+
removal 2027-07-28). Still implemented; on 2026 the server-initiated forms ride MRTR.
76+
77+
### What's removed from the core (2026 default → these 404 / 405)
78+
79+
| Removed | SEP | Replacement on 2026 |
80+
|---|---|---|
81+
| `initialize` / `notifications/initialized` | 2575 | `server/discover` + per-request `_meta` |
82+
| Protocol sessions / `Mcp-Session-Id` | 2567 | stateless; server-minted handles as tool args |
83+
| `ping` | 2575 | — (use `server/discover` for liveness) |
84+
| `logging/setLevel` | 2575 | per-request `_meta.logLevel` |
85+
| `notifications/roots/list_changed` | 2575 ||
86+
| GET SSE endpoint / `resources/subscribe` | 2575 | `subscriptions/listen` |
87+
| Core `tasks/*` (incl. `tasks/list`, blocking `tasks/result`) | 2663 | the Tasks **extension** (`tasks/get` polling + `tasks/update`) |
88+
89+
**2025-11-25 stays fully supported** as the opt-in stateful lane
90+
(`--no-default-features --features protocol-2025-11-25`) — the handshake, sessions,
91+
GET SSE, and core tasks all work there. Per-requirement compliance status:
92+
[`docs/plans/2026-07-28-spec-compliance.md`](docs/plans/2026-07-28-spec-compliance.md).
93+
3494
## Turul MCP vs Turul RPC
3595

3696
This project ships two layered surfaces. Most users only need the MCP layer.
@@ -53,7 +113,7 @@ async fn add(
53113
#[param(description = "First number")] a: f64,
54114
#[param(description = "Second number")] b: f64,
55115
) -> McpResult<f64> {
56-
Ok(a + b) // Framework wraps as {"output": 8.0} in JSON-RPC response
116+
Ok(a + b) // Function macro wraps as {"result": 8.0} (override with output_field)
57117
}
58118

59119
#[tokio::main]
@@ -69,7 +129,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
69129
}
70130
```
71131

72-
> **Task support:** Add `task_support = "optional"` to enable the "Run as Task" button in MCP Inspector. Values: `"optional"`, `"required"`, `"forbidden"`. Requires `.with_task_storage()` on the server builder.
132+
> **Task support:**
133+
> - **2026-07-28** — tasks are the `io.modelcontextprotocol/tasks` extension (SEP-2663). Enable the `ext-tasks` feature, register the store with `.with_ext_tasks(store)`, and mark electable tools with `.ext_task_tool(tool)`. See `examples/ext-tasks-server`.
134+
> - **2025-11-25 opt-in** — tasks are a core capability: add `task_support = "optional"` (`"optional"` / `"required"` / `"forbidden"`) to enable the "Run as Task" button in MCP Inspector; requires `.with_task_storage()` on the builder.
73135
74136
### 2. Derive Macros (Struct-Based)
75137

@@ -212,15 +274,15 @@ curl -X POST http://127.0.0.1:8641/mcp \
212274

213275
### Example Servers - Ready to Run
214276

215-
**Core Test Servers:**
277+
**Core Test Servers** (manifest-pinned to the **2025-11-25** opt-in lane — they are the stateful regression fixtures, so use the 2025 handshake against them, not the 2026 `server/discover` curls below):
216278
```bash
217279
# Tools server (test tools)
218280
cargo run --package tools-test-server -- --port 8002
219281

220-
# Resource server (17 test resources)
282+
# Resource server (test resources)
221283
cargo run --package resource-test-server -- --port 8080
222284

223-
# Prompts server (11 test prompts)
285+
# Prompts server (test prompts)
224286
cargo run --package prompts-test-server -- --port 8081
225287
```
226288

@@ -243,11 +305,14 @@ cargo run -p stateful-server
243305

244306
The default build is stateless: there is no `initialize` handshake and no `Mcp-Session-Id`
245307
header. Capabilities, client info, and the protocol version travel in `_meta` on every
246-
request under the `io.modelcontextprotocol/*` namespace.
308+
request under the `io.modelcontextprotocol/*` namespace. Use a **2026-default** server such
309+
as `minimal-server` (port 8641) — the `*-test-server` fixtures above are 2025-pinned and
310+
will not answer `server/discover`.
247311

248312
**Step 1: Discover the server**
249313
```bash
250-
PORT=8080 # Replace with your server's port
314+
cargo run -p minimal-server # 2026 default, binds 127.0.0.1:8641
315+
PORT=8641 # a 2026-default server's port
251316
curl -X POST http://127.0.0.1:$PORT/mcp \
252317
-H 'Content-Type: application/json' \
253318
-H 'MCP-Protocol-Version: 2026-07-28' \
@@ -423,7 +488,7 @@ impl McpMiddleware for AuthMiddleware {
423488
- `examples/middleware-auth-lambda` - Full authorizer extraction pattern (V1 nested, V1 flat, V2)
424489
- Test events: V1 nested, V1 flat, V2 authorizer shapes (`test-events/`)
425490

426-
### Core Framework (15 Crates)
491+
### Core Framework (17 Crates)
427492
- **`turul-mcp-server`** - High-level server builder with session management and task runtime
428493
- **`turul-mcp-client`** - Comprehensive client library with HTTP transport support (bilingual: 2026-07-28 + 2025-11-25)
429494
- **`turul-http-mcp-server`** - HTTP/SSE transport with CORS and streaming
@@ -433,18 +498,26 @@ impl McpMiddleware for AuthMiddleware {
433498
- **`turul-mcp-protocol-2025-06-18`** - Legacy MCP specification (frozen historical snapshot)
434499
- **`turul-mcp-derive`** - Procedural macros for all MCP areas
435500
- **`turul-mcp-builders`** - Runtime builder patterns for dynamic MCP components
501+
- **`turul-mcp-ext-tasks`** - Tasks extension (`io.modelcontextprotocol/tasks`, SEP-2663) for the 2026-07-28 lane (opt-in `ext-tasks` feature)
502+
- **`turul-mcp-ext-apps`** - MCP Apps extension (`io.modelcontextprotocol/ui`, SEP-1865) — MCP-side bindings
436503
- **`turul-mcp-json-rpc-server`** - Frozen 0.3.x compatibility shim re-exporting [`turul-rpc`](https://github.com/aussierobots/turul-rpc); the framework crates depend on `turul-rpc` directly (see ADR-025)
437504
- **`turul-mcp-session-storage`** - Session storage backends (SQLite, PostgreSQL, DynamoDB)
438505
- **`turul-mcp-task-storage`** - Task storage for long-running operations (InMemory, with pluggable backends)
439506
- **`turul-mcp-server-state-storage`** - Server-global state for dynamic tool coordination
440507
- **`turul-mcp-aws-lambda`** - AWS Lambda integration for serverless deployment
441508
- **`turul-mcp-oauth`** - OAuth 2.1 Resource Server support (JWT validation, Bearer middleware)
442509

443-
### Tasks Architecture ADRs
510+
### Tasks Architecture
511+
512+
Tasks moved from a **core capability (2025-11-25)** to an **extension (2026-07-28)**, and the framework implements both:
513+
514+
- **2026-07-28** — the `io.modelcontextprotocol/tasks` extension (SEP-2663) in `turul-mcp-ext-tasks`, wired into the server behind the opt-in `ext-tasks` feature (`.with_ext_tasks(store)` + `.ext_task_tool(...)`) and the client (`call_tool_or_task`, `task_get`/`task_update`/`task_cancel`/`task_wait`). Server election, the `-32003` capability gate, mid-task input via `tasks/update`, and `notifications/tasks` over `subscriptions/listen` are all implemented. See `examples/ext-tasks-server`.
515+
- **2025-11-25 opt-in** — the original in-tree core task runtime, gated to `#[cfg(feature = "protocol-2025-11-25")]` (protocol types, storage, runtime, handlers, tests).
444516

445-
Tasks are a 2026-07-28 *extension* (and were a core MCP 2025-11-25 capability). On the 2026-07-28 default build the in-tree task runtime is gated to the `protocol-2025-11-25` opt-in (`#[cfg(feature = "protocol-2025-11-25")]`); the framework provides full implementation support (protocol types, storage, runtime, handlers, and tests) under that opt-in. See the architecture decision records for design rationale:
517+
Architecture decision records:
446518

447-
- [ADR-015: Protocol Crate Strategy](docs/adr/015-mcp-2025-11-25-protocol-crate.md) — separate crate for 2025-11-25 spec types including Tasks
519+
- [ADR-028: Extensions Strategy](docs/adr/028-extensions-strategy.md) — per-extension crates; how the 2026 Tasks/Apps extensions are hosted
520+
- [ADR-015: Protocol Crate Strategy](docs/adr/015-mcp-2025-11-25-protocol-crate.md) — separate crate for 2025-11-25 spec types including core Tasks
448521
- [ADR-016: Task Storage Architecture](docs/adr/016-task-storage-architecture.md)`TaskStorage` trait, 4 backends, state machine, parity test suite
449522
- [ADR-017: Task Runtime-Executor Boundary](docs/adr/017-task-runtime-executor-boundary.md) — three-layer split: storage / executor / runtime
450523
- [ADR-018: Task Pagination Cursor Contract](docs/adr/018-task-pagination-cursor-contract.md) — deterministic cursor-based pagination across backends
@@ -561,12 +634,13 @@ let server = McpServer::builder()
561634
-**Resources** (`ResourceDefinition`) - Static and dynamic content serving with access control
562635
-**Prompts** (`PromptDefinition`) - AI interaction template generation with parameter validation
563636
-**Completion** (`CompletionDefinition`) - Context-aware text completion with model preferences
564-
-**Logging** (`LoggerDefinition`) - Dynamic log level management with structured output
565637
-**Notifications** (`NotificationDefinition`) - Real-time SSE event broadcasting with filtering
566-
-**Roots** (`RootDefinition`) - Secure file system access boundaries with permissions
567-
-**Sampling** (`SamplingDefinition`) - AI model integration patterns with constraints
568-
-**Elicitation** (`ElicitationDefinition`) - Structured user input collection with validation
569-
-**Session Management** - Stateful operations with UUID v7 correlation IDs
638+
-**Elicitation** (`ElicitationDefinition`) - Structured user input collection with validation (rides MRTR on 2026)
639+
- ⚠️ **Logging** (`LoggerDefinition`) - Dynamic log level management — *deprecated on 2026 (SEP-2577); per-request `logLevel` opt-in*
640+
- ⚠️ **Roots** (`RootDefinition`) - Secure file system access boundaries — *deprecated on 2026 (SEP-2577); rides MRTR*
641+
- ⚠️ **Sampling** (`SamplingDefinition`) - AI model integration patterns — *deprecated on 2026 (SEP-2577); rides MRTR*
642+
-**Tasks** — Tasks extension on 2026 (`turul-mcp-ext-tasks`); core capability on the 2025-11-25 opt-in
643+
-**Session Management** - Stateful operations with UUID v7 — *2025-11-25 opt-in only; the 2026 core is stateless*
570644

571645
### Transport Support
572646
- **Streamable HTTP** - Production transport via `StreamableHttpHandler` (HTTP/1.1 & HTTP/2 with chunked SSE; stateless on the 2026-07-28 default, stateful with GET SSE on the 2025-11-25 opt-in)
@@ -593,6 +667,7 @@ Development servers for actual business problems:
593667
### 🔧 Framework Demonstrations
594668
Educational examples showcasing framework patterns:
595669
- **Basic Patterns**: minimal-server, calculator-add-manual-server, zero-config-getting-started
670+
- **2026 Protocol Features**: ext-tasks-server (Tasks extension), mrtr-elicitation-server (multi-round-trip input), origin-policy-server (DNS-rebinding protection), header-bound-tools-server (SEP-2243 `Mcp-Param`), streamable-http-client (paired 2026 client)
596671
- **Advanced Features**: stateful-server (2025-pinned), pagination-server, tasks-e2e-inmemory-server (2025-pinned)
597672
- **Macro System**: derive-macro-server, function-macro-server, function-resource-server
598673
- **Serverless**: lambda-mcp-server (AWS Lambda with SQS integration)
@@ -1238,9 +1313,9 @@ This project is licensed under the MIT OR Apache-2.0 License - see the LICENSE f
12381313

12391314
### 🎯 Current Framework State
12401315
- **MCP 2026-07-28 adoption (this branch)**: default build targets the 2026-07-28 stateless core; 2025-11-25 remains fully supported as the opt-in stateful line
1241-
- **Examples Validated**: 53 active examples compile under their lane's CI gates (2026-07-28 default lane plus the pinned 2025-11-25 regression set — see EXAMPLES.md)
1316+
- **Examples Validated**: 54 active examples compile under their lane's CI gates (2026-07-28 default lane plus the pinned 2025-11-25 regression set — see EXAMPLES.md)
12421317
- **SSE Streaming Verified**: Real-time notifications and session-aware logging working correctly
1243-
- **Beta Status**: Active development with API stability considerations before 1.0.0
1318+
- **Pre-1.0 (0.4.x)**: production-shaped with comprehensive test coverage; public APIs may still change before 1.0.0
12441319

12451320
### 🚧 Current Limitations
12461321

@@ -1259,7 +1334,7 @@ This project is licensed under the MIT OR Apache-2.0 License - see the LICENSE f
12591334
- **Concurrency Stress Testing**: Some resource tests show occasional failures under extreme load
12601335
- **Browser Compatibility**: CORS support available but may need tuning for specific client requirements
12611336

1262-
**Framework Philosophy**: We prioritize honest documentation over inflated claims. This beta status reflects our commitment to transparency about the current development state.
1337+
**Framework Philosophy**: We prioritize honest documentation over inflated claims. The limitations above reflect our commitment to transparency about the current development state.
12631338

12641339
---
12651340

0 commit comments

Comments
 (0)