Summary
@modelcontextprotocol/server-filesystem (tested on the current latest, 2026.8.31, published 2026-09-17) emits tools/list responses where every tool's schema declares:
"$schema": "http://json-schema.org/draft-07/schema#"
Clients that validate tools/list strictly against JSON Schema 2020-12 reject every tool outright, e.g.:
Tool '<name>' has an invalid outputSchema/inputSchema: JSON Schema declares an unsupported dialect ("$schema": "http://json-schema.org/draft-07/schema#"). The default validator supports JSON Schema 2020-12 only
This is the same class of problem noted as a "separately noted, different, unrelated bug" in #4772 for server-memory, but here it reproduces for server-filesystem as well.
Steps to reproduce
Spawn the server directly and send a raw tools/list request over stdio:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}\n{"jsonrpc":"2.0","method":"notifications/initialized"}\n{"jsonrpc":"2.0","id":2,"method":"tools/list"}\n' \
| node node_modules/@modelcontextprotocol/server-filesystem/dist/index.js /some/allowed/dir
Every tool's inputSchema includes "$schema":"http://json-schema.org/draft-07/schema#".
What I checked before filing
- Confirmed this reproduces on a fresh install of the latest published version (
2026.8.31), not an old cached one — npm ls -g @modelcontextprotocol/server-filesystem shows 2026.8.31, installed minutes before reproducing.
- The package depends on
zod-to-json-schema@3.25.2, whose zodToJsonSchema() sets combined.$schema = "http://json-schema.org/draft-07/schema#" whenever refs.target === "jsonSchema7" (its own default target) — dist/cjs/zodToJsonSchema.js and dist/esm/zodToJsonSchema.js, same line in both.
- However, patching that exact line in both files (changing the literal to a 2020-12 URI) and re-spawning the server (fresh process, no compile cache active, confirmed via
node -e "console.log(process.env.NODE_COMPILE_CACHE)" → undefined) did not change the live tools/list output — it still returns draft-07. I verified with grep that the patched files on disk have zero occurrences of draft-07 after the edit, yet the live response is unchanged.
- I could not find any other occurrence of the literal string
draft-07 anywhere else under server-filesystem's own node_modules/@modelcontextprotocol/sdk, and dist/index.js itself contains no zod-to-json-schema import and no toJSONSchema call.
- One more lead I did not have time to chase down: the package also pulls in
zod v4, whose native toJSONSchema() (node_modules/zod/v4/core/json-schema-generator.js) also normalizes its default target to "draft-07" (see the module's own JSDoc example and the normalizedTarget = "draft-07" fallback). It's possible the actual schema generation path used by the current build goes through Zod v4's native generator instead of (or in addition to) zod-to-json-schema, which would explain why patching the latter had no effect. I did not confirm this — flagging it as the most promising next place to look.
Impact
Any MCP client with a strict JSON Schema 2020-12 validator on tools/list (e.g. Claude Code / Claude Desktop's "Cowork and Code sessions" context, similar to what's described in #4772) cannot use server-filesystem at all — every tool call fails at the schema-validation step before it's ever invoked.
Environment
@modelcontextprotocol/server-filesystem@2026.8.31
zod-to-json-schema@3.25.2 (as installed transitively)
- Node.js v24.15.0, Windows 11 ARM64
Summary
@modelcontextprotocol/server-filesystem(tested on the current latest,2026.8.31, published 2026-09-17) emitstools/listresponses where every tool's schema declares:Clients that validate
tools/liststrictly against JSON Schema 2020-12 reject every tool outright, e.g.:This is the same class of problem noted as a "separately noted, different, unrelated bug" in #4772 for
server-memory, but here it reproduces forserver-filesystemas well.Steps to reproduce
Spawn the server directly and send a raw
tools/listrequest over stdio:Every tool's
inputSchemaincludes"$schema":"http://json-schema.org/draft-07/schema#".What I checked before filing
2026.8.31), not an old cached one —npm ls -g @modelcontextprotocol/server-filesystemshows2026.8.31, installed minutes before reproducing.zod-to-json-schema@3.25.2, whosezodToJsonSchema()setscombined.$schema = "http://json-schema.org/draft-07/schema#"wheneverrefs.target === "jsonSchema7"(its own default target) —dist/cjs/zodToJsonSchema.jsanddist/esm/zodToJsonSchema.js, same line in both.node -e "console.log(process.env.NODE_COMPILE_CACHE)"→undefined) did not change the livetools/listoutput — it still returnsdraft-07. I verified withgrepthat the patched files on disk have zero occurrences ofdraft-07after the edit, yet the live response is unchanged.draft-07anywhere else underserver-filesystem's ownnode_modules/@modelcontextprotocol/sdk, anddist/index.jsitself contains nozod-to-json-schemaimport and notoJSONSchemacall.zodv4, whose nativetoJSONSchema()(node_modules/zod/v4/core/json-schema-generator.js) also normalizes its default target to"draft-07"(see the module's own JSDoc example and thenormalizedTarget = "draft-07"fallback). It's possible the actual schema generation path used by the current build goes through Zod v4's native generator instead of (or in addition to)zod-to-json-schema, which would explain why patching the latter had no effect. I did not confirm this — flagging it as the most promising next place to look.Impact
Any MCP client with a strict JSON Schema 2020-12 validator on
tools/list(e.g. Claude Code / Claude Desktop's "Cowork and Code sessions" context, similar to what's described in #4772) cannot useserver-filesystemat all — every tool call fails at the schema-validation step before it's ever invoked.Environment
@modelcontextprotocol/server-filesystem@2026.8.31zod-to-json-schema@3.25.2(as installed transitively)