Bug Report
Summary
Every tool registered by @dokploy/mcp has an invalid input_schema that causes the Anthropic API to return a 400 error when the MCP is connected to Claude Code (or any Claude API client):
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.22.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use."},"request_id":"..."}
Root Cause
@dokploy/mcp uses zod-to-json-schema (via @modelcontextprotocol/sdk) which injects "$schema": "http://json-schema.org/draft-07/schema#" into every generated input_schema.
The Anthropic API requires tool input_schema to comply with JSON Schema draft 2020-12 and rejects any schema that declares itself as draft-07.
Affected file:
node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
The toJsonSchemaCompat function always injects $schema: draft-07 into the output.
Impact
- All 519 dokploy tools are affected — the first one encountered (tool index 22 in a typical Claude Code session) triggers the error
- The MCP cannot be used with Claude Code / Anthropic API at all until fixed
Versions
@dokploy/mcp: latest (npx -y @dokploy/mcp)
@modelcontextprotocol/sdk: v1.29.0
zod-to-json-schema: v3.25.2
Proposed Fix
In the MCP server's tool registration layer, strip the $schema key from every generated input_schema before registering:
// After generating schema with zodToJsonSchema(...)
delete schema.$schema;
Or pass options to suppress $schema injection if/when zod-to-json-schema exposes that option in a future version.
Workaround (for users)
Remove dokploy from mcpServers in ~/.claude/settings.json until this is fixed.
Bug Report
Summary
Every tool registered by
@dokploy/mcphas an invalidinput_schemathat causes the Anthropic API to return a 400 error when the MCP is connected to Claude Code (or any Claude API client):Root Cause
@dokploy/mcpuseszod-to-json-schema(via@modelcontextprotocol/sdk) which injects"$schema": "http://json-schema.org/draft-07/schema#"into every generatedinput_schema.The Anthropic API requires tool
input_schemato comply with JSON Schema draft 2020-12 and rejects any schema that declares itself as draft-07.Affected file:
The
toJsonSchemaCompatfunction always injects$schema: draft-07into the output.Impact
Versions
@dokploy/mcp: latest (npx -y @dokploy/mcp)@modelcontextprotocol/sdk: v1.29.0zod-to-json-schema: v3.25.2Proposed Fix
In the MCP server's tool registration layer, strip the
$schemakey from every generatedinput_schemabefore registering:Or pass options to suppress
$schemainjection if/whenzod-to-json-schemaexposes that option in a future version.Workaround (for users)
Remove
dokployfrommcpServersin~/.claude/settings.jsonuntil this is fixed.