-
Notifications
You must be signed in to change notification settings - Fork 230
feat: enable mcp to communicate with IDE via JSON-RPC server #2640
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
base: master
Are you sure you want to change the base?
Conversation
MaxKless
commented
Jul 28, 2025
- refactor: move socket utilities to shared library and add detection
- feat: create JSON-RPC client with content-length protocol compatibility
- refactor: remove NxIdeProvider in favor of IIdeJsonRpcClient
- add ide client and use it
- refactor mcp to be more dynamic
- support both ways for now
- talking between them works!!
- successful communication between vscode & stdio mcp
- ensure no stdio output
- formatting
- type cleanup
View your CI Pipeline Execution ↗ for commit 70b6e5a
☁️ Nx Cloud last updated this comment at |
5c45553
to
21f40fc
Compare
export const getNxConsoleSocketPath = (workspaceRoot: string): string => { | ||
const path = resolve(join(getSocketDir(workspaceRoot), 'nx-console.sock')); | ||
return platform() === 'win32' ? '\\\\.\\pipe\\nx\\' + path : path; |
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.
The Windows named pipe path construction may cause issues with path length limitations. Windows named pipes should use a simpler naming convention. Consider modifying the path construction for Windows:
return platform() === 'win32'
? '\\\\.\\pipe\\nx-console-' + createSimpleHash(workspaceRoot)
: path;
This approach uses a hash of the workspace root rather than embedding the full file path in the pipe name, which avoids potential path length issues while still maintaining uniqueness per workspace.
export const getNxConsoleSocketPath = (workspaceRoot: string): string => { | |
const path = resolve(join(getSocketDir(workspaceRoot), 'nx-console.sock')); | |
return platform() === 'win32' ? '\\\\.\\pipe\\nx\\' + path : path; | |
export const getNxConsoleSocketPath = (workspaceRoot: string): string => { | |
const path = resolve(join(getSocketDir(workspaceRoot), 'nx-console.sock')); | |
return platform() === 'win32' ? '\\\\.\\pipe\\nx-console-' + createSimpleHash(workspaceRoot) : path; | |
}; |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.