harden: register Windsurf/Devin via direct JSON writes (drop mcpsync from installer)#522
Merged
Merged
Conversation
… from installer The mcpsync-based registration added in the Windsurf/Devin PR could corrupt a user's configs: mcpsync (≤0.0.4) flattened a server's nested env into a phantom transport-less server and dropped env vars. (Fixed upstream in justrach/mcpsync#3, but the installer auto-installs whatever mcpsync is live.) Windsurf and Devin both use a standard mcpServers JSON object, so register codedb the same way the other tools are — a direct, additive python write of just the codedb entry, guarded by the tool's presence. This: • can't drop a server's env/headers (only the codedb key is written), • can't create phantom servers, • needs no mcpsync (no extra download / network dependency), • preserves Devin's non-mcpServers peer keys. nuke.zig already deregisters both (unchanged). Verified in a sandbox: env- bearing servers and peer keys preserved, codedb added, ~/.mcpconfig.json never touched. install.sh is `bash -n` clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Benchmark Regression ReportThresholds: 10.00% and 50,000 ns absolute delta
|
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.
Why
The Windsurf/Devin registration (PR #521) drove
mcpsync sync. But mcpsync ≤0.0.4 flattens a server's nestedenvinto a phantom transport-less server and drops env vars — it corrupted real configs during testing (Codexnode_repl.env→ "invalid transport"; malformedgitagent.envin 4 tools). Root cause is fixed in justrach/mcpsync#3, but the installer auto-installs whatever mcpsync is currently live, so it shouldn't depend on the fix being out.What
Windsurf (
~/.codeium/windsurf/mcp_config.json) and Devin (~/.config/devin/config.json) both use a standardmcpServersJSON object — so register codedb the same way the other four tools are: a direct, additive python write of just thecodedbentry, guarded by the tool's presence (_register_json_mcp).This:
env/headers(only the codedb key is written),mcpServerspeer keys,nuke.zigalready deregisters both (unchanged).Tested
Sandbox: a Windsurf server with env + a Devin config with peer keys → codedb added to both, env and peer keys preserved,
~/.mcpconfig.jsonnever created.bash -n install/install.shclean.Net: −43/+25 lines vs the mcpsync version (simpler and safer).