Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/test_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ jobs:

- name: Run official MCP 2025 client conformance
run: >
npx -y @modelcontextprotocol/conformance@0.2.0-alpha.4 client
--command "dart run test/conformance/mcp_2026_rc_client.dart"
npx -y @modelcontextprotocol/conformance@0.2.0-alpha.5 client
--command "dart run test/conformance/mcp_2026_07_28_rc_client.dart"
--suite all
--spec-version 2025-11-25
--verbose
-o .dart_tool/conformance/ci_2025_client

- name: Run official MCP 2026 RC server conformance
- name: Run official MCP 2026-07-28 RC server conformance
run: >
dart run test/conformance/run_2026_rc_server_conformance.dart
dart run test/conformance/run_2026_07_28_rc_server_conformance.dart
--timeout-seconds 90
--output-dir .dart_tool/conformance/ci_2026_server

- name: Run official MCP 2026 RC client conformance
- name: Run official MCP 2026-07-28 RC client conformance
run: >
dart run test/conformance/run_2026_rc_client_conformance.dart
dart run test/conformance/run_2026_07_28_rc_client_conformance.dart
--timeout-seconds 90
--output-dir .dart_tool/conformance/ci_2026_client

Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
## Unreleased

### Conformance and interoperability

- Updated official conformance gates to
`@modelcontextprotocol/conformance@0.2.0-alpha.5`. The 2026-07-28 RC server suite
now has no expected failures; the 2026 client suite keeps only the upstream
`json-schema-ref-no-deref` fixture gap expected.
- Re-pinned the manual TypeScript SDK 2026-07-28 RC interop fixture to
`pkg.pr.new` previews from the merged `v2-2026-07-28` branch head for both
client and server packages.
- Switched the reverse Dart preview client -> TypeScript preview server fixture
to the TypeScript SDK's 2026 HTTP handler entry, making `server/discover`,
`tools/list`, and `tools/call` strict interop checks instead of diagnostic
skips.
- Recorded overridden conformance package names in 2026-07-28 RC summary artifacts so
ad hoc package-bump checks are auditable.

## 2.3.0-dev.1

This dev preview refreshes MCP `2026-07-28` draft/RC support while keeping MCP
Expand All @@ -21,9 +37,9 @@ This dev preview refreshes MCP `2026-07-28` draft/RC support while keeping MCP
### Conformance and interoperability

- Updated official conformance gates to
`@modelcontextprotocol/conformance@0.2.0-alpha.4`, with full 2026 RC server
`@modelcontextprotocol/conformance@0.2.0-alpha.4`, with full 2026-07-28 RC server
scenario coverage and alpha.4's spec-filtered 2026 client scenario list in CI.
- Expanded the manual TypeScript SDK 2026 RC interop fixture pinned to the
- Expanded the manual TypeScript SDK 2026-07-28 RC interop fixture pinned to the
upstream PR #2327 preview package, covering modern negotiation,
`server/discover` cache metadata, `tools/list`, `tools/call`,
`x-mcp-header` mirroring, progress notifications, raw HTTP header validation,
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ final server = McpServer(
```

Use the preview profile while the spec is still a draft/RC. See the
[MCP 2026-07-28 draft/RC transition guide](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/mcp-2026-rc.md)
[MCP 2026-07-28 draft/RC transition guide](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/mcp-2026-07-28-rc.md)
for opt-in behavior, fallback rules, and draft-only APIs.

## Documentation
Expand All @@ -137,7 +137,7 @@ for opt-in behavior, fallback rules, and draft-only APIs.

- 🧪 **[SDK Interoperability Matrix](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/interoperability.md)** - Verified Dart/TypeScript and documented cross-SDK scenarios
- ✅ **[MCP 2025-11-25 Spec Coverage Matrix](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/spec-coverage-2025-11-25.md)** - Auditable coverage map with CLI conformance cases and known gaps
- 🧭 **[MCP 2026-07-28 Draft/RC Transition Guide](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/mcp-2026-rc.md)** - Opt-in profile, fallback behavior, and draft-only APIs
- 🧭 **[MCP 2026-07-28 Draft/RC Transition Guide](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/mcp-2026-07-28-rc.md)** - Opt-in profile, fallback behavior, and draft-only APIs
- 🔒 **[Transport Security Recipes](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/transports.md#dns-rebinding-protection)** - Host/Origin allowlists, OAuth layering, and compatibility-toggle trade-offs
- 📱 **[Flutter Recipes](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/flutter-recipes.md)** - Flutter Web, mobile, and desktop host/client guidance
- 🔁 **[Migration Cookbooks](https://github.com/leehack/mcp_dart/blob/dev/2026-07-28-rc/doc/migration-cookbooks.md)** - TypeScript SDK, `dart_mcp`, stdio-to-HTTP, and version migration paths
Expand Down
27 changes: 15 additions & 12 deletions doc/interoperability.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ For requirement-level MCP 2025-11-25 coverage, see the
| Dart client -> TypeScript SDK server | Streamable HTTP | `2025-11-25` | [`test/interop/dart_client_with_ts_server_test.dart`](../test/interop/dart_client_with_ts_server_test.dart), [`test/interop/ts/`](../test/interop/ts/) | Verified | Covers tool calls and stale preconfigured session-id recovery. |
| TypeScript SDK client -> Dart server | stdio | `2025-11-25` | [`test/interop/ts_client_with_dart_server_test.dart`](../test/interop/ts_client_with_dart_server_test.dart), [`test/interop/test_dart_server.dart`](../test/interop/test_dart_server.dart) | Verified | Runs the compiled TypeScript client fixture against a Dart server process and checks that an official TS client can list tools immediately after the lifecycle handshake. |
| TypeScript SDK client -> Dart server | Streamable HTTP | `2025-11-25` | [`test/interop/ts_client_with_dart_server_test.dart`](../test/interop/ts_client_with_dart_server_test.dart), [`test/interop/test_dart_server.dart`](../test/interop/test_dart_server.dart) | Verified | Includes official TS Streamable HTTP client lifecycle coverage, pre-`initialized` operation rejection, GET SSE streams, and `Last-Event-ID` replay behavior. |
| TypeScript SDK preview client -> Dart server | Streamable HTTP | `2026-07-28` draft/RC | [`test/interop/ts_2026_rc/`](../test/interop/ts_2026_rc/), [`tool/testing/run_ts_2026_rc_interop.dart`](../tool/testing/run_ts_2026_rc_interop.dart) | Experimental manual check | Uses a pinned `pkg.pr.new` preview from TypeScript SDK PR #2327. Covers modern negotiation, cache metadata, `tools/list`, `tools/call`, `x-mcp-header` mirroring, raw header and unsupported-version rejection, removed core RPC rejection, progress notifications, `subscriptions/listen`, and HTTP SSE cancellation against the Dart 2026 RC conformance server. Not a CI gate yet. |
| Dart preview client -> TypeScript SDK alpha server | Streamable HTTP | `2026-07-28` draft/RC | [`test/interop/ts_2026_rc/src/server.mjs`](../test/interop/ts_2026_rc/src/server.mjs), [`tool/testing/run_ts_2026_rc_interop.dart`](../tool/testing/run_ts_2026_rc_interop.dart) | Diagnostic only | The fixture attempts the reverse path, but the current TS server alpha does not yet answer mandatory `server/discover` and omits `resultType` on stateless `tools/list`; the runner reports this as a TS-alpha gap instead of a Dart failure. |
| TypeScript SDK preview client -> Dart server | Streamable HTTP | `2026-07-28` draft/RC | [`test/interop/ts_2026_07_28_rc/`](../test/interop/ts_2026_07_28_rc/), [`tool/testing/run_ts_2026_07_28_rc_interop.dart`](../tool/testing/run_ts_2026_07_28_rc_interop.dart) | Experimental manual check | Uses pinned `pkg.pr.new` previews from the TypeScript SDK `v2-2026-07-28` branch head. Covers modern negotiation, cache metadata, `tools/list`, `tools/call`, `x-mcp-header` mirroring, raw header and unsupported-version rejection, removed core RPC rejection, progress notifications, `subscriptions/listen`, and HTTP SSE cancellation against the Dart 2026-07-28 RC conformance server. Not a CI gate yet. |
| Dart preview client -> TypeScript SDK preview server | Streamable HTTP | `2026-07-28` draft/RC | [`test/interop/ts_2026_07_28_rc/src/server.mjs`](../test/interop/ts_2026_07_28_rc/src/server.mjs), [`tool/testing/run_ts_2026_07_28_rc_interop.dart`](../tool/testing/run_ts_2026_07_28_rc_interop.dart) | Experimental manual check | Uses the pinned TypeScript SDK server preview through its `createMcpHandler` entry and covers `server/discover` negotiation, `tools/list`, and `tools/call`. Not a CI gate yet. |
| Dart client -> Python MCP server | stdio | Server-dependent | [`doc/transports.md`](transports.md#connect-to-python-server) | Documented recipe | The transport can spawn Python servers over stdio, but this repo does not yet include an automated Python SDK fixture. |
| Flutter/Web client -> Dart server | Streamable HTTP | `2025-11-25` | [`example/flutter_http_client/`](../example/flutter_http_client/), [`doc/flutter-recipes.md`](flutter-recipes.md) | Documented recipe | Flutter Web cannot spawn stdio servers; use Streamable HTTP or another browser-safe transport. |
| MCP Apps host/client metadata | stdio or Streamable HTTP | `2025-11-25` plus `io.modelcontextprotocol/ui` extension | [`doc/mcp-apps.md`](mcp-apps.md), [`example/mcp_apps_helpers_server.dart`](../example/mcp_apps_helpers_server.dart), [`test/types/mcp_ui_test.dart`](../test/types/mcp_ui_test.dart), [`test/server/mcp_ui_test.dart`](../test/server/mcp_ui_test.dart) | Verified | Verified coverage is limited to SDK metadata helpers, serialization, and checked-in examples; host rendering behavior varies by host, so verify UI metadata against your target host. |
Expand All @@ -44,20 +44,21 @@ dart test --tags interop

If the compiled fixtures are missing, local test runs skip the interop groups; CI should fail when required fixtures are unavailable.

The TypeScript 2026 RC fixture is manual while the upstream SDK support remains
unreleased and split across preview PRs:
The TypeScript 2026-07-28 RC fixture is manual while the upstream SDK support remains
unreleased and pinned to `pkg.pr.new` previews from the TypeScript SDK
`v2-2026-07-28` branch:

```bash
# From repository root
cd test/interop/ts_2026_rc
cd test/interop/ts_2026_07_28_rc
npm install
cd ../../..
dart run tool/testing/run_ts_2026_rc_interop.dart
dart run tool/testing/run_ts_2026_07_28_rc_interop.dart
```

This starts the Dart 2026 RC conformance server, runs the pinned TypeScript SDK
preview client against it, then attempts the reverse Dart-client diagnostic
against the TypeScript server alpha and reports known TS-alpha spec gaps.
This starts the Dart 2026-07-28 RC conformance server, runs the pinned TypeScript SDK
preview client against it, then runs the reverse Dart preview client smoke check
against the TypeScript preview server.

The CLI spec conformance gate covers raw-wire negative cases that do not need a
cross-SDK fixture, including stable MCP 2025-11-25 checks and MCP 2026-07-28 RC
Expand All @@ -82,9 +83,11 @@ When adding a new interoperability claim:
## Known gaps worth tracking

- Automated Python SDK fixture coverage.
- CI promotion for the TypeScript 2026 RC interop fixture after the TypeScript
SDK publishes a 2026-compatible alpha package whose server answers
`server/discover` and includes `resultType` on stateless results.
- CI promotion for the TypeScript 2026-07-28 RC interop fixture after the TypeScript
SDK publishes a 2026-07-28-compatible alpha package instead of requiring
`pkg.pr.new` previews.
- Broader reverse-path TypeScript preview server coverage beyond discovery,
`tools/list`, and `tools/call`.
- Host-specific MCP Apps rendering compatibility notes.
- More OAuth-protected remote server scenarios beyond the checked-in examples.
- A broader compatibility table once additional SDKs expose stable 2025-11-25 fixtures.
16 changes: 8 additions & 8 deletions doc/mcp-2026-rc.md → doc/mcp-2026-07-28-rc.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,27 +130,27 @@ Before creating follow-up dev tags from `dev/2026-07-28-rc`, run:
```sh
dart analyze
dart run test/conformance/run_2025_server_conformance.dart
npx -y @modelcontextprotocol/conformance@0.2.0-alpha.4 client \
--command "dart run test/conformance/mcp_2026_rc_client.dart" \
npx -y @modelcontextprotocol/conformance@0.2.0-alpha.5 client \
--command "dart run test/conformance/mcp_2026_07_28_rc_client.dart" \
--suite all \
--spec-version 2025-11-25
dart run test/conformance/run_2026_rc_server_conformance.dart
dart run test/conformance/run_2026_rc_client_conformance.dart
dart run test/conformance/run_2026_07_28_rc_server_conformance.dart
dart run test/conformance/run_2026_07_28_rc_client_conformance.dart
dart pub publish --dry-run
dart pub global run pana --no-warning
dart run tool/validate_cli_publish.dart
```

The `run_2026_rc_server_conformance.dart` gate runs the full
`@modelcontextprotocol/conformance@0.2.0-alpha.4` server scenario list for
The `run_2026_07_28_rc_server_conformance.dart` gate runs the full
`@modelcontextprotocol/conformance@0.2.0-alpha.5` server scenario list for
`--spec-version 2026-07-28`, including the stable-style tool, resource, prompt,
completion, and JSON Schema scenarios that the alpha package tags for the RC.

For cross-SDK smoke coverage against the TypeScript SDK 2026 preview client,
run the manual fixture documented in
[`doc/interoperability.md`](interoperability.md#running-interop-checks-locally).
Keep that fixture out of CI until upstream publishes a 2026-compatible alpha
package instead of requiring a `pkg.pr.new` PR preview.
Keep that fixture out of CI until upstream publishes a 2026-07-28-compatible alpha
package instead of requiring a `pkg.pr.new` branch preview.

For dev packages, keep package documentation links pointed at
`dev/2026-07-28-rc` until the draft work is ready to merge back to `main`.
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp_dart_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 0.2.0-dev.1

- Update the dev CLI package to depend on `mcp_dart ^2.3.0-dev.1`.
- Refresh built-in 2026 RC conformance checks for the current draft error
- Refresh built-in 2026-07-28 RC conformance checks for the current draft error
codes and cacheable `server/discover` behavior.
- Keep CLI standalone binary release automation current with GitHub runner and
artifact action updates.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Expected failures for @modelcontextprotocol/conformance@0.2.0-alpha.4
# against the 2026 RC/DRAFT client suite.
# Expected failures for @modelcontextprotocol/conformance@0.2.0-alpha.5
# against the 2026-07-28 RC/DRAFT client suite.
#
# Keep this list scenario-based so the baseline is easy to review. When a
# scenario turns green, remove it from this file in the same PR as the fix.
#
# Upstream alpha.4 fixture gap: this scenario's mock server still rejects
# Upstream alpha.5 fixture gap: this scenario's mock server still rejects
# 2026-07-28 with HTTP 400 and advertises only stable protocol versions.
# Keep it expected-fail until the conformance fixture is draft-capable.
json-schema-ref-no-deref
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Expected failures for @modelcontextprotocol/conformance@0.2.0-alpha.4
# Expected failures for @modelcontextprotocol/conformance@0.2.0-alpha.5
# against the full 2026-07-28 RC/DRAFT server suite.
#
# Keep this list scenario-based so the baseline is easy to review. When a
# scenario turns green, remove it from this file in the same PR as the fix.

# alpha.4 still expects the pre-renumber HeaderMismatch error code -32001.
# The live 2026-07-28 draft now assigns HeaderMismatch to -32020.
server-stateless
http-custom-header-server-validation
#
# No expected server failures are currently tracked.
31 changes: 14 additions & 17 deletions test/conformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ calls hard-coded diagnostic tools, prompts, and resources.

The 2026 suite still targets a draft/RC alpha spec package. If the official
suite changes before the spec is final, record intentional temporary gaps in
`2026_rc_expected_failures.txt` or `2026_rc_client_expected_failures.txt` so CI
`2026_07_28_rc_expected_failures.txt` or `2026_07_28_rc_client_expected_failures.txt` so CI
distinguishes known draft/RC churn from regressions.

## Stable MCP 2025-11-25
Expand All @@ -26,15 +26,15 @@ dart run test/conformance/run_2025_server_conformance.dart
```

The runner starts `mcp_2025_server.dart`, runs
`@modelcontextprotocol/conformance@0.2.0-alpha.4 server --suite all
`@modelcontextprotocol/conformance@0.2.0-alpha.5 server --suite all
--spec-version 2025-11-25`, and writes artifacts under
`.dart_tool/conformance/2025_server/`.

Run the stable client suite from the repository root:

```bash
npx -y @modelcontextprotocol/conformance@0.2.0-alpha.4 client \
--command "dart run test/conformance/mcp_2026_rc_client.dart" \
npx -y @modelcontextprotocol/conformance@0.2.0-alpha.5 client \
--command "dart run test/conformance/mcp_2026_07_28_rc_client.dart" \
--suite all \
--spec-version 2025-11-25 \
--verbose \
Expand All @@ -50,35 +50,32 @@ server offers.
Run the current server baseline from the repository root:

```bash
dart run test/conformance/run_2026_rc_server_conformance.dart
dart run test/conformance/run_2026_07_28_rc_server_conformance.dart
```

The runner starts a local `StreamableMcpServer` in default Streamable HTTP SSE
response mode, runs the full `2026-07-28` server scenario list from
`@modelcontextprotocol/conformance@0.2.0-alpha.4` one by one with `--suite all`
`@modelcontextprotocol/conformance@0.2.0-alpha.5` one by one with `--suite all`
and `--spec-version 2026-07-28`, and writes per-run artifacts under
`.dart_tool/conformance/2026_rc/`.
`.dart_tool/conformance/2026_07_28_rc/`.

Expected failures live in `2026_rc_expected_failures.txt`. When a scenario is
Expected failures live in `2026_07_28_rc_expected_failures.txt`. When a scenario is
fixed, remove it from that file so the baseline remains useful.

As of `@modelcontextprotocol/conformance@0.2.0-alpha.4`, the server expected
failure file includes scenarios where the conformance package still expects the
pre-renumber `HeaderMismatch` code `-32001`. The live `2026-07-28` draft assigns
`HeaderMismatch` to `-32020`, so the SDK follows the draft and keeps those
alpha.4 scenarios expected until the conformance package catches up.
As of `@modelcontextprotocol/conformance@0.2.0-alpha.5`, the full 2026-07-28 RC server
suite has no expected failures against the Dart fixture.

Run the current client baseline from the repository root:

```bash
dart run test/conformance/run_2026_rc_client_conformance.dart
dart run test/conformance/run_2026_07_28_rc_client_conformance.dart
```

The client runner invokes `mcp_2026_rc_client.dart` against the conformance
The client runner invokes `mcp_2026_07_28_rc_client.dart` against the conformance
package's scenario servers and writes per-run artifacts under
`.dart_tool/conformance/2026_rc_client/`.
`.dart_tool/conformance/2026_07_28_rc_client/`.

Client expected failures live in `2026_rc_client_expected_failures.txt`.
Client expected failures live in `2026_07_28_rc_client_expected_failures.txt`.
The 2026 client wrapper is aligned with the scenarios returned by
`conformance list --client --spec-version 2026-07-28`; stable-only client
scenarios remain covered by the stable `2025-11-25` client suite above.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'dart:io';
import 'package:mcp_dart/mcp_dart.dart';

const _clientInfo = Implementation(
name: 'mcp-dart-2026-rc-conformance-client',
name: 'mcp-dart-2026-07-28-rc-conformance-client',
version: '0.0.0',
);

Expand Down Expand Up @@ -568,7 +568,7 @@ class _RawStatelessClient {

void _printUsage() {
stdout.writeln(
'Usage: dart run test/conformance/mcp_2026_rc_client.dart <server-url>',
'Usage: dart run test/conformance/mcp_2026_07_28_rc_client.dart <server-url>',
);
}

Expand Down
Loading