-
Notifications
You must be signed in to change notification settings - Fork 693
fix: Windows Claude Desktop stdio + Codex beta/timeout config #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Windows Claude Desktop stdio + Codex beta/timeout config #650
Conversation
The cmd.exe /c wrapper was causing stdio pipe issues on Windows, resulting in "Server disconnected" errors in Claude Desktop. Testing confirmed that calling uvx.exe directly works reliably. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR simplifies how Claude Desktop MCP configs are generated on Windows by removing the special cmd.exe wrapper logic and always invoking uvx.exe directly, eliminating a problematic stdio indirection while keeping argument construction unchanged. Sequence diagram for MCP server launch without cmd.exe wrappersequenceDiagram
actor User
participant ClaudeDesktop
participant ConfigJsonBuilder
participant OSProcess
User->>ClaudeDesktop: Start MCP server
ClaudeDesktop->>ConfigJsonBuilder: Generate config for McpClient
ConfigJsonBuilder->>ConfigJsonBuilder: BuildUvxArgs(fromUrl, packageName)
ConfigJsonBuilder-->>ClaudeDesktop: command = uvxPath
ConfigJsonBuilder-->>ClaudeDesktop: args = toolArgs
ClaudeDesktop->>OSProcess: Launch uvxPath with args via stdio
OSProcess-->>ClaudeDesktop: MCP protocol over stdio
ClaudeDesktop-->>User: MCP server connected
Updated class diagram for ConfigJsonBuilder command resolutionclassDiagram
class ConfigJsonBuilder {
+PopulateUnityNode(JObject unity, string uvPath, McpClient client) void
+BuildUvxArgs(string fromUrl, string packageName) IList~string~
}
class JObject
class McpClient
ConfigJsonBuilder --> JObject : uses
ConfigJsonBuilder --> McpClient : uses
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
📝 WalkthroughWalkthroughRemoved Windows-specific command-shim logic and platform-detection helpers from Unity config generation; adjusted Codex config builder to use beta/prerelease arg list and added a startup_timeout_sec entry for unityMCP in stdio paths. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the Have feedback? Share your thoughts on our Discord thread! Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Use GetBetaServerFromArgsList() for consistent --prerelease handling - Add startup_timeout_sec = 60 to allow time for uvx package downloads Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
cmd.exe /cwrapper when generating Claude Desktop config on Windows--prerelease explicit)startup_timeout_sec = 60to Codex config for slower first-run package downloadsProblems Fixed
Claude Desktop on Windows
The
cmd.exe /cwrapper was causing stdio pipe issues, resulting in "Server disconnected" errors immediately after the MCP server started:Root cause:
cmd.exeinterferes with stdio piping in a way that breaks MCP protocol communication.Fix: Call
uvx.exedirectly instead of wrapping withcmd.exe /c.Codex CLI
--prerelease explicitflags for beta server mode (was manually adding--frominstead of usingGetBetaServerFromArgsList())Fix:
GetBetaServerFromArgsList()helper for consistent beta handlingstartup_timeout_sec = 60to generated configTesting
🤖 Generated with Claude Code
Summary by CodeRabbit
Refactor
New Features
Behavior Changes
✏️ Tip: You can customize this high-level summary in your review settings.