[BUG] enabledMcpjsonServers in settings.json changes from an array to a string without notice, then fails validation ("Invalid settings")

Status Open
Reported on v2.1.292
Maintainer reply None cached
Activity 1 comment · opened Oct 7, 2026

Preflight Checklist

  • [x] I have searched existing issues 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?

Claude Code changed enabledMcpjsonServers in ~/.claude/settings.json from an array to a plain string. I did not edit the file by hand, and Claude Code did not tell me about the change. In a later run, Claude Code showed an "Invalid settings" warning. The schema expects an array of strings, so the string value fails validation. I asked Claude Code to fix the file. It changed the value back to an array, and the warning went away. This is repeated while in some folders each day for the past week or so.

What Should Happen?

  • Claude Code always writes enabledMcpjsonServers as an array of strings, also when there is only one item.
  • Claude Code does not change user settings in a way that fails its own validation.

Error Messages/Logs

Steps to Reproduce

I do not have exact steps. This is what I know:

  1. ~/.claude/settings.json contains "enabledMcpjsonServers": ["ExampleMcp-Server"] (an array with one item).
  2. Use Claude Code normally across several sessions, with an MCP server from a project .mcp.json enabled.
  3. At some point, the value in settings.json changes to "enabledMcpjsonServers": "ExampleMcp-Server" (a string).
  4. In a later run, Claude Code shows an "Invalid settings" warning.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

not sure but less than a week ago

Claude Code Version

2.1.292 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Diff of the fix:

  • "enabledMcpjsonServers": "ExampleMcp-Server",
  • "enabledMcpjsonServers": ["ExampleMcp-Server"],

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗