Skip to content

fix(cli): write strict JSON for MCP config - #10933

Merged
catrielmuller merged 1 commit into
mainfrom
fix/mcp-json-strict-output
Jun 5, 2026
Merged

fix(cli): write strict JSON for MCP config#10933
catrielmuller merged 1 commit into
mainfrom
fix/mcp-json-strict-output

Conversation

@catrielmuller

@catrielmuller catrielmuller commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Normalize kilo.json after kilo mcp add so JSONC-preserved trailing commas are stripped for strict JSON config files.
  • Preserve existing JSONC formatting for kilo.jsonc targets.
  • Add regression coverage for remote OAuth MCP config output.

This fixes reports where adding an MCP server could leave kilo.json rejected by strict JSON parsers such as jq.

Pasted image Pasted image (2) Pasted image (3) Pasted image (4) Pasted image (5)

@kilo-code-bot

kilo-code-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The fix is correct and well-structured. KilocodeMcpConfig.format() is properly isolated in a Kilo-owned path, the single kilocode_change marker in the shared upstream file is minimal, and ConfigParse.jsonc is the right existing utility to strip trailing commas and comments before re-serializing as strict JSON. The test covers both the JSONC pass-through and the strict JSON normalization path with a realistic OAuth MCP config fixture.

Files Reviewed (4 files)
  • .changeset/clean-mcp-json.md
  • packages/opencode/src/cli/cmd/mcp.ts
  • packages/opencode/src/kilocode/cli/cmd/mcp.ts
  • packages/opencode/test/kilocode/cli/cmd/mcp.test.ts

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 579,796 tokens

Review guidance: REVIEW.md from base branch main

@catrielmuller
catrielmuller merged commit f828478 into main Jun 5, 2026
21 checks passed
@catrielmuller
catrielmuller deleted the fix/mcp-json-strict-output branch June 5, 2026 13:25
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…utput

fix(cli): write strict JSON for MCP config
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