Skip to content

Commit 69ea4fb

Browse files
committed
Drop conformance burn-down and migration docs from this PR
Move the json-schema-ref-no-deref driver handler, both expected-failures updates, and the migration guide entry out of this PR; they will land separately. This PR is now scoped to the core SEP-2106 code and tests.
1 parent 33774ff commit 69ea4fb

4 files changed

Lines changed: 4 additions & 21 deletions

File tree

.github/actions/conformance/client.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,6 @@ async def run_tools_call(server_url: str) -> None:
185185
logger.debug(f"add_numbers result: {result}")
186186

187187

188-
@register("json-schema-ref-no-deref")
189-
async def run_json_schema_ref_no_deref(server_url: str) -> None:
190-
"""List tools whose schemas contain a network `$ref`; must not dereference it (SEP-2106)."""
191-
async with streamable_http_client(url=server_url) as (read_stream, write_stream):
192-
async with ClientSession(read_stream, write_stream) as session:
193-
await session.initialize()
194-
tools_result = await session.list_tools()
195-
logger.debug(f"Listed tools without dereferencing network $refs: {[t.name for t in tools_result.tools]}")
196-
197-
198188
@register("sse-retry")
199189
async def run_sse_retry(server_url: str) -> None:
200190
"""Connect, initialize, list tools, call test_reconnection, close."""

.github/actions/conformance/expected-failures.2026-07-28.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ client:
6363
# SEP-2243 (HTTP standardization): no fixture handler / client header support yet.
6464
- http-custom-headers
6565
- http-invalid-tool-headers
66+
# SEP-2106 (JSON Schema $ref handling): client still dereferences network $refs.
67+
- json-schema-ref-no-deref
6668
# SEP-2468 (authorization response iss parameter): not implemented in the client.
6769
- auth/iss-supported
6870
- auth/iss-not-advertised

.github/actions/conformance/expected-failures.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ client:
2222
# SEP-2243 (HTTP standardization): no fixture handler / client header support yet.
2323
- http-custom-headers
2424
- http-invalid-tool-headers
25+
# SEP-2106 (JSON Schema $ref handling): client still dereferences network $refs.
26+
- json-schema-ref-no-deref
2527
# SEP-2468 (authorization response iss parameter): not implemented in the client.
2628
- auth/iss-supported
2729
- auth/iss-not-advertised

docs/migration.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,17 +240,6 @@ Results returned from server handlers are now validated against the negotiated p
240240

241241
`ClientSession` now validates server requests, notifications, and results against the negotiated protocol version's schema before parsing them into `mcp.types` models. Spec-invalid server output that the previous monolith parse tolerated may now raise `pydantic.ValidationError` from `list_tools()`, `call_tool()`, and similar calls. `_meta` remains the sanctioned place for result extras (and `experimental` for capability extras).
242242

243-
### External JSON Schema `$ref`s are rejected (SEP-2106)
244-
245-
SEP-2106 permits the full JSON Schema 2020-12 vocabulary in tool schemas, including `$ref`. A `$ref` that resolves to a network URI is an SSRF / fetch-DoS vector, so per the spec implementations MUST NOT automatically dereference any `$ref` that is not a same-document reference (a JSON Pointer such as `#/$defs/Foo` or an `$anchor` such as `#Foo`).
246-
247-
The SDK never dereferences such refs and now rejects them outright with `ExternalSchemaRefError` (a `ValueError` subclass, importable from `mcp.shared.json_schema_ref`):
248-
249-
- **Server:** registering a tool whose generated input or output schema contains an external `$ref` raises at registration time. Schemas Pydantic generates from your type hints only ever use same-document refs, so this affects you only if you smuggle an external `$ref` into a schema (e.g. via `Field(json_schema_extra=...)`).
250-
- **Client:** validating a tool result whose output schema contains an external `$ref` raises instead of attempting to resolve it.
251-
252-
To migrate, inline the referenced schema or replace the external `$ref` with a same-document reference into `$defs`.
253-
254243
### `args` parameter removed from `ClientSessionGroup.call_tool()`
255244

256245
The deprecated `args` parameter has been removed from `ClientSessionGroup.call_tool()`. Use `arguments` instead.

0 commit comments

Comments
 (0)