github / github/copilot-cli

Can't send inline json with additional-mcp-config flag

Đang mở
#428 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:configuration area:mcp
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the bug

I'm trying to add inline json with the additional-mcp-config flag. It seems that the JSON parsing dies on the second character no matter what I do, so I can't even get to the point of configuring my actual MCP server.
I assume escaping quotes is the problem, but I've tried multiple ways around it with no luck. The following command fails in Windows powershell:

```
npx -y @github/copilot@latest --additional-mcp-config '{"mcpServers":{}}'
```

Output:
```
Invalid JSON in --additional-mcp-config: Expected property name or '}' in JSON at position 1 (line 1 column 2)
```

### Affected version

0.0.353

### Steps to reproduce the behavior

1. In windows powershell, run `npx -y @github/copilot@latest --additional-mcp-config '{mcpServers:{}}'`

### Expected behavior

Copilot is launched. I have an actual mcp server config in my case, but it doesn't launch even if I pass an empty set of servers.

### Additional context

- Happens with powershell via windows terminal or directly opening powershell.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.