Skip to content

feat(kilo-mcp): enable global mode support#1631

Open
sirmacik wants to merge 2 commits into
dyoshikawa:mainfrom
sirmacik:feat/kilo-mcp-global
Open

feat(kilo-mcp): enable global mode support#1631
sirmacik wants to merge 2 commits into
dyoshikawa:mainfrom
sirmacik:feat/kilo-mcp-global

Conversation

@sirmacik
Copy link
Copy Markdown
Contributor

Summary

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

$ rulesync generate -g
Target 'kilo' does not support the feature 'mcp'. Skipping.

Users running rulesync generate -g to manage global MCP across the opencode family had to keep a separate Kilo-only source file, or post-process with jq to copy the .mcp block from opencode.json into kilo.json (since the schemas match).

After

~/.config/kilo/kilo.json is generated alongside opencode.json, config.toml (codex), settings.json (gemini), and .claude.json (claude code) on every rulesync generate -g.

Changes

  • src/features/mcp/mcp-processor.ts: flip supportsGlobal: false → true in the Kilo factory metadata.
  • src/features/mcp/mcp-processor.test.ts: assert kilo is present in both project- and global-mode tool-target lists.
  • docs/reference/supported-tools.md: Kilo MCP cell ✅ 🌏.
  • skills/rulesync/supported-tools.md: synced via sync-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 kilo is in the global target list. pnpm cicheck clean.

Risk

Very low — pure flag flip. The implementation in KiloMcp already supports global mode and is already covered by tests. The fix is just enabling the processor to route to it.

sirmacik added 2 commits May 12, 2026 17:06
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.
@sirmacik sirmacik marked this pull request as ready for review May 12, 2026 15:35
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.

1 participant