Skip to content
Crafthall

All agents togetherError

Claude Code settings.json ignored: invalid JSON

Settings or MCP file is not valid JSON: A Claude Code settings file or `.mcp.json` does not parse as strict JSON, so Claude Code skips the file.

Why it matters

Claude Code reads settings files as strict JSON. A trailing comma or a comment, valid in many editors and in tsconfig files, makes the file fail to parse, and Claude Code skips all of it: every deny rule, hook and setting in the file is gone at once.

Claude Code skips a settings or MCP file it cannot parse, so every permission, hook or server in it is gone.

An example that triggers it

A small Claude Code workspace. The marked lines are the ones the check cites.

Before.claude/settings.json
{  "permissions": {    "deny": ["Read(./.env)"],  }}
Also in the workspace.claude/agents/reviewer.md
---name: reviewerdescription: Reviews a diff. Use after code changes.tools: Read, Grep, Glob---Review the change. Never edit files.

What Crafthall reports

The output of /crafthall:open --report on this example, generated by the plugin's own check when this page was built.

claude › /crafthall:open --report
1. [high] Settings or MCP file is not valid JSON – .claude/settings.json:4
.claude/settings.json is not valid JSON (line 4: trailing comma), so Claude Code skips the whole file: none of its permissions, hooks or other settings apply.
Fix: Fix the JSON at that line (Claude Code settings are strict JSON: no comments, no trailing commas).
Real output on the example above.

How to fix it

Remove the trailing comma. Claude Code settings are strict JSON: no comments, no trailing commas.

After.claude/settings.json
{  "permissions": {    "deny": ["Read(./.env)"]  }}

Run on the fixed workspace, the check reports nothing for this rule.

How the check works

The file was parsed as strict JSON. It reads your files with text patterns, on your machine – no model, so the same files give the same result every run.

Check your own agents

Install the free plugin, then run /crafthall:open in your workspace. It runs all checks, not only this one.

claude plugin install crafthall --marketplace crafthall/plugins

All 26 checks