Integrate MCP plugin fixes / 集成 MCP 插件修复#4866
Merged
SivanCola merged 11 commits intoJun 19, 2026
Merged
Conversation
…en credential dir permissions
Two code paths were splitting MCP server commands on whitespace without the shouldSplitPluginCommand guard that NormalizePluginCommandLine has, which truncated any command path with spaces. 1. Frontend AddServerForm / EditServerForm (CapabilitiesPanel.tsx): split(/\s+/) on the command field before sending to the Go backend. A path like "C:\Program Files\MyApp\server.exe" became command "C:\Program" with args ["Files\MyApp\server.exe"]. 2. Legacy config parser (mcpjson.go parseLegacyMCPSpec): Always split the body on spaces. The v0.x config.json format uses "name=command args..." lines; for paths with spaces like "ida=C:\PersonalData\Software\Learn\IDA Pro\ida_bridge.bat", this truncated the command to "C:\PersonalData\Software\Learn\IDA". Fix: in the frontend, pass the full command string through and let NormalizePluginCommandLine handle the split on the Go side. In parseLegacyMCPSpec, only split when shouldSplitPluginCommand returns true (known runner like npx/node, or quoted command), otherwise keep the full body as the command. Fixes e.g. IDA Pro MCP server configuration where the binary path contains spaces.
Keep startup capability flags immutable during runtime HTTP session refreshes so expired-session recovery does not race with concurrent capability readers. Co-authored-by: SivanCola <32437197+SivanCola@users.noreply.github.com>
Keep the integrated migration test file gofmt-clean after combining the MCP-related PRs. Co-authored-by: SivanCola <32437197+SivanCola@users.noreply.github.com>
Run gofmt on the integrated bot and control changes so the CI formatting gate passes. Co-authored-by: SivanCola <32437197+SivanCola@users.noreply.github.com>
Skip Unix permission-bit assertions on Windows, where os.FileMode only reflects limited permission state. Co-authored-by: SivanCola <32437197+SivanCola@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3791f7a37f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This was referenced Jun 19, 2026
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
This integration PR combines the MCP/plugin-related work from:
It is intended to supersede those individual PRs with one rebased integration branch on top of the latest
main-v2.Closes #4734.
Repository contributors
Authorship note: original commits preserve their primary authors where practical. @SivanCola contributed as a collaborator by reviewing the implementation, fixing follow-up issues found during review, integrating the related PRs, and verifying the final state.
Verification
GOTOOLCHAIN=local GOPROXY=off GOSUMDB=off go test ./internal/plugin ./internal/config ./internal/fileutil ./internal/control ./internal/agent ./internal/bot -count=1passedGOTOOLCHAIN=local GOPROXY=off GOSUMDB=off go test -race ./internal/plugin -run TestHTTPTransportReinitializesExpiredSession -count=1passedGOTOOLCHAIN=local GOPROXY=off GOSUMDB=off go test ./... -count=1passed indesktop/pnpm --dir desktop/frontend check:csspassed with the bundled runtimegit diff --checkpassedLocal note:
pnpm --dir desktop/frontend typecheckcould not complete in this worktree because the Wails generated binding module was absent; the reported generated-binding import is not introduced by this integration diff.Cache impact
Cache-impact: low - this touches cache-sensitive MCP/plugin, boot, and config code, but the intended behavior changes are runtime/session recovery, desktop/runtime hardening, config migration/parsing, and resource limits; no provider-visible prompt prefix, memory prefix, or tool schema ordering change is intended.
Cache-guard: focused MCP/plugin tests and the HTTP reinitialize race test were run;
git diff --checkpassed, and the PR body explicitly documents the cache-sensitive surface.System-prompt-review: @SivanCola reviewed the integrated boot/config/plugin changes for provider-visible prefix impact; no system prompt, memory prefix, output style, or skill index text change is intended.