Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
7348727
Consolidate MCP 2026 feature foundation
leehack Jun 1, 2026
f3542a8
Consolidate MCP 2026 transport enforcement
leehack Jun 1, 2026
e9b94c7
Consolidate MCP 2026 result semantics
leehack Jun 1, 2026
c994327
Consolidate JSON-RPC metadata hardening
leehack Jun 1, 2026
f9f9df5
Consolidate type schema validation
leehack Jun 1, 2026
9ee1f99
Validate sampling wire fields
leehack Jun 1, 2026
5807114
Validate content resource wire fields
leehack Jun 1, 2026
883532a
Validate initialization wire fields
leehack Jun 1, 2026
49e86b1
Validate prompt completion wire fields
leehack Jun 1, 2026
ddd8cb5
Validate tool wire fields
leehack Jun 1, 2026
f2f3b0c
Validate root wire fields
leehack Jun 1, 2026
14cf221
Validate task wire fields
leehack Jun 1, 2026
48192a3
Validate elicitation wire fields
leehack Jun 1, 2026
f3412b7
Validate subscription wire fields
leehack Jun 1, 2026
c6b3f03
Validate sampling tool wire fields
leehack Jun 1, 2026
74d3ff7
Validate content block discriminators
leehack Jun 1, 2026
5a37ecf
Validate resource content union
leehack Jun 1, 2026
85974fa
Validate sampling content discriminators
leehack Jun 1, 2026
980822e
Validate completion reference discriminators
leehack Jun 1, 2026
61ea486
Validate completion request wrapper constants
leehack Jun 1, 2026
3c6f976
Validate prompt request wrapper constants
leehack Jun 1, 2026
4a3a59a
Validate resource request wrapper constants
leehack Jun 1, 2026
8cc2d0c
Validate tool request wrapper constants
leehack Jun 1, 2026
8f28d52
Validate root request wrapper constants
leehack Jun 1, 2026
dfc0fe3
Validate common request wrapper constants
leehack Jun 1, 2026
4602e75
Validate initialization wrapper constants
leehack Jun 1, 2026
b2dca45
Validate task wrapper constants
leehack Jun 1, 2026
7a7b527
Validate sampling and elicitation wrapper constants
leehack Jun 1, 2026
59a6a00
Preserve empty result metadata
leehack Jun 1, 2026
e236fe4
Preserve filtered tool cache hints
leehack Jun 1, 2026
c113ff2
Preserve unknown capability entries
leehack Jun 1, 2026
afabf92
Handle client input_required retries
leehack Jun 1, 2026
4af899b
Handle custom request fallback dispatch
leehack Jun 1, 2026
c6132af
Validate stateless result types per request
leehack Jun 1, 2026
1ed5ea5
Handle task extension tool results
leehack Jun 1, 2026
3242957
Validate task extension status payloads
leehack Jun 1, 2026
89ebf0c
Route TaskClient through task extension flow
leehack Jun 1, 2026
b221387
Expand compliance coverage for 2026 RC
leehack Jun 1, 2026
9a57c75
Add official conformance CI coverage
leehack Jun 3, 2026
3f52eaf
Align header conformance with 2026 RC
leehack Jun 3, 2026
44333da
Use Node 24 for conformance CI
leehack Jun 3, 2026
5be81d6
Add typed protocol profile opt-in
leehack Jun 3, 2026
dee1e7e
Fix CLI conformance profile fixtures
leehack Jun 3, 2026
7f44ddb
Prepare 2026 draft dev release
leehack Jun 3, 2026
d2d4a10
Document deprecated public APIs
leehack Jun 3, 2026
0c5ca39
Wait for both Codecov uploads
leehack Jun 3, 2026
0d19678
Merge MCP 2026 feature foundation
leehack Jun 3, 2026
96c31c4
Merge MCP 2026 transport enforcement
leehack Jun 3, 2026
9f4f6af
Merge MCP 2026 result semantics
leehack Jun 3, 2026
8f537c0
Merge JSON-RPC metadata hardening
leehack Jun 3, 2026
7023f9a
Merge type schema validation and conformance gates
leehack Jun 3, 2026
a32bdfc
Prepare dev release workflow
leehack Jun 3, 2026
6cd000f
Polish dev release docs
leehack Jun 3, 2026
0e51f8f
Merge pull request #275 from leehack/prep/dev-release-workflow
leehack Jun 4, 2026
a07d0a3
Fix CLI binary workflow runner labels
leehack Jun 4, 2026
7c16b65
Merge pull request #276 from leehack/fix-cli-binary-runner-labels
leehack Jun 4, 2026
dbf89e9
Update official conformance to alpha.2
leehack Jun 4, 2026
37d8bd9
Merge pull request #277 from leehack/update-conformance-alpha2
leehack Jun 12, 2026
734ae32
Preserve JSON Schema boolean subschemas
megakoresh Jun 12, 2026
7d2da04
Preserve boolean schemas in legacy tool shims
leehack Jun 12, 2026
d5a3717
Merge pull request #282 from leehack/fix/json-schema-boolean-subschem…
leehack Jun 12, 2026
60a8990
Merge main into dev 2026 RC
leehack Jun 12, 2026
3e4bc52
Merge pull request #283 from leehack/sync/main-into-dev-2026-rc
leehack Jun 12, 2026
ab1745a
Update conformance alpha3 draft target
leehack Jun 12, 2026
86c42c7
Remove legacy 2026 draft alias
leehack Jun 12, 2026
fe89a11
Cover removed draft protocol alias
leehack Jun 12, 2026
1959708
Run full 2026 server conformance
leehack Jun 12, 2026
d4c7337
Merge pull request #284 from leehack/update-conformance-alpha3
leehack Jun 12, 2026
a96474a
Update conformance alpha4 baseline
leehack Jun 17, 2026
ad0b8e9
Merge pull request #285 from leehack/update-conformance-alpha4
leehack Jun 17, 2026
be65f06
Add TS 2026 RC interop smoke
leehack Jun 19, 2026
ef97422
Expand TS 2026 RC interop critical paths (#287)
leehack Jun 19, 2026
d01d081
Prepare dev release 2.3.0-dev.1 (#288)
leehack Jun 21, 2026
f90d3f9
Update conformance alpha5 and TS RC interop (#289)
leehack Jun 24, 2026
29a4cec
Refresh alpha6 conformance coverage (#290)
leehack Jun 24, 2026
e7db2da
chore: sync main platform support into 2026 RC
leehack Jun 26, 2026
c29de26
Merge main platform support into 2026 RC
leehack Jun 26, 2026
396beb6
Update conformance alpha7 baseline (#291)
leehack Jun 26, 2026
17cedda
fix: return subscription listen close metadata
leehack Jun 28, 2026
9c3c2ae
Merge pull request #294 from leehack/fix/subscriptions-listen-result
leehack Jun 28, 2026
6dffa4d
chore: clean up example analysis and 2026 previews
leehack Jun 28, 2026
d47bbb9
Merge pull request #295 from leehack/fix/examples-2026-hygiene
leehack Jun 29, 2026
010944b
ci: isolate 2025 server conformance scenarios
leehack Jun 29, 2026
7c965fc
Merge branch 'main' into dev/2026-07-28-rc
leehack Jun 29, 2026
2e4be01
docs: clarify TypeScript alpha interop blocker (#297)
leehack Jun 29, 2026
95fd778
test: update 2026 interop and conformance pins (#298)
leehack Jul 1, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/cli_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
asset: mcp_dart-macos-x64
- os: macos-14
asset: mcp_dart-macos-arm64
- os: windows-latest
- os: windows-2025
asset: mcp_dart-windows-x64.exe

defaults:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
"./dist/${{ matrix.asset }}" --version

- name: Upload binary artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.asset }}
path: packages/mcp_dart_cli/dist/${{ matrix.asset }}
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/interop_2026_07_28.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Run MCP 2026-07-28 TypeScript Interop

permissions:
contents: read

on:
workflow_dispatch:
schedule:
- cron: '17 9 * * *'
pull_request:
paths:
- 'lib/**'
- 'test/conformance/**'
- 'test/interop/ts_2026_07_28_rc/**'
- 'tool/testing/run_ts_2026_07_28_rc_interop.dart'
- '.github/workflows/interop_2026_07_28.yml'
- 'pubspec.yaml'
- 'pubspec.lock'
push:
branches:
- dev/2026-07-28-rc
paths:
- 'lib/**'
- 'test/conformance/**'
- 'test/interop/ts_2026_07_28_rc/**'
- 'tool/testing/run_ts_2026_07_28_rc_interop.dart'
- '.github/workflows/interop_2026_07_28.yml'
- 'pubspec.yaml'
- 'pubspec.lock'

jobs:
ts-2026-07-28-interop:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '24'

- name: Install Dart dependencies
run: dart pub get

- name: Install TypeScript 2026-07-28 fixture dependencies
working-directory: test/interop/ts_2026_07_28_rc
run: npm ci

- name: Run TypeScript 2026-07-28 interop fixture
run: dart run tool/testing/run_ts_2026_07_28_rc_interop.dart
5 changes: 5 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
rm -rf "$PUBLISH_ROOT"
mkdir -p "$PUBLISH_ROOT"
rsync -a --exclude .git --exclude .dart_tool --exclude pubspec.lock ./ "$PUBLISH_ROOT/"
rm -f "$PUBLISH_ROOT/packages/mcp_dart_cli/pubspec_overrides.yaml"
echo "working_directory=$PUBLISH_ROOT/${{ steps.package-info.outputs.working_directory }}" >> "$GITHUB_OUTPUT"
else
echo "working_directory=${{ steps.package-info.outputs.working_directory }}" >> "$GITHUB_OUTPUT"
Expand All @@ -52,6 +53,10 @@ jobs:
working-directory: ${{ steps.publish-dir.outputs.working_directory }}
run: dart pub get

- name: Validate package for publishing
working-directory: ${{ steps.publish-dir.outputs.working_directory }}
run: dart pub publish --dry-run

- name: Publish to pub.dev
working-directory: ${{ steps.publish-dir.outputs.working_directory }}
run: dart pub publish --force
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ jobs:
echo "📦 Package: ${{ inputs.package }}"
echo "📦 Detected version: $VERSION"

- name: Determine release type
id: release-type
run: |
VERSION="${{ steps.get-version.outputs.version }}"
if [[ "$VERSION" == *-* ]]; then
echo "prerelease=true" >> "$GITHUB_OUTPUT"
echo "make_latest=false" >> "$GITHUB_OUTPUT"
echo "📦 Release type: prerelease"
else
echo "prerelease=false" >> "$GITHUB_OUTPUT"
echo "make_latest=true" >> "$GITHUB_OUTPUT"
echo "📦 Release type: stable"
fi

- name: Check if tag already exists
run: |
TAG="${{ steps.set-config.outputs.tag_prefix }}${{ steps.get-version.outputs.version }}"
Expand Down Expand Up @@ -69,4 +83,6 @@ jobs:
tag_name: ${{ steps.create-tag.outputs.tag }}
name: ${{ inputs.package }} ${{ steps.get-version.outputs.version }}
generate_release_notes: true
prerelease: ${{ steps.release-type.outputs.prerelease }}
make_latest: ${{ steps.release-type.outputs.make_latest }}
draft: false
8 changes: 5 additions & 3 deletions .github/workflows/test_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
node-version: '24'

- name: Set up Python
uses: actions/setup-python@v6
Expand Down Expand Up @@ -100,8 +100,10 @@ jobs:
# Given the previous task aimed for 160/160, let's keep it strict but maybe allow slight dev.
# For this initial workflow file, I will fail if not max points to maintain quality.
if [ "$PANA_EXIT" -ne 0 ] || [ "$SCORE" != "$MAX_POINTS" ]; then
if grep -q 'depends on mcp_dart .*which doesn.*t match any versions' pana_output.json; then
echo "::warning::Skipping strict CLI pana score because this PR prepares the CLI against an unpublished mcp_dart release. Publish mcp_dart first, then rerun pana before publishing mcp_dart_cli."
if grep -q 'depends on mcp_dart .*which doesn.*t match any versions' pana_output.json ||
{ grep -q '^dependency_overrides:' pubspec.yaml &&
grep -Eq 'UNDEFINED_(NAMED_PARAMETER|FUNCTION|GETTER|METHOD|CLASS)' pana_output.json; }; then
echo "::warning::Skipping strict CLI pana score because this PR prepares the CLI against unpublished local mcp_dart APIs. Publish mcp_dart first, then rerun pana before publishing mcp_dart_cli."
exit 0
fi
echo "pana exited with code $PANA_EXIT."
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/test_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
node-version: '24'

- name: Install TS Interop dependencies
working-directory: test/interop/ts
Expand All @@ -43,6 +43,34 @@ jobs:
working-directory: packages/mcp_dart_cli
run: dart run bin/mcp_dart.dart conformance --suite all --json

- name: Run official MCP 2025 server conformance
run: >
dart run test/conformance/run_2025_server_conformance.dart
--timeout-seconds 90
--isolate-scenarios
--output-dir .dart_tool/conformance/ci_2025_server

- name: Run official MCP 2025 client conformance
run: >
npx -y @modelcontextprotocol/conformance@0.2.0-alpha.8 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-07-28 RC server conformance
run: >
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-07-28 RC client conformance
run: >
dart run test/conformance/run_2026_07_28_rc_client_conformance.dart
--timeout-seconds 90
--output-dir .dart_tool/conformance/ci_2026_client

- name: Run interop test suite
run: dart test -t interop

Expand Down
132 changes: 132 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,135 @@
## Unreleased

### Platform support

- Inherited the stable 2.2.2 web/WASM-safe default export path, preserving
Dart IO native exports while working around pub.dev/pana 0.23.13 WASM
platform scoring for conditional exports.

### Conformance and interoperability

- Re-pinned the TypeScript SDK 2026-07-28 RC interop fixture from `pkg.pr.new`
previews to published `@modelcontextprotocol/client@2.0.0-beta.1` and
`@modelcontextprotocol/server@2.0.0-beta.1` packages after verifying both
Dart -> TypeScript and TypeScript -> Dart 2026 draft/RC paths.
- Updated official conformance gates to
`@modelcontextprotocol/conformance@0.2.0-alpha.8`, adding the new stateless
diagnostic probes for missing client capabilities, response-stream shape, and
request-scoped logging. 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.
- Added a dedicated CI workflow for the TypeScript SDK 2026-07-28 RC beta
interop fixture on relevant PRs, `dev/2026-07-28-rc` pushes, daily schedule,
and manual dispatch.
- Added an MCP 2026-07-28 draft/RC spec coverage matrix that maps the opt-in
profile to official conformance, local tests, and TypeScript SDK beta interop.
- Switched the reverse Dart 2026 client -> TypeScript SDK beta 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.
- Added `SubscriptionsListenResult` for graceful `subscriptions/listen` closure
and now include the required `io.modelcontextprotocol/subscriptionId` metadata
in Dart server responses and client `McpSubscription.done` results.
- Cleaned up root analyzer coverage for standalone example packages and opted
Streamable HTTP, Flutter/Jaspr web client, and MCP Apps examples into the
`2026-07-28` preview protocol profile with stable fallback where applicable.
- Broadened preview client discovery fallback so servers that implement
`server/discover` but advertise only stable protocol versions can still
connect through the stable `initialize` flow.

## 2.3.0-dev.1

This dev preview refreshes MCP `2026-07-28` draft/RC support while keeping MCP
`2025-11-25` as the default protocol profile.

### MCP 2026-07-28 draft/RC refresh

- Aligned draft protocol-defined error codes with the live draft:
`HeaderMismatch` is now `-32020`,
`MissingRequiredClientCapability` is now `-32021`, and
`UnsupportedProtocolVersion` is now `-32022`.
- Marked `server/discover` as a 2026 cacheable result so stateless responses
include default `ttlMs` and `cacheScope` hints.
- Removed the legacy `DRAFT-2026-v1` draft alias now that official conformance
targets the `2026-07-28` wire version.
- Ported the JSON Schema boolean-subschema preservation fix onto the RC dev
line, including legacy tool-schema shims.

### Conformance and interoperability

- Updated official conformance gates to
`@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-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,
unsupported-version and removed core RPC rejection, `subscriptions/listen`,
and Streamable HTTP SSE cancellation.
- Added a diagnostic Dart preview client -> TypeScript server alpha path and
documented the current TS alpha gaps around mandatory `server/discover` and
stateless `resultType` responses.

## 2.3.0-dev.0

This is a dev preview for MCP `2026-07-28` draft/RC support. MCP
`2025-11-25` remains the default protocol profile; draft/RC behavior is enabled
explicitly and may still change before the official spec release.

### MCP 2026-07-28 draft/RC preview

- Added `McpProtocol.preview2026` and `McpProtocol.require2026` profiles for
clients and servers, with stable `initialize` behavior preserved by default.
- Added `server/discover` negotiation, per-request stateless metadata,
protocol/client/capability validation, and version-aware fallback behavior.
- Added stateless Streamable HTTP behavior for POST-only requests, no
`Mcp-Session-Id`, `Mcp-Name` task routing, `Mcp-Param-*` argument headers,
CORS preflights, SSE cancellation, and request-scoped logging.
- Added draft-only flows for `subscriptions/listen`, MCP Tasks extension
handlers, MRTR `input_required` results, cacheable list/read results, and
`input_required` prompt/resource responses.
- Added explicit typed APIs for non-object draft result data, including
`JsonValue`, `structuredContentJson`,
`CallToolResult.fromStructuredArray()`, and server `outputJsonSchema`.

### Stable compatibility

- Kept stable public tool-result APIs object-rooted and omitted non-object
structured output from stable MCP `2025-11-25` responses.
- Preserved stable session behavior, registration-order list output, legacy task
augmentation, stable-only `Tool.execution` metadata, and legacy resource error
codes outside the 2026 stateless profile.
- Preserved numeric JSON-RPC request IDs and progress tokens end-to-end while
continuing to reject non-finite numeric values.

### Spec hardening

- Tightened JSON-RPC envelope parsing, wrapper constant checks, error object
validation, `_meta` key validation, and mixed request/response rejection.
- Accepted and preserved JSON Schema 2020-12 boolean subschemas in nested
schema positions such as object properties, array items, composition
keywords, and `not`.
- Tightened typed parsing for content, resources, prompts, tools, roots,
sampling, elicitation, tasks, subscriptions, completions, capabilities, and
JSON Schema fields so malformed wire values fail with protocol errors instead
of Dart cast errors.
- Validated JSON-only metadata and result data across JSON-RPC, MRTR, task,
subscription, sampling, tool, resource, and content boundaries.

### Conformance and release readiness

- Added official MCP `2025-11-25` and MCP `2026-07-28` draft/RC client/server
conformance gates to core CI.
- Added `tool/spec_example_audit.dart` for parsing upstream machine-readable
spec examples through checked-in SDK types during RC/final release audits.
- Prepared the dev release workflow so prerelease tags are GitHub prereleases,
publish jobs run `dart pub publish --dry-run`, and the draft/RC transition
guide includes a dev release checklist.
- Pointed prerelease package documentation links at `dev/2026-07-28-rc` so
pub.dev users see the draft/RC docs that match the dev package.

## 2.2.2

### Platform support
Expand Down
Loading