Skip to content

Let McpClient connect with the 2025-03-26 and 2025-06-18 revisions - #10943

Merged
tim-smart merged 5 commits into
Effect-TS:mainfrom
RhysSullivan:mcp-client-revisions
Nov 27, 2026
Merged

tim-smart merged 5 commits into
Effect-TS:mainfrom
RhysSullivan:mcp-client-revisions

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Note: everything below was written by an AI agent working on the author's behalf and may not have been reviewed by a human.

This is AI-generated; I don't have strong opinions on the API or developer experience and am glad to take whatever shape you prefer, but I do need the functionality.

Problem

McpClient cannot connect to a server that only speaks 2025-03-26 or 2025-06-18. Many deployed MCP servers still do. McpClient.ProtocolVersion is "2025-11-25" | "2026-07-28", so layerHttp and layerStdio refuse McpProtocol.v2025_06_18 and v2025_03_26 at the type level.

The client itself already handles them. Everything except 2026-07-28 goes through the same initialize path (modern is version === "2026-07-28"), and the server adapters for both revisions exist.

Change

  • ProtocolVersion becomes "2025-03-26" | "2025-06-18" | "2025-11-25" | "2026-07-28". There is no runtime change.
  • MCP.md lists the four revisions and notes that 2025-03-26 has no structured tool results, so callTool has no structuredContent to decode when given a schema.

Tests

  • McpClient.test.ts keeps the existing 2025-11-25 and 2026-07-28 per-revision matrix (including cancellation and skills) and adds one focused HTTP test connecting and calling a tool on 2025-03-26 and 2025-06-18 (checking text content on both, structuredContent: undefined on 2025-03-26, and structuredContent on 2025-06-18).
  • typetest/ai/McpClient.tst.ts verifies that McpClient accepts v2025_03_26, v2025_06_18, v2025_11_25, and v2026_07_28, and rejects v2024_11_05.

Run on this branch (based on main at db1629c626):

  • pnpm test --run packages/effect/test/ai/McpClient.test.ts: 55 passed.
  • pnpm test-types McpClient: 24 tests, 74 assertions passed (TypeScript 5.9 and 6.0).
  • oxlint, pnpm --filter effect check, and pnpm jsdocs --check pass.

A separate PR proposes continuing paused 2026-07-28 tool calls in the client. It touches the same paragraph of MCP.md, so whichever lands second needs a small rebase.

Closes EFF-4369

@changeset-bot

changeset-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1a497cb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
effect Patch
@effect/opentelemetry Patch
@effect/vitest Patch
@effect/ai-amazon-bedrock Patch
@effect/ai-anthropic Patch
@effect/ai-cloudflare Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/ai-typesafe Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/chat-discord Patch
@effect/chat-slack Patch
@effect/chat-teams Patch
@effect/chat-telegram Patch
@effect/chat-whatsapp Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-cloudflare Patch
@effect/platform-deno Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/docgen Patch
@effect/doctest Patch
@effect/graphql-generator Patch
@effect/openapi-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 40.17 KB 40.17 KB 0.00 KB (0.00%)
basic.ts 7.50 KB 7.50 KB 0.00 KB (0.00%)
batching.ts 11.47 KB 11.47 KB 0.00 KB (0.00%)
brand.ts 7.21 KB 7.21 KB 0.00 KB (0.00%)
cache.ts 11.95 KB 11.95 KB 0.00 KB (0.00%)
config.ts 23.33 KB 23.33 KB 0.00 KB (0.00%)
differ.ts 22.47 KB 22.47 KB 0.00 KB (0.00%)
http-client.ts 28.03 KB 28.03 KB 0.00 KB (0.00%)
http-router.ts 38.84 KB 38.84 KB 0.00 KB (0.00%)
logger.ts 12.37 KB 12.37 KB 0.00 KB (0.00%)
metric.ts 9.85 KB 9.85 KB 0.00 KB (0.00%)
optic.ts 7.46 KB 7.46 KB 0.00 KB (0.00%)
pubsub.ts 16.40 KB 16.40 KB 0.00 KB (0.00%)
queue.ts 13.32 KB 13.32 KB 0.00 KB (0.00%)
schedule.ts 12.17 KB 12.17 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 14.48 KB 14.48 KB 0.00 KB (0.00%)
schema-binary.ts 43.03 KB 43.03 KB 0.00 KB (0.00%)
schema-class.ts 22.17 KB 22.17 KB 0.00 KB (0.00%)
schema-codegen.ts 33.66 KB 33.66 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 30.68 KB 30.68 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 28.44 KB 28.44 KB 0.00 KB (0.00%)
schema-string-transformation.ts 15.77 KB 15.77 KB 0.00 KB (0.00%)
schema-string.ts 12.74 KB 12.74 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.67 KB 16.67 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 39.73 KB 39.73 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 21.37 KB 21.37 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 21.52 KB 21.52 KB 0.00 KB (0.00%)
schema-toFormatter.ts 21.62 KB 21.62 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 26.66 KB 26.66 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 21.71 KB 21.71 KB 0.00 KB (0.00%)
schema.ts 21.30 KB 21.30 KB 0.00 KB (0.00%)
stm.ts 14.64 KB 14.64 KB 0.00 KB (0.00%)
stream.ts 10.79 KB 10.79 KB 0.00 KB (0.00%)

@tim-smart
tim-smart merged commit f487573 into Effect-TS:main Nov 27, 2026
15 of 16 checks passed
@effect-bot effect-bot mentioned this pull request Nov 27, 2026

This branch is waiting to be deployed

1 waiting deployment
fork — 1a497cb6 Waiting Nov 26, 2026 by effect-bot via approval-gate #27612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants