registry icon indicating copy to clipboard operation
registry copied to clipboard

Fix issue-743 by sanitizing the URL

Open Avish34 opened this issue 1 month ago • 4 comments

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

Avish34 avatar Nov 29 '25 10:11 Avish34

@tadasant @domdomegg Please review!!

Avish34 avatar Nov 29 '25 11:11 Avish34

@claude please review this PR

tadasant avatar Nov 29 '25 15:11 tadasant

Claude encountered an error —— View job

Failed with exit code 128

I'll analyze this and get back to you.

claude[bot] avatar Nov 29 '25 15:11 claude[bot]

I'm not sure introducing a utils pattern is necessary here. Can we just add it to the current flow in detectRepoURL?

sure!!

Avish34 avatar Nov 30 '25 15:11 Avish34