github / github/copilot-cli

MCP: backslashes need to be escaped when adding server info

オープン
#1,778 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:mcp
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

When adding an MCP server from the CLI, you get a nice TUI to define the info for the server. However, if you put something into "Command" with backslashes (i.e. `dotnet run --project D:\projects\terminal\src\tools\wt.mcp`), the backslashes don't automatically get escaped! This results in the MCP server not working!

When you later check the MCP server configuration, it will remove the `\` so it ends up looking like this: `dotnet run --project D:projectsterminalsrctoolswt.mcp`.

### Affected version

_No response_

### Steps to reproduce the behavior

1. `/mcp`
2. `a` to add a new server
3. fill out the details; in `Command` use something with backslashes (see example above)
4. save

The MCP server fails to work. The error doesn't have anything to do with backslashes either! (which is expected tbh, but it made tracking this down a bit harder)

### Expected behavior

Given that it's a TUI, there should not be a need to escape characters or backslashes.

### Additional context

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。