anthropics / anthropics/claude-code

[BUG] Claude Desktop: first-party Filesystem extension unusable — all tools rejected, "outputSchema declares an unsupported dialect (draft-07)"

Aperta
#94,351 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
area:mcp duplicate platform:macos
Lingua principale
Python
Stelle
145k
Fork
23.1k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

Anthropic's own Filesystem extension is completely unusable in Claude
Desktop. Every tool is rejected before dispatch by the host's own
schema validator. Clean install, current version, no user config
involved.

Related: #86142 — closed 2026-08-20 as non-reproducing after a test on
Claude Code CLI 2.1.233 (Linux). The reports were Claude Desktop
(macOS/Windows). Those surfaces select different MCP client stacks at
runtime via tengu_brindle_causeway: v1 accepts draft-07, v2 rejects it.
Confirmations continued after closure across Desktop, Cowork, and
numerous third-party servers. Filing fresh rather than commenting on a
closed thread.

ENVIRONMENT
Surface: Claude Desktop (Cowork session), macOS, Apple Silicon
Host: 1.52386.3
Extension: ant.dir.ant.anthropic.filesystem 2026.7.10 (current, no update offered)
Bundles: @modelcontextprotocol/server-filesystem 2026.7.4
SDK: @modelcontextprotocol/sdk 1.29.0

SYMPTOM
Every tool fails before dispatch. No tool has ever executed.

invalid outputSchema: JSON Schema declares an unsupported dialect
("$schema": "http://json-schema.org/draft-07/schema#"). The default
validator supports JSON Schema 2020-12 only; pass a pre-configured
Ajv instance to AjvJs

Identical for list_allowed_directories, list_directory, and every
other tool in the manifest.

RULED OUT
- Client-side caching. Forcing a live tool-list re-query returns
"refreshed" with no adds/removes; the next call errors identically.
- Stale or duplicate install. One copy on disk, dated to a clean
uninstall/reinstall. No other server-filesystem copy under
Claude Extensions or ~/.npm/_npx.
- User config. mcpServers in claude_desktop_config.json is {} — the
extension installs through the UI, so editing or deleting that file
changes nothing.
- Extension version. 2026.7.10 is current; no update offered.
- Preferences / folder grants. The failure occurs during tool
definition parsing, before any preference is read.

MECHANISM — SERVER SIDE (confirmed on disk)
dist/index.js contains no draft-07 literal; the string appears only
under node_modules. The SDK routes server-side schema generation
through:

@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
@modelcontextprotocol/sdk/dist/cjs/server/zod-json-schema-compat.js

which calls zod-to-json-schema, defaulting $schema to draft-07. zod v4
ships in the same bundle and its native z.toJSONSchema() emits
2020-12, but the compat shim is the path taken.

MECHANISM — HOST SIDE
Per #86142, the v2 validator accepts only:

https://json-schema.org/draft/2020-12/schema
http://json-schema.org/draft/2020-12/schema

and throws on anything else rather than registering the declared
meta-schema. Since MCP permits draft-07, this rejects conforming
servers. Registering draft-04/06/07 meta-schemas in the v2 Ajv
instance is the durable fix; changing the shim only patches
first-party servers.

SCOPE
Not specific to Filesystem — any server on SDK 1.29.0 declaring
outputSchema fails identically against a v2-strict host.

IMPACT
No user-side action resolves it. Reinstall, config edit, and
preference reset all leave the error byte-identical. A first-party
Anthropic extension failing schema validation against the host it
ships alongside, with the tracking issue closed and no fix released.

### What Should Happen?

Claude reads/writes to mac OS local filesystem

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. On macOS, open Claude Desktop 1.52386.3 (or current).

2. Settings → Extensions → install the first-party "Filesystem"
extension (ant.dir.ant.anthropic.filesystem, v2026.7.10).

3. When prompted for user_config.allowed_directories, select any
directory you can read — e.g. ~/Documents.

4. Start a new conversation. Confirm the Filesystem tools are
announced and visible to the model.

5. Invoke any tool on that server. The simplest takes no arguments:

list_allowed_directories

Or with a path:

list_directory path: /Users//Documents

EXPECTED
The tool executes and returns a directory listing.

ACTUAL
The call never dispatches. It fails during tool-definition parsing:

Error: Tool 'list_allowed_directories' has an invalid outputSchema:
JSON Schema declares an unsupported dialect
("$schema": "http://json-schema.org/draft-07/schema#").
The default validator supports JSON Schema 2020-12 only;
pass a pre-configured Ajv instance to AjvJs

Every tool in the manifest fails identically. No tool has ever
executed.

FREQUENCY
100%. Every call, every session, every tool.

NOTES ON SURFACE
Reproduce on Claude Desktop (macOS), not Claude Code CLI. Per #86142
the two select different MCP client stacks at runtime via
tengu_brindle_causeway — v1 accepts draft-07, v2 rejects it. A
CLI/Linux test will not reproduce this and is what led to #86142
being closed in error.

OPTIONAL VERIFICATION (on-disk, no repro needed)
grep -rl "zod-to-json-schema" \
~/Library/Application\ Support/Claude/Claude\ Extensions/\
ant.dir.ant.anthropic.filesystem/node_modules/@modelcontextprotocol/sdk/dist/

Returns server/zod-json-schema-compat.js in both esm and cjs —
the schema-generation path that emits draft-07.

### Claude Model

Not sure / Multiple models

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.63 (Claude Code)

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

Claude Desktop 1.52386.3 (macOS, Apple Silicon)
NOT Claude Code CLI — see Steps to Reproduce. This is a Desktop-only
surface; the CLI runs a different MCP client stack and will not
reproduce.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.