[BUG]
⚠ Found invalid settings files. They will be ignored. Run /doctor for details.
/model
⎿ Set model to sonnet (claude-sonnet-4-20250514)
what's this error?
> /mcp
⎿ (no content)
TypeError: Cannot assign to read only property '0' of object '[object String]'
at hc2
(file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:6889)
at cc2
(file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:7090)
at kr2
(file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:31593)
at rr2
(file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:32861)
at file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2108:87
at Array.forEach (<anonymous>)
at Zk6
(file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2108:38)
at file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2108:571
at Array.map (<anonymous>)
at Hb2
(file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2108:422)
ERROR Cannot assign to read only property '0' of object '[object String]'
file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:6889
- hc2 (file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:6889)
- cc2 (file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:7090)
- kr2 (file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:31593)
- rr2 (file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:32861)
- (file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2108:87)
- at Array.forEach (<anonymous>)
- Zk6 (file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2108:38)
- (file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2108:571)
- at Array.map (<anonymous>)
- Hb2 (file:///home/ben/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2108:422)
● This is a JavaScript error in Claude Code when running the /mcp command. The error "Cannot
assign to read only property '0' of object '[object String]'" typically occurs when code tries
to modify a string character directly.
● Bash(claude --version)
⎿ 1.0.51 (Claude Code)
● This appears to be a bug in Claude Code v1.0.51's MCP handling. The error suggests the code is
trying to mutate a string character (which is read-only in JavaScript).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗