Fix issue-743 by sanitizing the URL
This PR aims to fix https://github.com/modelcontextprotocol/registry/issues/743#event-20985516896
Motivation and Context
This is needed to ensure we are sanitizing the URL before creating server.json to be inline with the validations.
How Has This Been Tested?
Tested via UTs and also tested CLI locally to ensure the expected behavior.
Breaking Changes
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
Checklist
- [ ] I have read the MCP Documentation
- [x] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
Additional context
@tadasant @domdomegg Please review!!
@claude please review this PR
Claude encountered an error —— View job
Failed with exit code 128
I'll analyze this and get back to you.
I'm not sure introducing a utils pattern is necessary here. Can we just add it to the current flow in
detectRepoURL?
sure!!