feat(kilo-mcp): enable global mode support#1631
Open
sirmacik wants to merge 2 commits into
Open
Conversation
Kilo CLI reads global MCP from `~/.config/kilo/kilo.json` (or `kilo.jsonc`). The path machinery in `KiloMcp.getSettablePaths` already routes global mode to that location — only the factory metadata flag in `McpProcessor` was gating it off. Kilo is an OpenCode fork and uses an identical native MCP schema (`type: local|remote`, `environment` instead of `env`, `enabled` instead of `disabled`), so global parity with the opencode target is the natural state. Before this PR, running `rulesync generate -g` with a global `mcp.json` source produced: > Target 'kilo' does not support the feature 'mcp'. Skipping. Users were forced to keep a separate Kilo-specific source file or post-process via jq. After: kilo.json is generated at the global path alongside the other opencode-family targets. Changes: - `mcp-processor.ts`: flip `supportsGlobal: false → true` in the Kilo factory metadata. - `mcp-processor.test.ts`: assert `kilo` is in both the project and global tool-target lists. - `docs/reference/supported-tools.md`: add 🌏 to the Kilo MCP cell. - `skills/rulesync/supported-tools.md`: synced.
Per project AGENTS.md: 'Always preserve the existence of end-to-end happy-path test cases that cover the Tool x Feature matrix.' PR enables supportsGlobal for kilo MCP, so kilo must appear in the global-mode matrix at src/e2e/e2e-mcp.spec.ts. Output path is `~/.config/kilo/kilo.jsonc` (matches project-mode entry on line 32: KiloMcp.fromRulesyncMcp defaults to .jsonc when neither file exists). E2E run confirms the new entry generates correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kilo CLI reads global MCP from
~/.config/kilo/kilo.json(orkilo.jsonc). The path machinery inKiloMcp.getSettablePathsalready routes global mode to that location — only the factory metadata flag inMcpProcessorwas gating it off.Kilo is an OpenCode fork and uses an identical native MCP schema (
type: local|remote,environmentinstead ofenv,enabledinstead ofdisabled), so global parity with theopencodetarget is the natural state.Before
Users running
rulesync generate -gto manage global MCP across the opencode family had to keep a separate Kilo-only source file, or post-process withjqto copy the.mcpblock fromopencode.jsonintokilo.json(since the schemas match).After
~/.config/kilo/kilo.jsonis generated alongsideopencode.json,config.toml(codex),settings.json(gemini), and.claude.json(claude code) on everyrulesync generate -g.Changes
src/features/mcp/mcp-processor.ts: flipsupportsGlobal: false → truein the Kilo factory metadata.src/features/mcp/mcp-processor.test.ts: assertkilois present in both project- and global-mode tool-target lists.docs/reference/supported-tools.md: Kilo MCP cell✅→✅ 🌏.skills/rulesync/supported-tools.md: synced viasync-skill-docs.ts.Tests
All 75 existing kilo-mcp tests pass (including the existing global fromFile / fromRulesyncMcp / preserve-non-mcp-properties cases at lines 283-456). All 46 mcp-processor tests pass. Added 1 new test asserting
kilois in the global target list.pnpm cicheckclean.Risk
Very low — pure flag flip. The implementation in
KiloMcpalready supports global mode and is already covered by tests. The fix is just enabling the processor to route to it.