feat: rsdoctor mcp get auto port#1072
Merged
chenjiahan merged 5 commits intomainfrom May 7, 2025
Merged
Conversation
✅ Deploy Preview for rsdoctor ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
chenjiahan
reviewed
May 7, 2025
Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
chenjiahan
reviewed
May 7, 2025
chenjiahan
reviewed
May 7, 2025
chenjiahan
approved these changes
May 7, 2025
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
feat: rsdoctor mcp get auto port
This pull request introduces functionality to manage and retrieve MCP server port information, along with several related enhancements and fixes. The changes include adding utilities for handling MCP configuration (
mcp.json), updating server and socket logic to use these utilities, and improving error handling and data processing in other parts of the codebase.MCP Port Management Enhancements:
writeMcpPortandgetMcpConfigPathutilities inpackages/utils/src/common/global-config.tsto manage MCP port configuration in amcp.jsonfile. These utilities allow storing and retrieving port information for different builders.RsdoctorServerinpackages/sdk/src/sdk/server/index.tsto write the MCP port tomcp.jsonupon server initialization and log the builder-specific server information. [1] [2]getMcpPortinpackages/ai/src/server/socket.tsto read the MCP port frommcp.json, supporting builder-specific ports. This function is used in thegetPortFromArgsmethod to determine the server port dynamically. [1] [2]Server and Tooling Updates:
getPorttool inpackages/ai/src/server/tools.tsto retrieve the MCP server port dynamically. This tool is registered in the server and integrated with thegetWsUrlfunction. [1] [2] [3]Toolsenum inpackages/ai/src/server/tools.tsto includegetPort.Data Processing and Error Handling Improvements:
APIDataLoaderinpackages/utils/src/common/data/index.tsto handle cases where module or chunk information is missing, improving robustness. [1] [2]getPackageDependencyinpackages/ai/src/server/tools.tsto 300 items to avoid processing overly large datasets.Miscellaneous Changes:
GlobalConfigexport inpackages/utils/src/common/index.tsto make the new MCP utilities accessible to other modules.Related Links