MCP Server 'Command to run' strips backslashes from Windows paths
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 6
Description
### Describe the bug
When adding an MCP server in Copilot CLI, the **Command to run** field incorrectly processes Windows-style paths containing backslashes (`\`). The backslashes are stripped, causing the saved command path to become invalid.
This is a common scenario when pointing Copilot CLI at a locally built MCP server executable.
### Steps to reproduce
1. Open Copilot CLI settings/config UI for **MCP Servers**
2. Add a new MCP server (or edit an existing one)
3. In **Command to run**, enter a Windows path with backslashes, e.g.:
`C:\src\external\gitrepo\mcpserver\bin\mcpserver.exe`
4. Save
### Actual behavior
The saved value strips the backslashes, e.g. it becomes:
`C:srcexternalgitrepomcpserverbinmcpserver.exe`
### Expected behavior
The saved command should preserve the Windows path exactly as entered (including backslashes), e.g.:
`C:\src\external\gitrepo\mcpserver\bin\mcpserver.exe`
### Environment
- OS: Windows
- Scenario: locally built MCP server executable path entered into “Command to run”
### Additional context / notes
This looks like an escaping/serialization issue (e.g., treating backslashes as escape characters) when persisting the MCP server config. The UI should either:
- properly escape backslashes when storing, or
- treat the field as a raw string, or
- clearly document/accept `\\` if that’s required (but ideally it shouldn’t be).
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Reproduisez le problème dans l’interface de configuration de MCP Servers sous Windows en utilisant le chemin indiqué dans le rapport, puis suivez la manière dont la valeur de Command to run est persistée. La tâche est terminée lorsque l’enregistrement et la réouverture du serveur MCP conservent chaque barre oblique inverse du chemin Windows saisi.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- shell
- Domaine
- cli
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 58/100