github / github/copilot-cli

Respect VS Code User Settings for Copilot CLI Configuration (e.g., mcp.json)

Aberta
#146 6 comentários 12 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### Describe the feature or problem you'd like to solve

_No response_

### Proposed solution

To improve user experience and consistency, the Copilot CLI should **respect existing VS Code user settings for configuration**, mirroring the setup used within the editor.

#### 💡 Proposal

The Copilot CLI should look for and utilize configuration files stored in the standard VS Code user settings locations, such as the example below for macOS:

**Example Configuration Location (macOS VS Code Insiders):**
`$HOME/Library/Application Support/Code - Insiders/User/mcp.json`

(Note: The path varies based on the OS and VS Code version, e.g., stable, Insiders.)

#### ⚙️ Sample Configuration Format

The CLI should be able to read and utilize a configuration file formatted like this (using `mcp.json` as an example):

```json
{
"servers": {
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking@latest"],
"type": "stdio"
},

"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "${input:CONTEXT7_API_KEY}"
}
},
"fetch": {
"command": "uvx",
"args": [
"mcp-server-fetch",
"--user-agent=\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15\"",
"--ignore-robots-txt"
],
"type": "stdio"
},
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--no-sandbox",
"--isolated",
"--image-responses",
"omit",
"--block-service-workers",
"--ignore-https-errors",
"--save-session",
"--save-trace"
],
"type": "stdio"
},
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"],
"type": "stdio"
}
},
"inputs": [
{
"id": "CONTEXT7_API_KEY",
"type": "promptString",
"description": "Your Context7 API key"
}
]
}
```

#### ➕ Benefits

* **Consistency:** Users maintain a single source of truth for their Copilot configuration across VS Code and the CLI.
* **Ease of Setup:** Reduces redundant configuration steps.
* **Standardization:** Aligns the CLI's behavior with the common configuration practices of the VS Code ecosystem.

This integration would significantly enhance the workflow for developers heavily using both VS Code and the Copilot CLI.

### Example prompts or workflows

_No response_

### Additional context

_No response_

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.