Skip to content

fix: fix mcp-config validation error - #472

Open
KenKinCOM wants to merge 1 commit into
nashsu:mainfrom
KenKinCOM:fix/mcp-config-validation
Open

fix: fix mcp-config validation error#472
KenKinCOM wants to merge 1 commit into
nashsu:mainfrom
KenKinCOM:fix/mcp-config-validation

Conversation

@KenKinCOM

Copy link
Copy Markdown

Changed --mcp-config from {} to {"mcpServers":{}} to comply with newer Claude CLI versions that validate the mcpServers field presence.

This fixes the error: 'Invalid MCP configuration: mcpServers: Invalid input: expected record, received undefined'

Changed --mcp-config from {} to {"mcpServers":{}} to comply with newer Claude CLI versions that validate the mcpServers field presence.

This fixes the error: 'Invalid MCP configuration: mcpServers: Invalid input: expected record, received undefined'

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@chuenchen309

Copy link
Copy Markdown
Contributor

This one looks like it's already resolved on main. src-tauri/src/commands/claude_cli.rs now defines the empty isolated config as a named constant and uses it for --mcp-config:

const ISOLATED_MCP_CONFIG: &str = "{\"mcpServers\":{}}";

build_claude_cli_args passes ISOLATED_MCP_CONFIG (with a comment noting the required top-level mcpServers key), and the unit test asserts against it too. That's the same {}{"mcpServers":{}} fix nashsu mentioned when closing #430 as fixed in v0.5.3, and it covers the --strict-mcp-config isolation path this PR targets.

So this change — and the byte-identical #440 and the named-constant version #465 — are now no-ops against main and can probably be closed. Just flagging the overlap so they don't need separate reviews.

@KenKinCOM

KenKinCOM commented Jul 18, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants