Skip to content

feat(mcp): carry MCP to cursor, gemini and zed, merging shared settings safely - #111

Merged
singhharsh1708 merged 1 commit into
mainfrom
feat/mcp-merge-targets
Aug 10, 2026
Merged

feat(mcp): carry MCP to cursor, gemini and zed, merging shared settings safely#111
singhharsh1708 merged 1 commit into
mainfrom
feat/mcp-merge-targets

Conversation

@singhharsh1708

Copy link
Copy Markdown
Owner

Six of eleven targets now carry an MCP declaration, up from three.

New emitters

Target File Notes
cursor .cursor/mcp.json dedicated file; no allowlist field, so a declared one is reported unenforced
gemini .gemini/settings.json merged; explicit type, includeTools allowlist
zed .zed/settings.json merged; no type key, timeouts in seconds, 600s clamp warned

The merge is a destructive-write class

Gemini and Zed keep servers inside settings files holding configuration that has nothing to do with skills — and these are the same paths malware targets for persistence. Three rules:

  1. Only the server key is touched. Every other key is preserved.
  2. Servers Kitbash didn't write are left alone — a hand-added server survives a compile.
  3. A file that cannot be parsed is never overwritten. A file containing comments is refused outright: JSON.parse can't round-trip them, so rewriting would silently delete the user's annotations.

Tested explicitly: unrelated settings (theme, vim_mode) and the user's own server survive; a commented file and a malformed file are both left byte-identical.

Per-client traps handled, not passed through

  • Gemini needs an explicit type — a bare url defaults to Streamable HTTP there, the exact inverse of Cline's SSE default.
  • Zed takes no type key (untagged enum), wants seconds where every other target uses milliseconds, and silently clamps above 600s — so an over-long timeout is converted and warned about.
  • Gemini unconditionally strips credential-shaped env vars (TOKEN, SECRET, KEY, AUTH…), so a server relying on an ambient credential fails auth with no discoverable cause. Now warned by name.

13 new tests; suite, typecheck, site --check and bench gate all green. Ships as 0.21.0.

…gs safely

Six of the eleven targets now carry an MCP declaration, up from three.

cursor gets a dedicated .cursor/mcp.json: `type` on stdio entries (its field
table marks it required while its examples omit it, so writing it satisfies
both readings) and omitted on remote entries, where Cursor documents no type
at all. Its format has no allowlist field, so a declared one is reported as
unenforced rather than silently widened.

gemini and zed keep servers inside a settings file that also holds unrelated
user configuration, which is a different risk class from writing a dedicated
file: getting it wrong destroys settings that have nothing to do with skills,
and these are the same paths malware targets for persistence. The merge has
three rules — only the server key is touched and every other key is preserved;
servers kitbash did not write are left alone, so a hand-added one survives;
and a file that cannot be parsed is never overwritten. A file containing
comments is refused outright, because JSON.parse cannot round-trip them and
rewriting would silently delete the user's annotations.

The per-client traps are handled rather than passed through: gemini needs an
explicit type (a bare url there defaults to Streamable HTTP, the exact inverse
of Cline's SSE default) and uses includeTools for the allowlist; zed takes no
type key at all, wants timeouts in seconds where every other target uses
milliseconds, and silently clamps above 600s, so an over-long timeout is
converted and warned about. Gemini also strips credential-shaped variables
from the environment it passes to a server, unconditionally, so relying on an
ambient token fails with no discoverable cause — that now warns by name.

Adds 13 tests, including that unrelated settings survive a merge and that a
commented or malformed settings file is left byte-identical. 0.21.0.
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kitbash Building Building Preview Aug 10, 2026 7:24am

@github-actions github-actions Bot added documentation Docs, spec, RFCs, README, site dependencies Dependency or action version bumps labels Aug 10, 2026
@singhharsh1708
singhharsh1708 merged commit 9904464 into main Aug 10, 2026
10 checks passed
@singhharsh1708
singhharsh1708 deleted the feat/mcp-merge-targets branch August 10, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency or action version bumps documentation Docs, spec, RFCs, README, site

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant