Pencil MCP server has invalid JSON schema, crashes all sessions

Resolved 💬 3 comments Opened Mar 7, 2026 by nfodor Closed Mar 11, 2026

Bug

The Pencil MCP server (remote Claude.ai integration) has an invalid JSON schema in one of its tool definitions. This causes every tool call in the session to fail with:

API Error: 400 tools.22.custom.input_schema: JSON schema is invalid. 
It must match JSON Schema draft 2020-12

The tool index varies depending on how many tools are loaded (tools.22, tools.39, tools.1).

Impact

  • Session-breaking: Once triggered, no tools can be called for the rest of the session
  • Affects all projects: Any project with Pencil MCP enabled hits this
  • Silent failure: User doesn't know why Claude Code stopped working — just sees repeated API errors
  • Data loss: In-progress work in the session is lost since you can't save/commit

Reproduction

  1. Have the Pencil MCP server enabled (Claude.ai remote integration)
  2. Start a Claude Code session
  3. Try to use any tool (Agent, Bash, Read, etc.)
  4. Every tool call fails with the schema validation error

Observed in

  • Multiple sessions across different projects (sysadmin, setipio-api)
  • Claude Opus 4.6
  • macOS (Darwin 25.3.0)
  • March 7, 2026

Workaround

Added "deny": ["mcp__pencil"] to ~/.claude/settings.json — but this shouldn't be necessary. The Pencil MCP server should either fix its schema or Claude Code should gracefully skip tools with invalid schemas instead of failing the entire API call.

Suggestion

Claude Code should validate MCP tool schemas at startup and warn/skip invalid ones rather than letting them break every subsequent API call.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗